uniapp封装下拉菜单
【代码】uniapp封装下拉菜单。
·
插件下载地址
https://ext.dcloud.net.cn/plugin?id=7520
<view class="p20">
<superwei-combox :candidates="candidates_json" :isJSON="true" keyName="pointName" placeholder="请选择或输入"
v-model="inputValue_json" @input="input_json" @select="select_json"></superwei-combox>
</view>
inputValue_json: '',
candidates_json: [{
pointId: '1',
pointName: '风机后轴温度'
}, {
pointId: '2',
pointName: '风机前轴温度',
}, {
pointId: '3',
pointName: '电机后轴温度'
}]
input_json(e) {
console.log(e) // 选项一
},
select_json(e) {
console.log(e) // {id: '1',name: '选项一'}
}
更多推荐
所有评论(0)