|
4 | 4 |
|
5 | 5 | Note: You can use all the props of `VTree` in `VTreeSearch`
|
6 | 6 |
|
7 |
| -| Prop | Description | Type | Default Value | |
8 |
| -| :------------------- | :--------------------------------------------------------------------------------- | :------------------------------------------- | :----------- | |
9 |
| -| searchPlaceholder | 搜索输入框的 placeholder | `string` | '搜索关键字' | |
10 |
| -| showCheckAll | 是否显示全选复选框 | `boolean` | true | |
11 |
| -| showCheckedButton | 是否显示已选按钮 | `boolean` | true | |
12 |
| -| checkedButtonText | 已选按钮文字 | `string` | '已选' | |
13 |
| -| showFooter | 是否显示底部信息 | `boolean` | true | |
14 |
| -| searchMethod `2.0.2` | 如果传入此 Prop ,触发 `search` 事件后将会执行此方法,否则会执行组件内置的搜索方法 | `(keyword: string) => void \| Promise<void>` | 无 | |
15 |
| -| searchLength | 触发搜索的字符长度 | `number` | 1 | |
16 |
| -| searchDisabled | 禁用搜索功能 | `boolean` | false | |
17 |
| -| searchRemote | 是否远程搜索,传入 `searchMethod` 时无效 | `boolean` | false | |
18 |
| -| searchDebounceTime | 搜索防抖时间,单位为毫秒 | `number` | 300 | |
| 7 | +| Prop | Description | Type | Default Value | |
| 8 | +| :------------------- | :---------------------------------------------------------------------------------------------------------------------- | :------------------------------------------- | :------------ | |
| 9 | +| searchPlaceholder | Placeholder of search input | `string` | '搜索关键字' | |
| 10 | +| showCheckAll | Whether to show check all checkbox | `boolean` | true | |
| 11 | +| showCheckedButton | Whether to show 'Checked' button | `boolean` | true | |
| 12 | +| checkedButtonText | Checked button text | `string` | '已选' | |
| 13 | +| showFooter | Whether to show footer | `boolean` | true | |
| 14 | +| searchMethod `2.0.2` | This method will be invoked when `search` event triggers if present, or else the internal search method will be invoked | `(keyword: string) => void \| Promise<void>` | None | |
| 15 | +| searchLength | The length of search text that triggers a search | `number` | 1 | |
| 16 | +| searchDisabled | Disable search | `boolean` | false | |
| 17 | +| searchRemote | Enable remote search. Not effective when `searchMethod` is present | `boolean` | false | |
| 18 | +| searchDebounceTime | Search debounce time. Unit: ms | `number` | 300 | |
19 | 19 |
|
20 | 20 | ## VTreeSearch Events
|
21 | 21 |
|
22 | 22 | Note: You can listen to all the events of `VTree` on `VTreeSearch`
|
23 | 23 |
|
24 |
| -| Event | Description | Return Value | |
25 |
| -| :----- | :----------------- | :----------- | |
26 |
| -| search | 执行搜索操作时触发 | 搜索的关键字 | |
| 24 | +| Event | Description | Return Value | |
| 25 | +| :----- | :------------------- | :------------- | |
| 26 | +| search | Triggers when search | Search keyword | |
27 | 27 |
|
28 | 28 | ## VTreeSearch Methods
|
29 | 29 |
|
30 | 30 | Note: You can use all the methods of `VTree` in `VTreeSearch`
|
31 | 31 |
|
32 |
| -| Method | Description | Params | Return Value | |
33 |
| -| :----------- | :------------- | :------------------------------------------------------- | :-------------- | |
34 |
| -| clearKeyword | 清空关键字 | 无 | `void` | |
35 |
| -| getKeyword | 获取搜索关键字 | 无 | `string` | |
36 |
| -| search | 执行搜索 | `keyword: string`: 搜索的关键字,默认为内部 this.keyword | `Promise<void>` | |
| 32 | +| Method | Description | Params | Return Value | |
| 33 | +| :----------- | :------------- | :---------------------------------------------------------------------------- | :-------------- | |
| 34 | +| clearKeyword | Clear keyword | None | `void` | |
| 35 | +| getKeyword | Get keyword | None | `string` | |
| 36 | +| search | Execute search | `keyword: string`: Search keyword, the default value is internal this.keyword | `Promise<void>` | |
37 | 37 |
|
38 | 38 | ## VTreeSearch Slots
|
39 | 39 |
|
40 | 40 | Note: You can pass all the slots of `VTree` to `VTreeSearch`
|
41 | 41 |
|
42 |
| -| Name | Description | |
43 |
| -| :----------- | :------------------------------------------------- | |
44 |
| -| search-input | 搜索输入框,可通过此 slot 自行封装树搜索组件的行为 | |
45 |
| -| actions | 操作按钮,可在搜索输入框后加入更多操作按钮 | |
46 |
| -| footer | 底部信息 | |
| 42 | +| Name | Description | |
| 43 | +| :----------- | :------------------------------------------------------------ | |
| 44 | +| search-input | Search input | |
| 45 | +| actions | Action buttons. Append more action buttons after search input | |
| 46 | +| footer | Footer info | |
47 | 47 |
|
0 commit comments