vant 下拉选择 显示默认值

html

                  <van-dropdown-item 
                        :title="time_value" 
                        v-model="time" 
                        :options="time_option" 
                        @change="changeTime">
                    </van-dropdown-item>

data数据

                time: '',
                time_value:'按早中晚搜索',
                time_option: [
                    {text: '早上',value: 0},
                    {text: '中午',value: 1},
                    {text: '晚上',value: 2},
                ],

函数

            // 选择星期几
            changeTime (value) {
                this.time_value = this.time_option[value].text;
                this.time = value
            },
posted @ 2020-11-25 10:38  JaneLifeVlog  阅读(3218)  评论(1)    收藏  举报