anima-vue-scroller
v1.1.9
Published
Vue scroller picke anima-vue-scroller
Downloads
4
Readme
anima-vue-scroller
A Vue.js project
Install
# install dependencies
npm install anima-vue-scroller --save
```JavaScript
require ('dist/app.css');
// ES6 mudule
import Scroller from 'anima-vue-scroller';
# Usage
```HTML
<span @click="show('scroller')"></span>
<scroller @confirm="confirm" ref="scroller" @claer="claer" @change="changeValue" :scroll="scrollData"></scroller>
export default {
name: 'app',
components: {
Scroller
},
data () {
return {
scrollData: [{
defaultValue: 1,
data: [{
name: '男',
value: 0
}, {
name: '女',
value: 1
}, {
name: '不限',
value: 2
}]
}, {
defaultValue: 2,
data: [{
name: '男',
value: 0
}, {
name: '女',
value: 1
}, {
name: '不限',
value: 2
}]
}]
}
},
methods: {
changeValue (value) {
console.log(value)
},
confirm (values) {
console.log(values)
},
claer () {
console.log('已关闭')
},
show (name) {
this.$refs[name].open()
}
}
}