From 95fc8e2ebaf1f695a757ef2c3777fc078f2157a8 Mon Sep 17 00:00:00 2001 From: anlyyao Date: Thu, 20 Jun 2024 14:58:38 +0800 Subject: [PATCH] chore: adjust export method for components --- src/action-sheet/action-sheet.en-US.md | 4 +- src/action-sheet/action-sheet.md | 4 +- src/action-sheet/demos/align.vue | 2 +- src/action-sheet/demos/grid-multiple.vue | 2 +- src/action-sheet/demos/grid.vue | 2 +- src/action-sheet/demos/list.vue | 3 +- src/action-sheet/demos/status.vue | 2 +- src/action-sheet/index.ts | 2 +- src/action-sheet/type.ts | 4 +- src/avatar/index.ts | 2 +- src/back-top/index.ts | 6 +- src/badge/index.ts | 6 +- src/button/index.ts | 6 +- src/calendar/index.ts | 6 +- src/cascader/cascader.en-US.md | 4 +- src/cascader/cascader.md | 4 +- src/cascader/index.ts | 6 +- src/cascader/type.ts | 4 +- src/cell/index.ts | 7 +- src/checkbox/index.ts | 2 +- src/collapse/index.ts | 15 ++- src/components.ts | 132 +++++++++++++---------- src/count-down/index.ts | 3 +- src/date-time-picker/demos/full.vue | 2 +- src/date-time-picker/index.ts | 6 +- src/divider/index.ts | 2 +- src/drawer/demos/base.vue | 2 +- src/drawer/demos/footer.vue | 2 +- src/drawer/demos/icon.vue | 2 +- src/drawer/demos/title.vue | 2 +- src/drawer/index.ts | 4 +- src/dropdown-menu/index.ts | 9 +- src/empty/index.ts | 6 +- src/fab/index.ts | 6 +- src/footer/index.ts | 8 +- src/form/index.ts | 1 + src/grid/index.ts | 9 +- src/guide/demos/base.vue | 2 +- src/guide/demos/custom-popover.vue | 3 +- src/guide/demos/dialog.vue | 3 +- src/guide/demos/no-mask.vue | 2 +- src/guide/demos/popover-dialog.vue | 3 +- src/guide/index.ts | 8 +- src/image-viewer/index.ts | 9 +- src/image/index.ts | 6 +- src/indexes/index.ts | 15 ++- src/input/index.ts | 6 +- src/link/index.ts | 6 +- src/list/index.ts | 6 +- src/loading/index.ts | 6 +- src/navbar/index.ts | 11 +- src/notice-bar/index.ts | 7 +- src/overlay/index.ts | 2 +- src/picker/demos/base.vue | 2 +- src/picker/demos/cascade.vue | 5 +- src/picker/index.ts | 1 + src/popover/index.ts | 6 +- src/popup/index.ts | 6 +- src/progress/index.ts | 6 +- src/pull-down-refresh/index.ts | 7 +- src/radio/index.ts | 6 +- src/rate/index.ts | 6 +- src/result/index.ts | 7 +- src/search/index.ts | 10 +- src/side-bar/demos/base.vue | 4 +- src/side-bar/demos/custom.vue | 4 +- src/side-bar/demos/switch.vue | 2 +- src/side-bar/demos/with-icon.vue | 2 +- src/side-bar/index.ts | 2 + src/skeleton/index.ts | 6 +- src/slider/index.ts | 6 +- src/stepper/index.ts | 2 +- src/steps/index.ts | 9 +- src/sticky/index.ts | 6 +- src/swipe-cell/demos/left.vue | 2 +- src/swipe-cell/index.ts | 2 +- src/swiper/index.ts | 1 + src/switch/index.ts | 6 +- src/tab-bar/index.ts | 9 +- src/table/index.ts | 8 +- src/tabs/index.ts | 9 +- src/tag/index.ts | 9 +- src/textarea/index.ts | 6 +- src/toast/demos/base.vue | 1 - src/toast/demos/theme.vue | 2 +- src/upload/demos/multiple.vue | 8 +- src/upload/index.ts | 12 ++- 87 files changed, 313 insertions(+), 251 deletions(-) diff --git a/src/action-sheet/action-sheet.en-US.md b/src/action-sheet/action-sheet.en-US.md index 46fa53e96..2120dcd18 100644 --- a/src/action-sheet/action-sheet.en-US.md +++ b/src/action-sheet/action-sheet.en-US.md @@ -16,7 +16,7 @@ theme | String | list | options:list/grid | N visible | Boolean | false | required。`v-model` and `v-model:visible` is supported | Y defaultVisible | Boolean | false | required。uncontrolled property | Y onCancel | Function | | Typescript:`(context: { e: MouseEvent }) => void`
| N -onClose | Function | | Typescript:`(trigger: TriggerSource) => void`
[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/action-sheet/type.ts)。
`type TriggerSource = 'overlay' \| 'command' \| 'select' `
| N +onClose | Function | | Typescript:`(trigger: ActionSheetTriggerSource) => void`
[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/action-sheet/type.ts)。
`type ActionSheetTriggerSource = 'overlay' \| 'command' \| 'select' `
| N onSelected | Function | | Typescript:`(selected: ActionSheetItem \| string, index: number) => void`
| N ### ActionSheet Events @@ -24,7 +24,7 @@ onSelected | Function | | Typescript:`(selected: ActionSheetItem \| string, i name | params | description -- | -- | -- cancel | `(context: { e: MouseEvent })` | \- -close | `(trigger: TriggerSource)` | [see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/action-sheet/type.ts)。
`type TriggerSource = 'overlay' \| 'command' \| 'select' `
+close | `(trigger: ActionSheetTriggerSource)` | [see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/action-sheet/type.ts)。
`type ActionSheetTriggerSource = 'overlay' \| 'command' \| 'select' `
selected | `(selected: ActionSheetItem \| string, index: number)` | \- diff --git a/src/action-sheet/action-sheet.md b/src/action-sheet/action-sheet.md index d2034dfc5..5886652e1 100644 --- a/src/action-sheet/action-sheet.md +++ b/src/action-sheet/action-sheet.md @@ -15,7 +15,7 @@ theme | String | list | 展示类型,列表和表格形式展示。可选项 visible | Boolean | false | 必需。显示与隐藏。支持语法糖 `v-model` 或 `v-model:visible` | Y defaultVisible | Boolean | false | 必需。显示与隐藏。非受控属性 | Y onCancel | Function | | TS 类型:`(context: { e: MouseEvent }) => void`
点击取消按钮时触发 | N -onClose | Function | | TS 类型:`(trigger: TriggerSource) => void`
关闭时触发。[详细类型定义](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/action-sheet/type.ts)。
`type TriggerSource = 'overlay' \| 'command' \| 'select' `
| N +onClose | Function | | TS 类型:`(trigger: ActionSheetTriggerSource) => void`
关闭时触发。[详细类型定义](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/action-sheet/type.ts)。
`type ActionSheetTriggerSource = 'overlay' \| 'command' \| 'select' `
| N onSelected | Function | | TS 类型:`(selected: ActionSheetItem \| string, index: number) => void`
选择菜单项时触发 | N ### ActionSheet Events @@ -23,7 +23,7 @@ onSelected | Function | | TS 类型:`(selected: ActionSheetItem \| string, in 名称 | 参数 | 描述 -- | -- | -- cancel | `(context: { e: MouseEvent })` | 点击取消按钮时触发 -close | `(trigger: TriggerSource)` | 关闭时触发。[详细类型定义](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/action-sheet/type.ts)。
`type TriggerSource = 'overlay' \| 'command' \| 'select' `
+close | `(trigger: ActionSheetTriggerSource)` | 关闭时触发。[详细类型定义](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/action-sheet/type.ts)。
`type ActionSheetTriggerSource = 'overlay' \| 'command' \| 'select' `
selected | `(selected: ActionSheetItem \| string, index: number)` | 选择菜单项时触发 diff --git a/src/action-sheet/demos/align.vue b/src/action-sheet/demos/align.vue index f5b213111..04b519fc9 100644 --- a/src/action-sheet/demos/align.vue +++ b/src/action-sheet/demos/align.vue @@ -24,7 +24,7 @@