diff --git a/db/TDesign.db b/db/TDesign.db index 6ba2643d3..1e1494b4d 100644 Binary files a/db/TDesign.db and b/db/TDesign.db differ diff --git a/packages/products/tdesign-mobile-vue/src/guide/guide.en-US.md b/packages/products/tdesign-mobile-vue/src/guide/guide.en-US.md new file mode 100644 index 000000000..b8e85952e --- /dev/null +++ b/packages/products/tdesign-mobile-vue/src/guide/guide.en-US.md @@ -0,0 +1,53 @@ +:: BASE_DOC :: + +## API +### Guide Props + +name | type | default | description | required +-- | -- | -- | -- | -- +counter | Slot / Function | - | Typescript:`TNode<{ current: number; total: number }>`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N +current | Number | - | `v-model` and `v-model:current` is supported | N +defaultCurrent | Number | - | uncontrolled property | N +finishButtonProps | Object | - | Typescript:`ButtonProps` | N +hideCounter | Boolean | false | \- | N +hideSkip | Boolean | false | \- | N +highlightPadding | Number | 8 | \- | N +mode | String | popup | options: popup/dialog | N +nextButtonProps | Object | - | Typescript:`ButtonProps`,[Button API Documents](./button?tab=api)。[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/guide/type.ts) | N +showOverlay | Boolean | true | \- | N +skipButtonProps | Object | - | Typescript:`ButtonProps` | N +steps | Array | - | Typescript:`Array` | N +zIndex | Number | 999999 | \- | N +onChange | Function | | Typescript:`(current: number, context?: { e: MouseEvent, total: number }) => void`
| N +onFinish | Function | | Typescript:`(context: { e: MouseEvent, current: number, total: number }) => void`
| N +onNextStepClick | Function | | Typescript:`(context: { e: MouseEvent, next: number, current: number, total: number }) => void`
| N +onSkip | Function | | Typescript:`(context: { e: MouseEvent, current: number, total: number }) => void`
| N + +### Guide Events + +name | params | description +-- | -- | -- +change | `(current: number, context?: { e: MouseEvent, total: number })` | \- +finish | `(context: { e: MouseEvent, current: number, total: number })` | \- +next-step-click | `(context: { e: MouseEvent, next: number, current: number, total: number })` | \- +skip | `(context: { e: MouseEvent, current: number, total: number })` | \- + +### GuideStep + +name | type | default | description | required +-- | -- | -- | -- | -- +body | String / Slot / Function | - | Typescript:`string \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N +content | Slot / Function | - | Typescript:`TNode`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N +element | String / Function | - | required。Typescript:`AttachNode`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | Y +highlightContent | Slot / Function | - | Typescript:`TNode`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N +highlightPadding | Number | - | \- | N +mode | String | - | options: popup/dialog | N +nextButtonProps | Object | - | Typescript:`ButtonProps` | N +offset | Array | - | this api is in discussing. do not use it.。Typescript:`Array` | N +placement | String | 'top' | Typescript:`StepPopupPlacement \| StepDialogPlacement` `type StepPopupPlacement = 'top'\|'left'\|'right'\|'bottom'\|'top-left'\|'top-right'\|'bottom-left'\|'bottom-right'\|'left-top'\|'left-bottom'\|'right-top'\|'right-bottom'` `type StepDialogPlacement = 'top'\|'center' `。[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/guide/type.ts) | N +popupProps | Object | - | Popup component props if `mode = popup`。Typescript:`PopupProps`,[Popup API Documents](./popup?tab=api)。[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/guide/type.ts) | N +prevButtonProps | Object | - | Typescript:`ButtonProps` | N +showOverlay | Boolean | true | \- | N +skipButtonProps | Object | - | Typescript:`ButtonProps` | N +stepOverlayClass | String | - | \- | N +title | String | - | \- | N diff --git a/packages/products/tdesign-mobile-vue/src/guide/guide.md b/packages/products/tdesign-mobile-vue/src/guide/guide.md new file mode 100644 index 000000000..74d4e35cf --- /dev/null +++ b/packages/products/tdesign-mobile-vue/src/guide/guide.md @@ -0,0 +1,53 @@ +:: BASE_DOC :: + +## API +### Guide Props + +名称 | 类型 | 默认值 | 说明 | 必传 +-- | -- | -- | -- | -- +counter | Slot / Function | - | 用于自定义渲染计数部分。TS 类型:`TNode<{ current: number; total: number }>`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N +current | Number | - | 当前步骤,即整个引导的进度。-1 则不展示,用于需要中断展示的场景。支持语法糖 `v-model` 或 `v-model:current` | N +defaultCurrent | Number | - | 当前步骤,即整个引导的进度。-1 则不展示,用于需要中断展示的场景。非受控属性 | N +finishButtonProps | Object | - | 透传 完成 的全部属性,示例:`{ content: '完成', theme: 'primary' }`。TS 类型:`ButtonProps` | N +hideCounter | Boolean | false | 是否隐藏计数 | N +hideSkip | Boolean | false | 是否隐藏跳过按钮 | N +highlightPadding | Number | 8 | 高亮框的内边距 | N +mode | String | popup | 引导框的类型。可选项:popup/dialog | N +nextButtonProps | Object | - | 透传 下一步按钮 的全部属性,示例:{ content: '下一步', theme: 'primary' }。TS 类型:`ButtonProps`,[Button API Documents](./button?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/guide/type.ts) | N +showOverlay | Boolean | true | 是否出现遮罩层 | N +skipButtonProps | Object | - | 透传 跳过按钮 的全部属性,{ content: '跳过', theme: 'default' }。TS 类型:`ButtonProps` | N +steps | Array | - | 用于定义每个步骤的内容,包括高亮的节点、相对位置和具体的文案内容等。。TS 类型:`Array` | N +zIndex | Number | 999999 | 提示框的层级 | N +onChange | Function | | TS 类型:`(current: number, context?: { e: MouseEvent, total: number }) => void`
当前步骤发生变化时触发 | N +onFinish | Function | | TS 类型:`(context: { e: MouseEvent, current: number, total: number }) => void`
点击完成按钮时触发 | N +onNextStepClick | Function | | TS 类型:`(context: { e: MouseEvent, next: number, current: number, total: number }) => void`
点击下一步时触发 | N +onSkip | Function | | TS 类型:`(context: { e: MouseEvent, current: number, total: number }) => void`
点击跳过按钮时触发 | N + +### Guide Events + +名称 | 参数 | 描述 +-- | -- | -- +change | `(current: number, context?: { e: MouseEvent, total: number })` | 当前步骤发生变化时触发 +finish | `(context: { e: MouseEvent, current: number, total: number })` | 点击完成按钮时触发 +next-step-click | `(context: { e: MouseEvent, next: number, current: number, total: number })` | 点击下一步时触发 +skip | `(context: { e: MouseEvent, current: number, total: number })` | 点击跳过按钮时触发 + +### GuideStep + +名称 | 类型 | 默认值 | 说明 | 必传 +-- | -- | -- | -- | -- +body | String / Slot / Function | - | 当前步骤提示框的内容。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N +content | Slot / Function | - | 用户自定义引导弹框的内容,一旦存在,此时除 `placement`、`offset`和`element` 外,其它属性全部失效)。TS 类型:`TNode`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N +element | String / Function | - | 必需。高亮的节点。数据类型为 String 时,会被当作选择器处理,进行节点查询。示例:'#tdesign' 或 () => document.querySelector('#tdesign')。TS 类型:`AttachNode`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | Y +highlightContent | Slot / Function | - | 用户自定义的高亮框 (仅当 `mode` 为 `popup` 时生效)。TS 类型:`TNode`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N +highlightPadding | Number | - | 高亮框的内边距 | N +mode | String | - | 引导框的类型。可选项:popup/dialog | N +nextButtonProps | Object | - | 用于自定义当前引导框的下一步按钮的内容。TS 类型:`ButtonProps` | N +offset | Array | - | 【讨论确认中】相对于 placement 的偏移量,示例:[-10, 20] 或 ['10px', '8px']。TS 类型:`Array` | N +placement | String | 'top' | 引导框相对于高亮元素出现的位置。TS 类型:`StepPopupPlacement \| StepDialogPlacement` `type StepPopupPlacement = 'top'\|'left'\|'right'\|'bottom'\|'top-left'\|'top-right'\|'bottom-left'\|'bottom-right'\|'left-top'\|'left-bottom'\|'right-top'\|'right-bottom'` `type StepDialogPlacement = 'top'\|'center' `。[详细类型定义](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/guide/type.ts) | N +popupProps | Object | - | 透传全部属性到 Popup 组件。`mode=popup` 时有效。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/guide/type.ts) | N +prevButtonProps | Object | - | 用于自定义当前引导框的上一步按钮的内容。TS 类型:`ButtonProps` | N +showOverlay | Boolean | true | 是否出现遮罩层 | N +skipButtonProps | Object | - | 用于自定义当前步骤引导框的跳过按钮的内容。TS 类型:`ButtonProps` | N +stepOverlayClass | String | - | 覆盖引导框的类名 | N +title | String | - | 当前步骤的标题内容 | N diff --git a/packages/scripts/api.json b/packages/scripts/api.json index b4e9207bf..9ef3d4433 100644 --- a/packages/scripts/api.json +++ b/packages/scripts/api.json @@ -48319,7 +48319,8 @@ "platform_framework": [ "1", "2", - "4" + "4", + "8" ], "component": "Guide", "field_category": 1, @@ -48349,7 +48350,8 @@ "platform_framework_text": [ "Vue(PC)", "React(PC)", - "Angular(PC)" + "Angular(PC)", + "Vue(Mobile)" ], "field_type_text": [ "TNode" @@ -48360,7 +48362,8 @@ "platform_framework": [ "1", "2", - "4" + "4", + "8" ], "component": "Guide", "field_category": 1, @@ -48390,7 +48393,8 @@ "platform_framework_text": [ "Vue(PC)", "React(PC)", - "Angular(PC)" + "Angular(PC)", + "Vue(Mobile)" ], "field_type_text": [ "Number" @@ -48401,7 +48405,8 @@ "platform_framework": [ "1", "2", - "4" + "4", + "8" ], "component": "Guide", "field_category": 1, @@ -48431,7 +48436,8 @@ "platform_framework_text": [ "Vue(PC)", "React(PC)", - "Angular(PC)" + "Angular(PC)", + "Vue(Mobile)" ], "field_type_text": [ "Object" @@ -48442,7 +48448,8 @@ "platform_framework": [ "1", "2", - "4" + "4", + "8" ], "component": "Guide", "field_category": 1, @@ -48472,7 +48479,8 @@ "platform_framework_text": [ "Vue(PC)", "React(PC)", - "Angular(PC)" + "Angular(PC)", + "Vue(Mobile)" ], "field_type_text": [ "Boolean" @@ -48524,7 +48532,8 @@ "platform_framework": [ "1", "2", - "4" + "4", + "8" ], "component": "Guide", "field_category": 1, @@ -48554,7 +48563,8 @@ "platform_framework_text": [ "Vue(PC)", "React(PC)", - "Angular(PC)" + "Angular(PC)", + "Vue(Mobile)" ], "field_type_text": [ "Boolean" @@ -48565,7 +48575,8 @@ "platform_framework": [ "1", "2", - "4" + "4", + "8" ], "component": "Guide", "field_category": 1, @@ -48595,7 +48606,8 @@ "platform_framework_text": [ "Vue(PC)", "React(PC)", - "Angular(PC)" + "Angular(PC)", + "Vue(Mobile)" ], "field_type_text": [ "Number" @@ -48606,7 +48618,8 @@ "platform_framework": [ "1", "2", - "4" + "4", + "8" ], "component": "Guide", "field_category": 1, @@ -48636,7 +48649,8 @@ "platform_framework_text": [ "Vue(PC)", "React(PC)", - "Angular(PC)" + "Angular(PC)", + "Vue(Mobile)" ], "field_type_text": [ "String" @@ -48647,7 +48661,8 @@ "platform_framework": [ "1", "2", - "4" + "4", + "8" ], "component": "Guide", "field_category": 1, @@ -48677,7 +48692,8 @@ "platform_framework_text": [ "Vue(PC)", "React(PC)", - "Angular(PC)" + "Angular(PC)", + "Vue(Mobile)" ], "field_type_text": [ "Object" @@ -48729,7 +48745,8 @@ "platform_framework": [ "1", "2", - "4" + "4", + "8" ], "component": "Guide", "field_category": 1, @@ -48759,7 +48776,8 @@ "platform_framework_text": [ "Vue(PC)", "React(PC)", - "Angular(PC)" + "Angular(PC)", + "Vue(Mobile)" ], "field_type_text": [ "Boolean" @@ -48770,7 +48788,8 @@ "platform_framework": [ "1", "2", - "4" + "4", + "8" ], "component": "Guide", "field_category": 1, @@ -48800,7 +48819,8 @@ "platform_framework_text": [ "Vue(PC)", "React(PC)", - "Angular(PC)" + "Angular(PC)", + "Vue(Mobile)" ], "field_type_text": [ "Object" @@ -48811,7 +48831,8 @@ "platform_framework": [ "1", "2", - "4" + "4", + "8" ], "component": "Guide", "field_category": 1, @@ -48841,7 +48862,8 @@ "platform_framework_text": [ "Vue(PC)", "React(PC)", - "Angular(PC)" + "Angular(PC)", + "Vue(Mobile)" ], "field_type_text": [ "Array" @@ -48852,7 +48874,8 @@ "platform_framework": [ "1", "2", - "4" + "4", + "8" ], "component": "Guide", "field_category": 1, @@ -48882,7 +48905,8 @@ "platform_framework_text": [ "Vue(PC)", "React(PC)", - "Angular(PC)" + "Angular(PC)", + "Vue(Mobile)" ], "field_type_text": [ "Number" @@ -48893,7 +48917,8 @@ "platform_framework": [ "1", "2", - "4" + "4", + "8" ], "component": "Guide", "field_category": 2, @@ -48921,7 +48946,8 @@ "platform_framework_text": [ "Vue(PC)", "React(PC)", - "Angular(PC)" + "Angular(PC)", + "Vue(Mobile)" ], "field_type_text": [] }, @@ -48930,7 +48956,8 @@ "platform_framework": [ "1", "2", - "4" + "4", + "8" ], "component": "Guide", "field_category": 2, @@ -48958,7 +48985,8 @@ "platform_framework_text": [ "Vue(PC)", "React(PC)", - "Angular(PC)" + "Angular(PC)", + "Vue(Mobile)" ], "field_type_text": [] }, @@ -48967,7 +48995,8 @@ "platform_framework": [ "1", "2", - "4" + "4", + "8" ], "component": "Guide", "field_category": 2, @@ -48995,7 +49024,8 @@ "platform_framework_text": [ "Vue(PC)", "React(PC)", - "Angular(PC)" + "Angular(PC)", + "Vue(Mobile)" ], "field_type_text": [] }, @@ -49041,7 +49071,8 @@ "platform_framework": [ "1", "2", - "4" + "4", + "8" ], "component": "Guide", "field_category": 2, @@ -49069,7 +49100,8 @@ "platform_framework_text": [ "Vue(PC)", "React(PC)", - "Angular(PC)" + "Angular(PC)", + "Vue(Mobile)" ], "field_type_text": [] }, @@ -49242,7 +49274,8 @@ "platform_framework": [ "1", "2", - "4" + "4", + "8" ], "component": "GuideStep", "field_category": 1, @@ -49273,7 +49306,8 @@ "platform_framework_text": [ "Vue(PC)", "React(PC)", - "Angular(PC)" + "Angular(PC)", + "Vue(Mobile)" ], "field_type_text": [ "String", @@ -49324,7 +49358,8 @@ "platform_framework": [ "1", "2", - "4" + "4", + "8" ], "component": "GuideStep", "field_category": 1, @@ -49354,7 +49389,8 @@ "platform_framework_text": [ "Vue(PC)", "React(PC)", - "Angular(PC)" + "Angular(PC)", + "Vue(Mobile)" ], "field_type_text": [ "TNode" @@ -49365,7 +49401,8 @@ "platform_framework": [ "1", "2", - "4" + "4", + "8" ], "component": "GuideStep", "field_category": 1, @@ -49396,7 +49433,8 @@ "platform_framework_text": [ "Vue(PC)", "React(PC)", - "Angular(PC)" + "Angular(PC)", + "Vue(Mobile)" ], "field_type_text": [ "String", @@ -49408,7 +49446,8 @@ "platform_framework": [ "1", "2", - "4" + "4", + "8" ], "component": "GuideStep", "field_category": 1, @@ -49438,7 +49477,8 @@ "platform_framework_text": [ "Vue(PC)", "React(PC)", - "Angular(PC)" + "Angular(PC)", + "Vue(Mobile)" ], "field_type_text": [ "TNode" @@ -49449,7 +49489,8 @@ "platform_framework": [ "1", "2", - "4" + "4", + "8" ], "component": "GuideStep", "field_category": 1, @@ -49479,7 +49520,8 @@ "platform_framework_text": [ "Vue(PC)", "React(PC)", - "Angular(PC)" + "Angular(PC)", + "Vue(Mobile)" ], "field_type_text": [ "Number" @@ -49490,7 +49532,8 @@ "platform_framework": [ "1", "2", - "4" + "4", + "8" ], "component": "GuideStep", "field_category": 1, @@ -49520,7 +49563,8 @@ "platform_framework_text": [ "Vue(PC)", "React(PC)", - "Angular(PC)" + "Angular(PC)", + "Vue(Mobile)" ], "field_type_text": [ "String" @@ -49531,7 +49575,8 @@ "platform_framework": [ "1", "2", - "4" + "4", + "8" ], "component": "GuideStep", "field_category": 1, @@ -49561,7 +49606,8 @@ "platform_framework_text": [ "Vue(PC)", "React(PC)", - "Angular(PC)" + "Angular(PC)", + "Vue(Mobile)" ], "field_type_text": [ "Object" @@ -49572,7 +49618,8 @@ "platform_framework": [ "1", "2", - "4" + "4", + "8" ], "component": "GuideStep", "field_category": 1, @@ -49602,7 +49649,8 @@ "platform_framework_text": [ "Vue(PC)", "React(PC)", - "Angular(PC)" + "Angular(PC)", + "Vue(Mobile)" ], "field_type_text": [ "Array" @@ -49613,7 +49661,8 @@ "platform_framework": [ "1", "2", - "4" + "4", + "8" ], "component": "GuideStep", "field_category": 1, @@ -49643,7 +49692,8 @@ "platform_framework_text": [ "Vue(PC)", "React(PC)", - "Angular(PC)" + "Angular(PC)", + "Vue(Mobile)" ], "field_type_text": [ "String" @@ -49654,7 +49704,8 @@ "platform_framework": [ "1", "2", - "4" + "4", + "8" ], "component": "GuideStep", "field_category": 1, @@ -49684,7 +49735,8 @@ "platform_framework_text": [ "Vue(PC)", "React(PC)", - "Angular(PC)" + "Angular(PC)", + "Vue(Mobile)" ], "field_type_text": [ "Object" @@ -49695,7 +49747,8 @@ "platform_framework": [ "1", "2", - "4" + "4", + "8" ], "component": "GuideStep", "field_category": 1, @@ -49725,7 +49778,8 @@ "platform_framework_text": [ "Vue(PC)", "React(PC)", - "Angular(PC)" + "Angular(PC)", + "Vue(Mobile)" ], "field_type_text": [ "Object" @@ -49736,7 +49790,8 @@ "platform_framework": [ "1", "2", - "4" + "4", + "8" ], "component": "GuideStep", "field_category": 1, @@ -49766,7 +49821,8 @@ "platform_framework_text": [ "Vue(PC)", "React(PC)", - "Angular(PC)" + "Angular(PC)", + "Vue(Mobile)" ], "field_type_text": [ "Boolean" @@ -49777,7 +49833,8 @@ "platform_framework": [ "1", "2", - "4" + "4", + "8" ], "component": "GuideStep", "field_category": 1, @@ -49807,7 +49864,8 @@ "platform_framework_text": [ "Vue(PC)", "React(PC)", - "Angular(PC)" + "Angular(PC)", + "Vue(Mobile)" ], "field_type_text": [ "Object" @@ -49818,7 +49876,8 @@ "platform_framework": [ "1", "2", - "4" + "4", + "8" ], "component": "GuideStep", "field_category": 1, @@ -49848,7 +49907,8 @@ "platform_framework_text": [ "Vue(PC)", "React(PC)", - "Angular(PC)" + "Angular(PC)", + "Vue(Mobile)" ], "field_type_text": [ "String" @@ -49859,7 +49919,8 @@ "platform_framework": [ "1", "2", - "4" + "4", + "8" ], "component": "GuideStep", "field_category": 1, @@ -49889,7 +49950,8 @@ "platform_framework_text": [ "Vue(PC)", "React(PC)", - "Angular(PC)" + "Angular(PC)", + "Vue(Mobile)" ], "field_type_text": [ "String"