目录
-
- [input 输入框](#input 输入框)
- [picker 选择器](#picker 选择器)
input 输入框
- https://developers.weixin.qq.com/miniprogram/dev/component/input.html
- https://uniapp.dcloud.net.cn/component/input.html
html
<input
class="input-class"
type="text"
v-model="value"
placeholder-class="placeholder-class"
placeholder="请输入"
/>
picker 选择器
- https://uniapp.dcloud.net.cn/component/picker.html
- https://developers.weixin.qq.com/miniprogram/dev/component/picker.html
html
<picker
@change="handleChange"
:value="index"
range-key="label"
:range="options"
>
<view>{{ options[index]?.label }}</view>
</picker>
js
{
data(){
return {
index: 0,
options: [
{
value: 1,
label: '顺丰',
},
{
value: 2,
label: '圆通',
},
]
}
},
methods: {
handleChange(e) {
this.index = e.detail.value
}
}
}