-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Closed
Description
- I have searched the issues of this repository and believe that this is not a duplicate.
Version
1.3.5
Environment
windows 7 64位,谷歌浏览器70.0.3538.110(正式版本(32 位),Vue 2.6
Reproduction link
https://vue.ant.design/components/select-cn/
Steps to reproduce
HTML
<a-select :defaultValue="emotionList[0].name" class="filter-item_select" @change="handleEmotionChange">
<a-select-option :value="item.value" v-for="item in emotionList" :key="item.id" >{{item.name}}</a-select-option>
</a-select>
<a-button @click="clear">清空</a-button>
JSON
emotionList = [
{
name: "全部",
value: -1
},
{
name: "负面",
value: 0
},
{
name: "中性",
value: 1
},
{
name: "正面",
value: 2
}
];
What is expected?
期望能够 点击清空按钮的时候将select改变过的值恢复成默认值,这里的默认值是“全部”
What is actually happening?
清空按钮的方法不知道怎么写