uview u-input Click the clear button, the data is cleared but the view is not cleared

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

insert image description here
solution:

Write v-modelthe bound value datato 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: ''
},

Guess you like

Origin blog.csdn.net/xiamoziqian/article/details/131593952