<template>
<view class="content">
<view class="title">下拉输入文本框</view>
<niceui-data-select-input
v-model="value"
:localdata="range"
@change="change"
></niceui-data-select-input>
</view>
</template>
<script>
import NiceUIDataSelectInput from '@/uni_modules/niceui-data-select-input/components/niceui-data-select-input/niceui-data-select-input.vue'
export default {
components:{
NiceUIDataSelectInput
},
data() {
return {
value: '',
range: [
{ value: 0, text: "篮球" },
{ value: 1, text: "足球" },
{ value: 2, text: "游泳" },
],
checkItems:[]
}
},
onLoad() {
},
methods: {
change(e) {
console.log("e:", e);
},
}
}
</script>
<style>
.content {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.title {
font-size: 36rpx;
color: #333;
margin-top: 60rpx;
margin-bottom: 50rpx;
}
</style>
组件名:uni-data-select
代码块:uDataSelect
当选项过多时,使用下拉菜单展示并选择内容