uni-app实现下拉效果
代码:

<view>
	 <picker @change="examinationType" :range="examinationTypeArray">
		<label>性别:</label>
		<label class="">{{ examinationTypeArrayType }}</label>
	 </picker>
</view>

//data里
examinationTypeArray:['---请选择---','男','女'],
examinationTypeIndex:0,
examinationTypeArrayType:'---请选择---',

//methods里
examinationType(e) {
    this.examinationTypeIndex = e.target.value;
    this.examinationTypeArrayType=this.examinationTypeArray[this.examinationTypeIndex]
}

相关文章:

  • 2022-12-23
  • 2021-11-22
  • 2021-07-21
  • 2021-10-18
  • 2022-12-23
  • 2022-02-23
猜你喜欢
  • 2022-12-23
  • 2021-08-25
  • 2022-01-14
  • 2022-12-23
  • 2022-03-01
  • 2022-12-23
  • 2021-10-31
相关资源
相似解决方案