其他分享
首页 > 其他分享> > uniapp选择框下拉列表

uniapp选择框下拉列表

作者:互联网

<template>
<!-- 下拉列表 -->
<view>
<view class="index">
<view class="flex-row flex">
<view class="mybill-text">提现方式:</view>
<view class="mybill-text">
<select v-model="editSelectTypeLists" class="selectType" @change="selectTypeChange"
ref="addRequestState">
<option v-for="(item,index) in selectTypeLists" :key="index" :value="item.value">{{item.name}}
</option>
</select>
</view>
</view>
</view>
</view>
</template>

<script>
export default {
data() {
return {
selectTypeLists: [{
value: "0",
name: '银行卡提现(默认方式)'
},
{
value: "1",
name: '微信提现'
}
],
withdrawType: '',
wxDepositShow: false,
}
},
created() {
this.editSelectTypeLists = this.selectTypeLists[1].value; /* 默认选中 */
},
methods: {
selectTypeChange() {
let index = this.$refs.addRequestState.value
console.log("index:" + index)
},
}
}
</script>

标签:uniapp,提现,selectTypeLists,name,index,value,列表,addRequestState,框下
来源: https://www.cnblogs.com/xcwei32/p/15915336.html