-
Notifications
You must be signed in to change notification settings - Fork 138
Open
Description
AutoComplete 的默认内容插槽
<slot>
<i-option v-for="item in filteredData" :value="item" :key="item">{{ item }}</i-option>
</slot>问题:
i-option 插槽用来显示内容项,这一个点并不友好,它是你这个控件的基本功能,别忘了你还有一个计算函数filteredData呢,这个filteredData内部调用了props.filterMethod。如果外部使用时,自定义了这个插槽,你的filterMethod就失效了。
建议:
<i-option v-for="item in filteredData" :value="item" :key="item"><template #item>{{ item }}</template></i-option>
如果不改实现,那么就请在文档里指出自定义显示会导致filter-method失效!
Metadata
Metadata
Assignees
Labels
No labels