We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Picker
columns
如下示例,当我们希望给 Picker 添加关键词过滤功能时,目前 Picker 不能通过显然的方式实现,因为 columns 不允许为空。
<script setup> import {ref} from 'vue'; const columns = ref([ {text: '南京', value: 'NanJing'}, {text: '无锡', value: 'WuXi'}, {text: '海北', value: 'ZangZu'}, {text: '北京', value: 'BeiJing'}, {text: '连云港', value: 'LianYunGang'}, {text: '浙江', value: 'ZheJiang'}, {text: '江苏', value: 'JiangSu'} ]); const filteredColumns = ref(columns.value) const search = query => { filteredColumns.value = columns.value.filter(column => column.text.includes(query)); } </script> <template> <nut-picker :columns="filteredColumns" title="城市选择"> <template #top> <nut-searchbar @change="search"></nut-searchbar> </template> </nut-picker> </template>
既然 columns 默认为空,我认为可以放开 columns 限制,使其接受空数组。
The text was updated successfully, but these errors were encountered:
feat(picker): 去除columns有值才触发watch监听(jd-opensource#2590)
9dc6470
fix(picker): 修复 columns 为空时不触发更新的问题 (#2590) (#2611)
404e732
Successfully merging a pull request may close this issue.
这个功能解决了什么问题?
如下示例,当我们希望给
Picker
添加关键词过滤功能时,目前Picker
不能通过显然的方式实现,因为columns
不允许为空。你期望的组件设计是怎样的?
既然
columns
默认为空,我认为可以放开columns
限制,使其接受空数组。The text was updated successfully, but these errors were encountered: