Problem Description:
Click the clear button that comes with the u-input input box of uview, the data bound by v-model is cleared, but the previous data is still displayed in the input box
solution:
Write v-model
the bound value data
to the initial variable declaration
Original code:
<u-input v-model="parameters.keyword" class="searchInput" placeholder="搜索" clearable />
data: {
parameters: {
current: 1,
size: 10,
keyword: ''
}
},
Modified code:
<u-input v-model="keyword" class="searchInput" placeholder="搜索" clearable />
data: {
parameters: {
current: 1,
size: 10
},
keyword: ''
},