Skip to content

Commit

Permalink
docs(select): add the description of the filterMethod prop for Select (
Browse files Browse the repository at this point in the history
  • Loading branch information
shenjunjian authored Dec 27, 2024
1 parent 6a65a60 commit 22bb2d7
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions examples/sites/demos/pc/app/select/webdoc/select.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,22 @@ export default {
'en-US': 'Filterable'
},
desc: {
'zh-CN':
'<p>通过 <code>filterable</code> 属性启用搜索功能。<code>filter-method</code> 自定义过滤方法。 <code>no-match-text</code> 属性自定义与搜索条件无匹配项时显示的文字。</p>\n',
'en-US':
'<p>Enable search functionality through the <code>filterable</code> attribute <code>filter-method</code> customize the filtering method <code>no-match-text</code> the text displayed when there is no match between attribute customization and search criteria.</p>\n'
'zh-CN': `
通过 <code>filterable</code> 属性, 启用搜索功能。<br>
通过 <code>filter-method</code> 方法属性, 自定义过滤方法。 <br>
通过 <code>no-match-text</code> 属性, 自定义与搜索条件无匹配项时显示的文字。<br>
<div class="danger custom-block">
在<code>filter-method</code>方法属性中,禁止通过修改组件的 <code>options</code>的个数,去控制过滤下拉列表选项。这样不匹配的<code>Option</code>组件会卸载,造成<code>Select</code>组件引用到被卸载的选项值时引发错误。正确的过滤函数应该参考本示例的用法。
</div>
`,
'en-US': `
Enable the search function using the <code>filterable</code> attribute. <br>
Use the <code>filter-method</code> method attribute to customize the filtering method. <br>
You can use the <code>no-match-text</code> attribute to customize the text that is displayed if there is no match with the search criteria. <br>
<div class="danger custom-block">
In the <code>filter-method</code> method property, you cannot change the number of <code>options</code> of a component to control the filtering drop-down list options. This uninstalls the mismatched <code>Option</code> component, causing an error when the <code>Select</code> component references the uninstalled option value. The correct filter function should follow the usage in this example.
</div>
`
},
codeFiles: ['filter-method.vue']
},
Expand Down

0 comments on commit 22bb2d7

Please sign in to comment.