-
Notifications
You must be signed in to change notification settings - Fork 170
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
26 changed files
with
2,968 additions
and
908 deletions.
There are no files selected for viewing
2,529 changes: 2,088 additions & 441 deletions
2,529
src/cascader/__test__/__snapshots__/demo.test.jsx.snap
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
// Vitest Snapshot v1 | ||
|
||
exports[`cascader > events > : pick 1`] = `<!--teleport start-->`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
:: BASE_DOC :: | ||
|
||
## API | ||
|
||
### Cascader Props | ||
|
||
name | type | default | description | required | ||
-- | -- | -- | -- | -- | ||
closeBtn | Boolean / Slot / Function | true | Typescript:`boolean \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N | ||
keys | Object | - | Typescript:`KeysType`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N | ||
options | Array | [] | Typescript:`Array<CascaderOption>` | N | ||
subTitles | Array | [] | Typescript:`Array<string>` | N | ||
theme | String | step | options:step/tab | N | ||
title | String / Slot / Function | - | Typescript:`string \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N | ||
value | String / Number | - | `v-model` and `v-model:value` is supported | N | ||
defaultValue | String / Number | - | uncontrolled property | N | ||
visible | Boolean | false | \- | N | ||
onChange | Function | | Typescript:`(value: string \| number, selectedOptions: string[]) => void`<br/> | N | ||
onClose | Function | | Typescript:`(trigger: TriggerSource) => void`<br/>[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/cascader/type.ts)。<br/>`type TriggerSource = 'overlay' \| 'close-btn' \| 'finish'`<br/> | N | ||
onPick | Function | | Typescript:`(value: string \| number, index: number) => void`<br/> | N | ||
|
||
### Cascader Events | ||
|
||
name | params | description | ||
-- | -- | -- | ||
change | `(value: string \| number, selectedOptions: string[])` | \- | ||
close | `(trigger: TriggerSource)` | [see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/cascader/type.ts)。<br/>`type TriggerSource = 'overlay' \| 'close-btn' \| 'finish'`<br/> | ||
pick | `(value: string \| number, index: number)` | \- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.