A dropdown refresh component implements by vuejs 2.0 for mobile.
npm install vue-awesome-dorpdown --save
var DropDown = require('vue-awesome-dropdown');
new Vue({
components: { DropDown },
data: function () {
return {
name: "",
list: [
{ name: "北京" },
{ name: "上海" },
{ name: "深圳" },
]
};
},
template: '<drop-down v-model="name" :list="list" :></drop-down>'
});
import DropDown from 'vue-awesome-dropdown';
new Vue({
components: { DropDown },
data: function () {
return {
name: "",
list: [
{ name: "北京" },
{ name: "上海" },
{ name: "深圳" },
]
};
},
template: '<drop-down v-model="name" :list="list" :></drop-down>'
});
Property | Description |
---|---|
name | 默认选中的项 |
list | 可选列表 |