You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
qb
78bfb11fa8
|
7 months ago | |
---|---|---|
.. | ||
README.md | 7 months ago | |
cha.png | 7 months ago | |
cus-selects-fan.vue | 7 months ago |
README.md
cus-selects
属性说明
属性名 | 类型 | 默认值 | 说明 |
---|---|---|---|
value | String | '' | 选择的内容 |
data | Array | [] | 下拉选择的数据 |
valueType | Object | {label:'label',value:'value'} | 下拉选择数据的别名 |
clearable | Boolean | false | 是否可以清空选项 |
filterable | Boolean | false | 是否可搜索 |
searchType | Number | 1 | 搜索类型,1:模糊搜素2:精确搜索 |
placeholder | String | '请选择' | 占位符 |
showTitle | Boolean | true | 是否显示标题占位图 |
noDataText | String | ‘暂无数据’ | 选项为空时显示的文字 |
arrLeft | Number | 20 | 选项区域的箭头巨左的间距 |
size | Number | 240 | 选择框的宽 |
|事件| | @change 选中的值 |
使用示例
//基础用法
<cus-selects v-model="value"></cus-selects>
//可清空
<cus-selects v-model="value" :clearable='true'></cus-selects>
// 模糊搜索
<cus-selects v-model="value" :clearable='true' :filterable='true' :searchType='1'></cus-selects>
// 精确搜索
<cus-selects v-model="value" @change='change' :clearable='true' :filterable='true' :searchType='2'></cus-selects>
import cusSelects from '@/components/cus-selects/cus-selects.vue'
export default {
components: {
cusSelects
},
data() {
return {
value:''
}
},
methods: {
change(e) {
console.log(e)
},
},
}