cube-ui / question-answer

Q&A for cube-ui
16 stars 7 forks source link

使用cube-recycle-list,怎么实现搜索列表的功能 #84

Open wangjuanlsx opened 4 years ago

wangjuanlsx commented 4 years ago

onFetch() { let items = []; /this.items1 = [];/ /this.recycleId = 0;/ return new Promise((resolve) => { for (let i = 0; i < this.size; i++) { items.push(this.menuDataOptions[this.recycleId++]) /items = this.menuDataOptions;/ } resolve(items) }) } this.menuDataOptions 的值在输入值改变的时候已经搜索出相应的内容了,但是渲染出来的列表不是搜索出来的内容

dolymood commented 4 years ago

目测可以利用 reset API 来实现你的需求 每次改变的时候 需要重置组件