vue-select-z
v1.0.2
Published
select组件
Readme
vue-select
Installation
yarn install vue-select-zimport VueSelect from 'vue-select-z'
Vue.use(VueSelect);Usage
<vue-select v-model="state"
placeholder="Please Choose Your State/Province"
:is-bottom="isBottom"
:is-select="isSelect"
:sct-list="sctList"
label-name="label"
value-name="value"
@change="changeFun"
@scrollToBottom="scrollToBottom">
</vue-select>
methods: {
changeFun(val) {
console.log(val);
},
scrollToBottom(hide) {
setTimeout(() => {
this.sctList = this.sctList.concat(this.sctList)
this.isBottom = true;
hide();
}, 5000);
}
}Props
| Property | Type | required | Description |
|---------------|----------|----------|-----------------------------------------|
| sct-list | Array | yes | 数据数组 |
| placeholder | String | no | placeholder |
| label-name | String | no | name字段名称默认label |
| value-name | String | no | vaule字段名称默认value |
| is-bottom | Boolen | no | 是否触底 |
| is-select | Boolen | no | 是否显示select样式默认为true如果设置为false可添加自定义显示内容 |
方法
|-----------|------------------|
| change | change方法参数是更改后的值 |
| scrollToBottom | scrollToBottom触底方法,参数是隐藏loading动画方法 |
