From e17a7d713ee3b19b5ed91380581786bd6e3241fd Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 4 Jul 2023 03:16:48 +0000 Subject: [PATCH] feat: modify API --- helper/attributes.json | 3158 ++++++++ helper/tags.json | 1093 +++ helper/web-types.json | 7815 ++++++++++++++++++++ src/action-sheet/action-sheet.md | 1 + src/avatar/props.ts | 4 +- src/avatar/type.ts | 11 +- src/button/button.en-US.md | 3 +- src/button/button.md | 3 +- src/button/props.ts | 6 +- src/button/type.ts | 7 +- src/calendar/calendar.en-US.md | 3 +- src/calendar/calendar.md | 4 +- src/calendar/props.ts | 22 +- src/calendar/type.ts | 59 +- src/checkbox-group/checkbox-group.en-US.md | 20 + src/checkbox-group/checkbox-group.md | 20 + src/dialog/dialog.en-US.md | 16 +- src/dialog/dialog.md | 18 +- src/dialog/props.ts | 5 - src/dialog/type.ts | 9 +- src/drawer/drawer.en-US.md | 8 + src/drawer/drawer.md | 8 + src/dropdown-menu/dropdown-menu.en-US.md | 1 + src/dropdown-menu/dropdown-menu.md | 1 + src/form/form.en-US.md | 4 +- src/form/form.md | 16 +- src/link/link.en-US.md | 3 +- src/link/link.md | 3 +- src/loading/loading.en-US.md | 4 +- src/loading/loading.md | 4 +- src/message/message.en-US.md | 10 + src/message/message.md | 10 + src/navbar/navbar.en-US.md | 12 +- src/navbar/navbar.md | 18 +- src/navbar/props.ts | 22 +- src/navbar/type.ts | 15 +- src/notice-bar/notice-bar.en-US.md | 5 +- src/notice-bar/notice-bar.md | 5 +- src/popup/popup.en-US.md | 2 - src/popup/popup.md | 4 +- src/rate/rate.en-US.md | 6 +- src/rate/rate.md | 6 +- src/search/search.en-US.md | 4 +- src/search/search.md | 4 +- src/select/props.ts | 23 + src/select/select.en-US.md | 11 + src/select/select.md | 11 + src/select/type.ts | 24 + src/skeleton/skeleton.en-US.md | 2 +- src/skeleton/skeleton.md | 3 +- src/slider/slider.md | 4 + src/stepper/stepper.en-US.md | 3 +- src/stepper/stepper.md | 3 +- src/tabs/tabs.en-US.md | 1 + src/tabs/tabs.md | 1 + src/textarea/textarea.en-US.md | 3 +- src/textarea/textarea.md | 3 +- src/time-line/props.ts | 49 + src/time-line/time-line-item-props.ts | 0 src/time-line/time-line.en-US.md | 1 + src/time-line/time-line.md | 1 + src/time-line/type.ts | 63 + src/toast/toast.en-US.md | 3 +- 63 files changed, 12464 insertions(+), 197 deletions(-) create mode 100644 helper/attributes.json create mode 100644 helper/tags.json create mode 100644 helper/web-types.json create mode 100644 src/checkbox-group/checkbox-group.en-US.md create mode 100644 src/checkbox-group/checkbox-group.md create mode 100644 src/select/props.ts create mode 100644 src/select/select.en-US.md create mode 100644 src/select/select.md create mode 100644 src/select/type.ts create mode 100644 src/time-line/props.ts create mode 100644 src/time-line/time-line-item-props.ts create mode 100644 src/time-line/time-line.en-US.md create mode 100644 src/time-line/time-line.md create mode 100644 src/time-line/type.ts diff --git a/helper/attributes.json b/helper/attributes.json new file mode 100644 index 000000000..792c5751e --- /dev/null +++ b/helper/attributes.json @@ -0,0 +1,3158 @@ +{ + "t-action-sheet/cancel-text": { + "type": "String", + "description": "设置取消按钮的文本\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/action-sheet?tab=api#actionsheet-props)" + }, + "t-action-sheet/count": { + "type": "Number", + "description": "设置每页展示菜单的数量,仅当 type=grid 时有效\n\ndefault: 8\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/action-sheet?tab=api#actionsheet-props)" + }, + "t-action-sheet/items": { + "type": "Array", + "description": "菜单项\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/action-sheet?tab=api#actionsheet-props)" + }, + "t-action-sheet/show-cancel": { + "type": "Boolean", + "description": "是否显示取消按钮\n\ndefault: true\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/action-sheet?tab=api#actionsheet-props)" + }, + "t-action-sheet/theme": { + "type": "String", + "options": [ + "list", + "grid" + ], + "description": "展示类型,列表和表格形式展示\n\ndefault: list\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/action-sheet?tab=api#actionsheet-props)" + }, + "t-action-sheet/visible": { + "type": "Boolean", + "description": "显示与隐藏\n\ndefault: false\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/action-sheet?tab=api#actionsheet-props)" + }, + "t-action-sheet/cancel": { + "type": "event", + "description": "点击取消按钮时触发\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/action-sheet?tab=api#actionsheet-events)" + }, + "t-action-sheet/close": { + "type": "event", + "description": "关闭时触发\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/action-sheet?tab=api#actionsheet-events)" + }, + "t-action-sheet/selected": { + "type": "event", + "description": "选择菜单项时触发\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/action-sheet?tab=api#actionsheet-events)" + }, + "t-avatar/alt": { + "type": "String", + "description": "show it when url is not valid\n\n头像替换文本,仅当图片加载失败时有效\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/avatar?tab=api#avatar-props)" + }, + "t-avatar/badge-props": { + "type": "Object", + "description": "头像右上角提示信息,继承 Badge 组件的全部特性。如:小红点,或者数字\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/avatar?tab=api#avatar-props)" + }, + "t-avatar/hide-on-load-failed": { + "type": "Boolean", + "description": "hide image when loading image failed\n\n加载失败时隐藏图片\n\ndefault: false\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/avatar?tab=api#avatar-props)" + }, + "t-avatar/icon": { + "type": "TNode", + "description": "use icon to fill\n\n图标\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/avatar?tab=api#avatar-props)" + }, + "t-avatar/image": { + "type": "String", + "description": "images url\n\n图片地址\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/avatar?tab=api#avatar-props)" + }, + "t-avatar/image-props": { + "type": "Object", + "description": "透传至 Image 组件\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/avatar?tab=api#avatar-props)" + }, + "t-avatar/shape": { + "type": "String", + "options": [ + "circle", + "round" + ], + "description": "shape\n\n形状\n\ndefault: circle\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/avatar?tab=api#avatar-props)" + }, + "t-avatar/size": { + "type": "String", + "description": "size\n\n尺寸,示例值:small/medium/large/24px/38px 等,默认为 large\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/avatar?tab=api#avatar-props)" + }, + "t-avatar/error": { + "type": "event", + "description": "trigger on image load failed\n\n图片加载失败时触发\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/avatar?tab=api#avatar-events)" + }, + "t-avatar-group/cascading": { + "type": "String", + "options": [ + "left-up", + "right-up" + ], + "description": "multiple images cascading\n\n图片之间的层叠关系,可选值:左侧图片在上和右侧图片在上\n\ndefault: 'right-up'\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/avatar-group?tab=api#avatargroup-props)" + }, + "t-avatar-group/collapse-avatar": { + "type": "String|TNode", + "description": "头像数量超出时,会出现一个头像折叠元素。该元素内容可自定义。默认为 `+N`。示例:`+5`,`...`, `更多`\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/avatar-group?tab=api#avatargroup-props)" + }, + "t-avatar-group/max": { + "type": "Number", + "description": "能够同时显示的最多头像数量\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/avatar-group?tab=api#avatargroup-props)" + }, + "t-avatar-group/size": { + "type": "String", + "description": "size\n\n尺寸,示例值:small/medium/large/24px/38px 等。优先级低于 Avatar.size\n\ndefault: medium\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/avatar-group?tab=api#avatargroup-props)" + }, + "t-back-top/fixed": { + "type": "Boolean", + "description": "是否绝对定位固定到屏幕右下方\n\ndefault: true\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/back-top?tab=api#backtop-props)" + }, + "t-back-top/icon": { + "type": "TNode", + "description": "图标\n\ndefault: 'backtop'\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/back-top?tab=api#backtop-props)" + }, + "t-back-top/target": { + "type": "Function", + "description": "定位滚动到指定对象\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/back-top?tab=api#backtop-props)" + }, + "t-back-top/text": { + "type": "String", + "description": "文案\n\ndefault: ''\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/back-top?tab=api#backtop-props)" + }, + "t-back-top/theme": { + "type": "String", + "options": [ + "round", + "half-round", + "round-dark", + "half-round-dark" + ], + "description": "预设的样式类型\n\ndefault: round\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/back-top?tab=api#backtop-props)" + }, + "t-back-top/to-top": { + "type": "event", + "description": "点击触发\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/back-top?tab=api#backtop-events)" + }, + "t-badge/color": { + "type": "String", + "description": "颜色\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/badge?tab=api#badge-props)" + }, + "t-badge/content": { + "type": "String|TNode", + "description": "徽标内容\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/badge?tab=api#badge-props)" + }, + "t-badge/count": { + "type": "String|Number|TNode", + "description": "徽标右上角内容。可以是数字,也可以是文字。如:'new'/3/99+\n\ndefault: 0\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/badge?tab=api#badge-props)" + }, + "t-badge/dot": { + "type": "Boolean", + "description": "是否为红点\n\ndefault: false\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/badge?tab=api#badge-props)" + }, + "t-badge/max-count": { + "type": "Number", + "description": "封顶的数字值\n\ndefault: 99\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/badge?tab=api#badge-props)" + }, + "t-badge/offset": { + "type": "Array", + "description": "设置状态点的位置偏移,示例:[-10, 20] 或 ['10em', '8rem']\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/badge?tab=api#badge-props)" + }, + "t-badge/shape": { + "type": "String", + "options": [ + "circle", + "round", + "ribbon" + ], + "description": "形状\n\ndefault: circle\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/badge?tab=api#badge-props)" + }, + "t-badge/show-zero": { + "type": "Boolean", + "description": "当数值为 0 时,是否展示徽标\n\ndefault: false\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/badge?tab=api#badge-props)" + }, + "t-badge/size": { + "type": "String", + "options": [ + "small", + "medium" + ], + "description": "尺寸\n\ndefault: medium\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/badge?tab=api#badge-props)" + }, + "t-button/block": { + "type": "Boolean", + "description": "make button to be a block-level element\n\n是否为块级元素\n\ndefault: false\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/button?tab=api#button-props)" + }, + "t-button/content": { + "type": "String|TNode", + "description": "button's children elements\n\n按钮内容\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/button?tab=api#button-props)" + }, + "t-button/disabled": { + "type": "Boolean", + "description": "disable the button, make it can not be clicked\n\n禁用状态\n\ndefault: false\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/button?tab=api#button-props)" + }, + "t-button/ghost": { + "type": "Boolean", + "description": "make background-color to be transparent\n\n是否为幽灵按钮(镂空按钮)\n\ndefault: false\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/button?tab=api#button-props)" + }, + "t-button/href": { + "type": "String", + "description": "跳转地址。href 存在时,按钮标签默认使用 `` 渲染;如果指定了 `tag` 则使用指定的标签渲染\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/button?tab=api#button-props)" + }, + "t-button/icon": { + "type": "TNode", + "description": "use it to set left icon in button\n\n按钮内部图标,可完全自定义\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/button?tab=api#button-props)" + }, + "t-button/loading": { + "type": "Boolean", + "description": "set button to be loading state\n\n是否显示为加载状态\n\ndefault: false\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/button?tab=api#button-props)" + }, + "t-button/shape": { + "type": "String", + "options": [ + "rectangle", + "square", + "round", + "circle" + ], + "description": "button shape\n\n按钮形状,有 4 种:长方形、正方形、圆角长方形、圆形\n\ndefault: rectangle\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/button?tab=api#button-props)" + }, + "t-button/size": { + "type": "String", + "options": [ + "small", + "medium", + "large" + ], + "description": "a button has three size\n\n组件尺寸\n\ndefault: medium\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/button?tab=api#button-props)" + }, + "t-button/tag": { + "type": "String", + "options": [ + "button", + "a", + "div" + ], + "description": "HTML Tag Element\n\n渲染按钮的 HTML 标签,默认使用标签 ` }`\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/slider?tab=api#slider-props)" + }, + "t-slider/max": { + "type": "Number", + "description": "滑块范围最大值\n\ndefault: 100\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/slider?tab=api#slider-props)" + }, + "t-slider/min": { + "type": "Number", + "description": "滑块范围最小值\n\ndefault: 0\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/slider?tab=api#slider-props)" + }, + "t-slider/range": { + "type": "Boolean", + "description": "双游标滑块\n\ndefault: false\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/slider?tab=api#slider-props)" + }, + "t-slider/show-extreme-value": { + "type": "Boolean", + "description": "是否边界值\n\ndefault: false\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/slider?tab=api#slider-props)" + }, + "t-slider/step": { + "type": "Number", + "description": "步长\n\ndefault: 1\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/slider?tab=api#slider-props)" + }, + "t-slider/value": { + "type": "Number|Array", + "description": "滑块值\n\ndefault: 0\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/slider?tab=api#slider-props)" + }, + "t-slider/change": { + "type": "event", + "description": "滑块值变化时触发\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/slider?tab=api#slider-events)" + }, + "t-slider/dragend": { + "type": "event", + "description": "结束拖动时触发\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/slider?tab=api#slider-events)" + }, + "t-slider/dragstart": { + "type": "event", + "description": "开始拖动时触发\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/slider?tab=api#slider-events)" + }, + "t-space/align": { + "type": "String", + "options": [ + "start", + "end", + "center", + "baseline" + ], + "description": "alignment\n\n对齐方式\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/space?tab=api#space-props)" + }, + "t-space/break-line": { + "type": "Boolean", + "description": "Whether to wrap, valid only in horizontal\n\n是否自动换行,仅在 horizontal 时有效\t\n\ndefault: false\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/space?tab=api#space-props)" + }, + "t-space/direction": { + "type": "String", + "options": [ + "vertical", + "horizontal" + ], + "description": "Spacing direction\n\n间距方向\n\ndefault: horizontal\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/space?tab=api#space-props)" + }, + "t-space/separator": { + "type": "String|TNode", + "description": "separator\n\n分隔符\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/space?tab=api#space-props)" + }, + "t-space/size": { + "type": "String|Number", + "options": [ + "small", + "medium", + "large" + ], + "description": "Spacing\n\n间距大小\n\ndefault: medium\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/space?tab=api#space-props)" + }, + "t-step-item/content": { + "type": "String|TNode", + "description": "步骤描述\n\ndefault: ''\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/step-item?tab=api#stepitem-props)" + }, + "t-step-item/icon": { + "type": "Boolean|TNode", + "description": "图标,默认显示内置图标,也可以自定义图标,值为 false 则不显示图标。优先级大于 `status` 定义的图标\n\ndefault: true\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/step-item?tab=api#stepitem-props)" + }, + "t-step-item/status": { + "type": "String", + "options": [ + "default", + "process", + "finish", + "error" + ], + "description": "当前步骤的状态:默认状态(未开始)、进行中状态、完成状态、错误状态\n\ndefault: default\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/step-item?tab=api#stepitem-props)" + }, + "t-step-item/title": { + "type": "String|TNode", + "description": "标题\n\ndefault: ''\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/step-item?tab=api#stepitem-props)" + }, + "t-stepper/disable-input": { + "type": "Boolean", + "description": "禁用输入框\n\ndefault: false\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/stepper?tab=api#stepper-props)" + }, + "t-stepper/disabled": { + "type": "Boolean", + "description": "禁用全部操作\n\ndefault: false\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/stepper?tab=api#stepper-props)" + }, + "t-stepper/input-width": { + "type": "Number", + "description": "输入框宽度\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/stepper?tab=api#stepper-props)" + }, + "t-stepper/max": { + "type": "Number", + "description": "最大值\n\ndefault: 100\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/stepper?tab=api#stepper-props)" + }, + "t-stepper/min": { + "type": "Number", + "description": "最小值\n\ndefault: 0\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/stepper?tab=api#stepper-props)" + }, + "t-stepper/step": { + "type": "Number", + "description": "步长\n\ndefault: 1\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/stepper?tab=api#stepper-props)" + }, + "t-stepper/theme": { + "type": "String", + "options": [ + "normal", + "grey" + ], + "description": "stylish\n\n组件风格\n\ndefault: normal\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/stepper?tab=api#stepper-props)" + }, + "t-stepper/value": { + "type": "String|Number", + "description": "值\n\ndefault: 0\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/stepper?tab=api#stepper-props)" + }, + "t-stepper/blur": { + "type": "event", + "description": "输入框失去焦点时触发\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/stepper?tab=api#stepper-events)" + }, + "t-stepper/change": { + "type": "event", + "description": "数值发生变更时触发\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/stepper?tab=api#stepper-events)" + }, + "t-stepper/overlimit": { + "type": "event", + "description": "数值超出限制时触发\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/stepper?tab=api#stepper-events)" + }, + "t-steps/current": { + "type": "String|Number", + "description": "当前步骤,即整个步骤条进度。默认根据步骤下标判断步骤的完成状态,当前步骤为进行中,当前步骤之前的步骤为已完成,当前步骤之后的步骤为未开始。如果每个步骤没有设置 value,current 值为步骤长度则表示所有步骤已完成。如果每个步骤设置了自定义 value,则 current = 'FINISH' 表示所有状态完成\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/steps?tab=api#steps-props)" + }, + "t-steps/layout": { + "type": "String", + "options": [ + "horizontal", + "vertical" + ], + "description": "步骤条方向,有两种:横向和纵向\n\ndefault: horizontal\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/steps?tab=api#steps-props)" + }, + "t-steps/options": { + "type": "Array", + "description": "步骤条数据列表(作用和 StepItem 效果一样)\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/steps?tab=api#steps-props)" + }, + "t-steps/readonly": { + "type": "Boolean", + "description": "只读状态\n\ndefault: false\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/steps?tab=api#steps-props)" + }, + "t-steps/separator": { + "type": "String", + "options": [ + "line", + "dashed", + "arrow" + ], + "description": "步骤条分割符\n\ndefault: line\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/steps?tab=api#steps-props)" + }, + "t-steps/theme": { + "type": "String", + "options": [ + "default", + "dot" + ], + "description": "步骤条风格\n\ndefault: default\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/steps?tab=api#steps-props)" + }, + "t-steps/change": { + "type": "event", + "description": "当前步骤发生变化时触发\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/steps?tab=api#steps-events)" + }, + "t-sticky/container": { + "type": "String|Function", + "description": "指定滚动的容器。数据类型为 String 时,会被当作选择器处理,进行节点查询。示例:'body' 或 () => document.body\n\ndefault: body\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/sticky?tab=api#sticky-props)" + }, + "t-sticky/disabled": { + "type": "Boolean", + "description": "是否禁用组件\n\ndefault: false\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/sticky?tab=api#sticky-props)" + }, + "t-sticky/offset-top": { + "type": "String|Number", + "description": "吸顶时与顶部的距离,单位`px`\n\ndefault: 0\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/sticky?tab=api#sticky-props)" + }, + "t-sticky/z-index": { + "type": "Number", + "description": "吸顶时的 z-index\n\ndefault: 99\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/sticky?tab=api#sticky-props)" + }, + "t-sticky/scroll": { + "type": "event", + "description": "滚动时触发,scrollTop: 距离顶部位置,isFixed: 是否吸顶\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/sticky?tab=api#sticky-events)" + }, + "t-swipe-cell/content": { + "type": "String|TNode", + "description": "操作项以外的内容\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/swipe-cell?tab=api#swipecell-props)" + }, + "t-swipe-cell/default": { + "type": "String|TNode", + "description": "子内容,同 content\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/swipe-cell?tab=api#swipecell-props)" + }, + "t-swipe-cell/disabled": { + "type": "Boolean", + "description": "是否禁用滑动\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/swipe-cell?tab=api#swipecell-props)" + }, + "t-swipe-cell/expanded": { + "type": "String", + "options": [ + "left", + "right" + ], + "description": "操作项是否呈现为打开态\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/swipe-cell?tab=api#swipecell-props)" + }, + "t-swipe-cell/left": { + "type": "Array|TNode", + "description": "左侧滑动操作项。所有行为同 `right`\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/swipe-cell?tab=api#swipecell-props)" + }, + "t-swipe-cell/right": { + "type": "Array|TNode", + "description": "右侧滑动操作项。有两种定义方式,一种是使用数组,二种是使用插槽。`right.text` 表示操作文本,`right.className` 表示操作项类名,`right.style` 表示操作项样式,`right.onClick` 表示点击操作项后执行的回调函数。示例:`[{ text: '删除', style: 'background-color: red', onClick: () => {} }]`\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/swipe-cell?tab=api#swipecell-props)" + }, + "t-swipe-cell/change": { + "type": "event", + "description": "菜单展开或者收回后将菜单的状态传递给父组件,值为数组时表示分别控制左右滑动的展开和收起状态。\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/swipe-cell?tab=api#swipecell-events)" + }, + "t-swipe-cell/click": { + "type": "event", + "description": "操作项点击时触发(插槽写法组件不触发,业务侧自定义内容和事件)\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/swipe-cell?tab=api#swipecell-events)" + }, + "t-swiper/animation": { + "type": "String", + "options": [ + "slide" + ], + "description": "轮播切换动画效果类型\n\ndefault: slide\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/swiper?tab=api#swiper-props)" + }, + "t-swiper/autoplay": { + "type": "Boolean", + "description": "是否自动播放\n\ndefault: true\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/swiper?tab=api#swiper-props)" + }, + "t-swiper/current": { + "type": "Number", + "description": "当前轮播在哪一项(下标)\n\ndefault: 0\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/swiper?tab=api#swiper-props)" + }, + "t-swiper/direction": { + "type": "String", + "options": [ + "horizontal", + "vertical" + ], + "description": "轮播滑动方向,包括横向滑动和纵向滑动两个方向\n\ndefault: horizontal\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/swiper?tab=api#swiper-props)" + }, + "t-swiper/duration": { + "type": "Number", + "description": "滑动动画时长\n\ndefault: 300\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/swiper?tab=api#swiper-props)" + }, + "t-swiper/height": { + "type": "Number", + "description": "当使用垂直方向滚动时的高度\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/swiper?tab=api#swiper-props)" + }, + "t-swiper/interval": { + "type": "Number", + "description": "轮播间隔时间\n\ndefault: 5000\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/swiper?tab=api#swiper-props)" + }, + "t-swiper/loop": { + "type": "Boolean", + "description": "是否循环播放\n\ndefault: true\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/swiper?tab=api#swiper-props)" + }, + "t-swiper/navigation": { + "type": "Object|TNode", + "description": "导航器全部配置\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/swiper?tab=api#swiper-props)" + }, + "t-swiper/pagination-position": { + "type": "String", + "options": [ + "top-left", + "top", + "top-right", + "bottom-left", + "bottom", + "bottom-right" + ], + "description": "页码信息展示位置\n\ndefault: bottom\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/swiper?tab=api#swiper-props)" + }, + "t-swiper/change": { + "type": "event", + "description": "轮播切换时触发\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/swiper?tab=api#swiper-events)" + }, + "t-switch/colors": { + "type": "Array", + "description": "自定义颜色,[打开时的颜色,关闭时的颜色]。组件默认颜色为 ['#0052d9', 'rgba(0, 0, 0, .26']。示例:[blue, gray]\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/switch?tab=api#switch-props)" + }, + "t-switch/custom-value": { + "type": "Array", + "description": "用于自定义开关的值,[打开时的值,关闭时的值]。默认为 [true, false]。示例:[1, 0]、['open', 'close']\n\ndefault: [true, false]\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/switch?tab=api#switch-props)" + }, + "t-switch/disabled": { + "type": "Boolean", + "description": "是否禁用组件\n\ndefault: false\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/switch?tab=api#switch-props)" + }, + "t-switch/label": { + "type": "String", + "description": "开关的标签\n\ndefault: ''\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/switch?tab=api#switch-props)" + }, + "t-switch/value": { + "type": "String|Number|Boolean", + "description": "开关值\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/switch?tab=api#switch-props)" + }, + "t-switch/change": { + "type": "event", + "description": "数据发生变化时触发\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/switch?tab=api#switch-events)" + }, + "t-tab-bar/bordered": { + "type": "Boolean", + "description": "是否显示外边框\n\ndefault: true\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/tab-bar?tab=api#tabbar-props)" + }, + "t-tab-bar/fixed": { + "type": "Boolean", + "description": "是否固定在底部\n\ndefault: true\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/tab-bar?tab=api#tabbar-props)" + }, + "t-tab-bar/value": { + "type": "String|Number|Array", + "description": "当前选中标签的索引\n\ndefault: undefined\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/tab-bar?tab=api#tabbar-props)" + }, + "t-tab-bar/change": { + "type": "event", + "description": "选中标签切换时触发\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/tab-bar?tab=api#tabbar-events)" + }, + "t-tab-bar-item/badge-props": { + "type": "Object", + "description": "图标右上角提示信息\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/tab-bar-item?tab=api#tabbaritem-props)" + }, + "t-tab-bar-item/icon": { + "type": "TNode", + "description": "图标名称\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/tab-bar-item?tab=api#tabbaritem-props)" + }, + "t-tab-bar-item/sub-tab-bar": { + "type": "Array", + "description": "二级菜单\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/tab-bar-item?tab=api#tabbaritem-props)" + }, + "t-tab-bar-item/value": { + "type": "String|Number", + "description": "标识符\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/tab-bar-item?tab=api#tabbaritem-props)" + }, + "t-tab-panel/destroy-on-hide": { + "type": "Boolean", + "description": "选项卡内容隐藏时是否销毁\n\ndefault: true\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/tab-panel?tab=api#tabpanel-props)" + }, + "t-tab-panel/disabled": { + "type": "Boolean", + "description": "是否禁用当前选项卡\n\ndefault: false\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/tab-panel?tab=api#tabpanel-props)" + }, + "t-tab-panel/label": { + "type": "String|TNode", + "description": "选项卡名称,可自定义选项卡导航内容\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/tab-panel?tab=api#tabpanel-props)" + }, + "t-tab-panel/panel": { + "type": "String|TNode", + "description": "用于自定义选项卡面板内容\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/tab-panel?tab=api#tabpanel-props)" + }, + "t-tab-panel/value": { + "type": "String|Number", + "description": "选项卡的值,唯一标识\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/tab-panel?tab=api#tabpanel-props)" + }, + "t-tabs/animation": { + "type": "Object", + "description": "动画效果设置。其中 duration 表示动画时长\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/tabs?tab=api#tabs-props)" + }, + "t-tabs/list": { + "type": "Array", + "description": "选项卡列表\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/tabs?tab=api#tabs-props)" + }, + "t-tabs/placement": { + "type": "String", + "options": [ + "left", + "top" + ], + "description": "选项卡位置\n\ndefault: top\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/tabs?tab=api#tabs-props)" + }, + "t-tabs/show-bottom-line": { + "type": "Boolean", + "description": "是否展示底部激活线条\n\ndefault: true\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/tabs?tab=api#tabs-props)" + }, + "t-tabs/size": { + "type": "String", + "options": [ + "medium", + "large" + ], + "description": "组件尺寸\n\ndefault: medium\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/tabs?tab=api#tabs-props)" + }, + "t-tabs/space-evenly": { + "type": "Boolean", + "description": "选项卡头部空间是否均分\n\ndefault: true\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/tabs?tab=api#tabs-props)" + }, + "t-tabs/sticky-props": { + "type": "Object", + "description": "透传至 Sticky 组件\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/tabs?tab=api#tabs-props)" + }, + "t-tabs/swipeable": { + "type": "Boolean", + "description": "是否可以滑动切换\n\ndefault: true\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/tabs?tab=api#tabs-props)" + }, + "t-tabs/value": { + "type": "String|Number", + "description": "激活的选项卡值\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/tabs?tab=api#tabs-props)" + }, + "t-tabs/change": { + "type": "event", + "description": "激活的选项卡发生变化时触发\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/tabs?tab=api#tabs-events)" + }, + "t-tag/closable": { + "type": "Boolean", + "description": "标签是否可关闭\n\ndefault: false\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/tag?tab=api#tag-props)" + }, + "t-tag/content": { + "type": "String|Number|TNode", + "description": "组件子元素\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/tag?tab=api#tag-props)" + }, + "t-tag/disabled": { + "type": "Boolean", + "description": "标签禁用态,失效标签不能触发事件。默认风格(theme=default)才有禁用态\n\ndefault: false\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/tag?tab=api#tag-props)" + }, + "t-tag/icon": { + "type": "TNode", + "description": "标签中的图标,可自定义图标呈现\n\ndefault: undefined\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/tag?tab=api#tag-props)" + }, + "t-tag/max-width": { + "type": "String|Number", + "description": "标签最大宽度,宽度超出后会出现省略号。示例:'50px' / 80\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/tag?tab=api#tag-props)" + }, + "t-tag/shape": { + "type": "String", + "options": [ + "square", + "round", + "mark" + ], + "description": "标签类型,有三种:方形、圆角方形、标记型\n\ndefault: square\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/tag?tab=api#tag-props)" + }, + "t-tag/size": { + "type": "String", + "options": [ + "small", + "medium", + "large" + ], + "description": "标签尺寸\n\ndefault: medium\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/tag?tab=api#tag-props)" + }, + "t-tag/theme": { + "type": "String", + "options": [ + "default", + "primary", + "warning", + "danger", + "success" + ], + "description": "组件风格,用于描述组件不同的应用场景\n\ndefault: default\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/tag?tab=api#tag-props)" + }, + "t-tag/variant": { + "type": "String", + "options": [ + "dark", + "light", + "outline", + "light-outline" + ], + "description": "标签风格变体\n\ndefault: dark\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/tag?tab=api#tag-props)" + }, + "t-tag/click": { + "type": "event", + "description": "点击时触发\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/tag?tab=api#tag-events)" + }, + "t-tag/close": { + "type": "event", + "description": "如果关闭按钮存在,点击关闭按钮时触发\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/tag?tab=api#tag-events)" + }, + "t-textarea/allow-input-over-max": { + "type": "Boolean", + "description": "超出maxlength或maxcharacter之后是否还允许输入\n\ndefault: false\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/textarea?tab=api#textarea-props)" + }, + "t-textarea/autofocus": { + "type": "Boolean", + "description": "自动聚焦,拉起键盘\n\ndefault: false\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/textarea?tab=api#textarea-props)" + }, + "t-textarea/autosize": { + "type": "Boolean", + "description": "是否自动增高,值为 autosize 时,style.height 不生效\n\ndefault: false\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/textarea?tab=api#textarea-props)" + }, + "t-textarea/disabled": { + "type": "Boolean", + "description": "是否禁用文本框\n\ndefault: false\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/textarea?tab=api#textarea-props)" + }, + "t-textarea/label": { + "type": "String|TNode", + "description": "左侧文本\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/textarea?tab=api#textarea-props)" + }, + "t-textarea/maxcharacter": { + "type": "Number", + "description": "用户最多可以输入的字符个数,一个中文汉字表示两个字符长度\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/textarea?tab=api#textarea-props)" + }, + "t-textarea/maxlength": { + "type": "Number", + "description": "用户最多可以输入的字符个数\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/textarea?tab=api#textarea-props)" + }, + "t-textarea/name": { + "type": "String", + "description": "名称,HTML 元素原生属性\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/textarea?tab=api#textarea-props)" + }, + "t-textarea/placeholder": { + "type": "String", + "description": "占位符\n\ndefault: undefined\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/textarea?tab=api#textarea-props)" + }, + "t-textarea/value": { + "type": "String|Number", + "description": "文本框值\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/textarea?tab=api#textarea-props)" + }, + "t-textarea/blur": { + "type": "event", + "description": "失去焦点时触发\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/textarea?tab=api#textarea-events)" + }, + "t-textarea/change": { + "type": "event", + "description": "输入内容变化时触发\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/textarea?tab=api#textarea-events)" + }, + "t-textarea/focus": { + "type": "event", + "description": "获得焦点时触发\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/textarea?tab=api#textarea-events)" + }, + "t-time-line/label-align": { + "type": "String", + "options": [ + "left", + "right", + "alternate", + "top", + "bottom" + ], + "description": "label info placement\n\n标签信息放在时间轴的位置,`mode='alternate'` 时生效。纵向时间轴信息位置:左侧、右侧或两侧,默认信息在时间轴右侧。横向时间轴信息位置:上方、下方、两侧\n\ndefault: left\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/time-line?tab=api#timeline-props)" + }, + "t-time-line/layout": { + "type": "String", + "options": [ + "horizontal", + "vertical" + ], + "description": "time line layout\n\n时间轴方向:水平方向、垂直方向\n\ndefault: vertical\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/time-line?tab=api#timeline-props)" + }, + "t-time-line/mode": { + "type": "String", + "options": [ + "alternate", + "same" + ], + "description": "The position relationship between the label and the content text, 'alternate' is displayed on both sides of the axis, and 'same' is displayed on the same side\n\n标签与内容文本的位置关系,`alternate` 为展示在轴两侧,`same` 为展示在同一侧\n\ndefault: alternate\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/time-line?tab=api#timeline-props)" + }, + "t-time-line/reverse": { + "type": "Boolean", + "description": "时间轴是否表现为倒序\n\ndefault: false\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/time-line?tab=api#timeline-props)" + }, + "t-time-line/theme": { + "type": "String", + "options": [ + "default", + "dot" + ], + "description": "步骤条风格\n\ndefault: default\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/time-line?tab=api#timeline-props)" + }, + "t-time-line-item/content": { + "type": "String|TNode", + "description": "描述内容\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/time-line-item?tab=api#timelineitem-props)" + }, + "t-time-line-item/dot": { + "type": "TNode", + "description": "用于自定义时间轴节点元素\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/time-line-item?tab=api#timelineitem-props)" + }, + "t-time-line-item/dot-color": { + "type": "String", + "options": [ + "primary", + "warning", + "error", + "default" + ], + "description": "时间轴颜色,内置 `primary/warning/error/default` 四种色值,可传入 16 进制颜色码或 RGB 颜色值.\n\ndefault: primary\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/time-line-item?tab=api#timelineitem-props)" + }, + "t-time-line-item/label": { + "type": "String|TNode", + "description": "标签文本内容,可完全自定义\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/time-line-item?tab=api#timelineitem-props)" + }, + "t-time-line-item/label-align": { + "type": "String", + "options": [ + "left", + "right", + "top", + "bottom" + ], + "description": "标签信息相对于时间轴的位置,在 `mode='alternate'` 时生效,优先级高于 `TimeLine.labelAlign`\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/time-line-item?tab=api#timelineitem-props)" + }, + "t-time-range-picker/focus": { + "type": "event", + "description": "范围输入框获得焦点时触发\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/time-range-picker?tab=api#timerangepicker-events)" + }, + "t-toast/direction": { + "type": "String", + "options": [ + "row", + "column" + ], + "description": "图标排列方式\n\ndefault: row\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/toast?tab=api#toast-props)" + }, + "t-toast/duration": { + "type": "Number", + "description": "弹窗显示毫秒数\n\ndefault: 2000\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/toast?tab=api#toast-props)" + }, + "t-toast/icon": { + "type": "String|TNode", + "description": "自定义图标\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/toast?tab=api#toast-props)" + }, + "t-toast/message": { + "type": "String|TNode", + "description": "弹窗显示文字\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/toast?tab=api#toast-props)" + }, + "t-toast/overlay-props": { + "type": "Object", + "description": "遮罩层属性,透传至 Overlay\n\ndefault: {}\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/toast?tab=api#toast-props)" + }, + "t-toast/placement": { + "type": "String", + "options": [ + " top", + "middle", + "bottom" + ], + "description": "弹窗展示位置\n\ndefault: middle\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/toast?tab=api#toast-props)" + }, + "t-toast/prevent-scroll-through": { + "type": "Boolean", + "description": "防止滚动穿透,即不允许点击和滚动\n\ndefault: false\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/toast?tab=api#toast-props)" + }, + "t-toast/show-overlay": { + "type": "Boolean", + "description": "是否显示遮罩层\n\ndefault: false\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/toast?tab=api#toast-props)" + }, + "t-toast/theme": { + "type": "String", + "options": [ + "loading", + "success", + "fail" + ], + "description": "提示类型\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/toast?tab=api#toast-props)" + }, + "t-tree-select/clearable": { + "type": "Boolean", + "description": "是否允许清空\n\ndefault: false\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/tree-select?tab=api#treeselect-props)" + }, + "t-tree-select/filterable": { + "type": "Boolean", + "description": "是否可搜索\n\ndefault: false\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/tree-select?tab=api#treeselect-props)" + }, + "t-tree-select/multiple": { + "type": "Boolean", + "description": "是否允许多选\n\ndefault: false\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/tree-select?tab=api#treeselect-props)" + }, + "t-tree-select/placeholder": { + "type": "String", + "description": "占位符\n\ndefault: undefined\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/tree-select?tab=api#treeselect-props)" + }, + "t-tree-select/select-input-props": { + "type": "Object", + "description": "【开发中】透传 SelectInput 筛选器输入框组件的全部属性\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/tree-select?tab=api#treeselect-props)" + }, + "t-tree-select/size": { + "type": "String", + "options": [ + "small", + "medium", + "large" + ], + "description": "尺寸\n\ndefault: medium\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/tree-select?tab=api#treeselect-props)" + }, + "t-tree-select/tag-props": { + "type": "Object", + "description": "【开发中】透传 Tag 标签组件全部属性\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/tree-select?tab=api#treeselect-props)" + }, + "t-tree-select/value": { + "type": "String|Number|Object|Array", + "description": "选中值\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/tree-select?tab=api#treeselect-props)" + }, + "t-upload/accept": { + "type": "String", + "description": "接受上传的文件类型,[查看 W3C示例](https://www.w3schools.com/tags/att_input_accept.asp),[查看 MDN 示例](https://developer.mozilla.org/zh-CN/docs/Web/HTML/Element/Input/file)\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/upload?tab=api#upload-props)" + }, + "t-upload/action": { + "type": "String", + "description": "upload action url\n\n上传接口。设接口响应数据为字段 `response`,那么 `response.error` 存在时会判断此次上传失败,并显示错误文本信息;`response.url` 会作为文件上传成功后的地址,并使用该地址显示图片\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/upload?tab=api#upload-props)" + }, + "t-upload/allow-upload-duplicate-file": { + "type": "Boolean", + "description": "是否允许重复上传相同文件名的文件\n\ndefault: false\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/upload?tab=api#upload-props)" + }, + "t-upload/auto-upload": { + "type": "Boolean", + "description": "是否选取文件后自动上传\n\ndefault: true\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/upload?tab=api#upload-props)" + }, + "t-upload/before-all-files-upload": { + "type": "Function", + "description": "before all files upload, return false can stop upload continue\n\n全部文件上传之前的钩子,参数为上传的文件,返回值决定是否继续上传,若返回值为 `false` 则终止上传\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/upload?tab=api#upload-props)" + }, + "t-upload/before-upload": { + "type": "Function", + "description": "单文件上传之前的钩子,参数为上传的文件,返回值决定是否继续上传,若返回值为 `false` 则终止上传\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/upload?tab=api#upload-props)" + }, + "t-upload/data": { + "type": "Object", + "description": "上传文件时所需的额外数据\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/upload?tab=api#upload-props)" + }, + "t-upload/delete-btn": { + "type": "String|TNode", + "description": "删除图标。值为空,使用默认图标渲染;值为 slot 则表示使用插槽渲染;其他值无效。\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/upload?tab=api#upload-props)" + }, + "t-upload/disabled": { + "type": "Boolean", + "description": "是否禁用\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/upload?tab=api#upload-props)" + }, + "t-upload/file-list-display": { + "type": "TNode", + "description": "用于完全自定义文件列表内容\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/upload?tab=api#upload-props)" + }, + "t-upload/files": { + "type": "Array", + "description": "已上传文件列表,同 `value`\n\ndefault: []\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/upload?tab=api#upload-props)" + }, + "t-upload/format": { + "type": "Function", + "description": "文件上传前转换文件的数据结构,可新增或修改文件对象的属性\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/upload?tab=api#upload-props)" + }, + "t-upload/format-request": { + "type": "Function", + "description": "用于新增或修改文件上传请求参数\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/upload?tab=api#upload-props)" + }, + "t-upload/format-response": { + "type": "Function", + "description": "用于格式化文件上传后的接口响应数据,`response` 便是接口响应的原始数据。
此函数的返回值 `error` 或 `response.error` 会作为错误文本提醒,如果存在会判定为本次上传失败。
此函数的返回值 `url` 或 `response.url` 会作为上传成功后的链接\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/upload?tab=api#upload-props)" + }, + "t-upload/grid-config": { + "type": "Object", + "description": "upload组件每行上传图片列数以及图片的宽度和高度\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/upload?tab=api#upload-props)" + }, + "t-upload/headers": { + "type": "Object", + "description": "设置上传的请求头部\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/upload?tab=api#upload-props)" + }, + "t-upload/image-props": { + "type": "Object", + "description": "透传 Image 组件全部属性\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/upload?tab=api#upload-props)" + }, + "t-upload/max": { + "type": "Number", + "description": "用于控制文件上传数量,值为 0 则不限制\n\ndefault: 0\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/upload?tab=api#upload-props)" + }, + "t-upload/method": { + "type": "String", + "options": [ + "POST", + "GET", + "PUT", + "OPTION", + "PATCH", + "post", + "get", + "put", + "option", + "patch" + ], + "description": "HTTP 请求类型\n\ndefault: POST\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/upload?tab=api#upload-props)" + }, + "t-upload/multiple": { + "type": "Boolean", + "description": "是否支持多选文件\n\ndefault: false\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/upload?tab=api#upload-props)" + }, + "t-upload/request-method": { + "type": "Function", + "description": "自定义上传方法。返回值 `status` 表示上传成功或失败,`error` 或 `response.error` 表示上传失败的原因,`response` 表示请求上传成功后的返回数据,`response.url` 表示上传成功后的图片地址。示例一:`{ status: 'fail', error: '上传失败', response }`。示例二:`{ status: 'success', response: { url: 'https://tdesign.gtimg.com/site/avatar.jpg' } }`\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/upload?tab=api#upload-props)" + }, + "t-upload/show-upload-progress": { + "type": "Boolean", + "description": "是否显示上传进度\n\ndefault: true\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/upload?tab=api#upload-props)" + }, + "t-upload/size-limit": { + "type": "Number|Object", + "description": "图片文件大小限制,单位 KB。可选单位有:`'B' | 'KB' | 'MB' | 'GB'`。示例一:`1000`。示例二:`{ size: 2, unit: 'MB', message: '图片大小不超过 {sizeLimit} MB' }`\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/upload?tab=api#upload-props)" + }, + "t-upload/trigger": { + "type": "TNode", + "description": "触发上传的元素,`files` 指本次显示的全部文件\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/upload?tab=api#upload-props)" + }, + "t-upload/use-mock-progress": { + "type": "Boolean", + "description": "是否在请求时间超过 300ms 后显示模拟进度。上传进度有模拟进度和真实进度两种。一般大小的文件上传,真实的上传进度只有 0 和 100,不利于交互呈现,因此组件内置模拟上传进度。真实上传进度一般用于大文件上传。\n\ndefault: true\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/upload?tab=api#upload-props)" + }, + "t-upload/with-credentials": { + "type": "Boolean", + "description": "上传请求时是否携带 cookie\n\ndefault: false\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/upload?tab=api#upload-props)" + }, + "t-upload/cancel-upload": { + "type": "event", + "description": "点击「取消上传」时触发\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/upload?tab=api#upload-events)" + }, + "t-upload/change": { + "type": "event", + "description": "已上传文件列表发生变化时触发,`trigger` 表示触发本次的来源\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/upload?tab=api#upload-events)" + }, + "t-upload/fail": { + "type": "event", + "description": "`response.error` used for error tips, `formatResponse` can format `response`\n\n上传失败后触发。`response` 指接口响应结果,`response.error` 会作为错误文本提醒。如果希望判定为上传失败,但接口响应数据不包含 `error` 字段,可以使用 `formatResponse` 格式化 `response` 数据结构。如果是多文件多请求上传场景,请到事件 `onOneFileFail` 中查看 `response`\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/upload?tab=api#upload-events)" + }, + "t-upload/one-file-fail": { + "type": "event", + "description": "trigger on one file upload failed\n\n多文件/图片场景下,单个文件上传失败后触发,如果一个请求上传一个文件,则会触发多次。单文件/图片不会触发\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/upload?tab=api#upload-events)" + }, + "t-upload/one-file-success": { + "type": "event", + "description": "单个文件上传成功后触发,在多文件场景下会触发多次。`context.file` 表示当前上传成功的单个文件,`context.response` 表示上传请求的返回数据\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/upload?tab=api#upload-events)" + }, + "t-upload/preview": { + "type": "event", + "description": "点击图片预览时触发,文件没有预览\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/upload?tab=api#upload-events)" + }, + "t-upload/progress": { + "type": "event", + "description": "上传进度变化时触发,真实进度和模拟进度都会触发。`type=real` 表示真实上传进度,`type=mock` 表示模拟上传进度\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/upload?tab=api#upload-events)" + }, + "t-upload/remove": { + "type": "event", + "description": "移除文件时触发\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/upload?tab=api#upload-events)" + }, + "t-upload/select-change": { + "type": "event", + "description": "trigger after file choose and before upload\n\n选择文件或图片之后,上传之前,触发该事件\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/upload?tab=api#upload-events)" + }, + "t-upload/success": { + "type": "event", + "description": "上传成功后触发。
`context.currentFiles` 表示当次请求上传的文件,`context.fileList` 表示上传成功后的文件,`context.response` 表示上传请求的返回数据。
`context.results` 表示单次选择全部文件上传成功后的响应结果,可以在这个字段存在时提醒用户上传成功或失败。
\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/upload?tab=api#upload-events)" + }, + "t-upload/validate": { + "type": "event", + "description": "trigger on length over limit, or trigger on file size over limit\n\n文件上传校验结束事件,有文件数量超出时会触发,文件大小超出限制、文件同名时会触发等场景。注意如果设置允许上传同名文件,则此事件不会触发\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/upload?tab=api#upload-events)" + }, + "t-upload/waiting-upload-files-change": { + "type": "event", + "description": "trigger on waiting upload files changed\n\n待上传文件列表发生变化时触发。`context.files` 表示事件参数为待上传文件,`context.trigger` 引起此次变化的触发来源\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/upload?tab=api#upload-events)" + }, + "t-watermark/alpha": { + "type": "Number", + "description": "水印整体透明度,取值范围 [0-1]\n\ndefault: 1\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/watermark?tab=api#watermark-props)" + }, + "t-watermark/content": { + "type": "String|TNode", + "description": "水印所覆盖的内容节点\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/watermark?tab=api#watermark-props)" + }, + "t-watermark/default": { + "type": "String|TNode", + "description": "水印所覆盖的内容节点,同 `content`\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/watermark?tab=api#watermark-props)" + }, + "t-watermark/height": { + "type": "Number", + "description": "水印高度\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/watermark?tab=api#watermark-props)" + }, + "t-watermark/is-repeat": { + "type": "Boolean", + "description": "水印是否重复出现\n\ndefault: true\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/watermark?tab=api#watermark-props)" + }, + "t-watermark/line-space": { + "type": "Number", + "description": "行间距,只作用在多行(`content` 配置为数组)情况下\n\ndefault: 16\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/watermark?tab=api#watermark-props)" + }, + "t-watermark/movable": { + "type": "Boolean", + "description": "水印是否可移动\n\ndefault: false\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/watermark?tab=api#watermark-props)" + }, + "t-watermark/move-interval": { + "type": "Number", + "description": "水印发生运动位移的间隙,单位:毫秒\n\ndefault: 3000\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/watermark?tab=api#watermark-props)" + }, + "t-watermark/offset": { + "type": "Array", + "description": "水印在画布上绘制的水平和垂直偏移量,正常情况下水印绘制在中间位置,即 `offset = [gapX / 2, gapY / 2]`\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/watermark?tab=api#watermark-props)" + }, + "t-watermark/removable": { + "type": "Boolean", + "description": "水印是否可被删除,默认会开启水印节点防删\n\ndefault: true\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/watermark?tab=api#watermark-props)" + }, + "t-watermark/rotate": { + "type": "Number", + "description": "水印旋转的角度,单位 °\n\ndefault: -22\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/watermark?tab=api#watermark-props)" + }, + "t-watermark/watermark-content": { + "type": "Object|Array", + "description": "水印内容,需要显示多行情况下可配置为数组\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/watermark?tab=api#watermark-props)" + }, + "t-watermark/width": { + "type": "Number", + "description": "水印宽度\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/watermark?tab=api#watermark-props)" + }, + "t-watermark/x": { + "type": "Number", + "description": "水印之间的水平间距\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/watermark?tab=api#watermark-props)" + }, + "t-watermark/y": { + "type": "Number", + "description": "水印之间的垂直间距\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/watermark?tab=api#watermark-props)" + }, + "t-watermark/z-index": { + "type": "Number", + "description": "水印元素的 `z-index`,默认值写在 CSS 中\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/watermark?tab=api#watermark-props)" + } +} \ No newline at end of file diff --git a/helper/tags.json b/helper/tags.json new file mode 100644 index 000000000..fdce9563d --- /dev/null +++ b/helper/tags.json @@ -0,0 +1,1093 @@ +{ + "t-action-sheet": { + "attributes": [ + "cancel-text", + "count", + "items", + "show-cancel", + "theme", + "visible", + "cancel", + "close", + "selected" + ], + "description": "ActionSheet\n\n动作面板\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/action-sheet)" + }, + "t-avatar": { + "attributes": [ + "alt", + "badge-props", + "hide-on-load-failed", + "icon", + "image", + "image-props", + "shape", + "size", + "error" + ], + "description": "Avatar\n\n头像\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/avatar)" + }, + "t-avatar-group": { + "attributes": [ + "cascading", + "collapse-avatar", + "max", + "size" + ], + "description": "AvatarGroup\n\n头像组\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/avatar-group)" + }, + "t-back-top": { + "attributes": [ + "fixed", + "icon", + "target", + "text", + "theme", + "to-top" + ], + "description": "BackTop\n\n回到顶部\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/back-top)" + }, + "t-badge": { + "attributes": [ + "color", + "content", + "count", + "dot", + "max-count", + "offset", + "shape", + "show-zero", + "size" + ], + "description": "Badge\n\n徽标数\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/badge)" + }, + "t-button": { + "attributes": [ + "block", + "content", + "disabled", + "ghost", + "href", + "icon", + "loading", + "shape", + "size", + "tag", + "theme", + "variant", + "click" + ], + "description": "Button\n\n按钮\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/button)" + }, + "t-calendar": { + "attributes": [ + "confirm-btn", + "first-day-of-week", + "max-date", + "min-date", + "title", + "type", + "value", + "visible" + ], + "description": "Calendar\n\n日历\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/calendar)" + }, + "t-cascader": { + "attributes": [ + "close-btn", + "options", + "title", + "value", + "visible" + ], + "description": "Cascader\n\n级联选择\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/cascader)" + }, + "t-cell": { + "attributes": [ + "align", + "arrow", + "bordered", + "description", + "hover", + "image", + "left-icon", + "note", + "required", + "right-icon", + "title", + "click" + ], + "description": "Cell\n\n单元格\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/cell)" + }, + "t-cell-group": { + "attributes": [ + "bordered", + "title" + ], + "description": "CellGroup\n\n单元格组\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/cell-group)" + }, + "t-check-tag": { + "attributes": [ + "checked", + "closable", + "content", + "disabled", + "icon", + "shape", + "size", + "change", + "click" + ], + "description": "CheckTag\n\n可选标签\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/check-tag)" + }, + "t-checkbox": { + "attributes": [ + "align", + "check-all", + "checked", + "content", + "content-disabled", + "default", + "disabled", + "icon", + "indeterminate", + "label", + "max-content-row", + "max-label-row", + "name", + "readonly", + "value", + "change" + ], + "description": "Checkbox\n\n多选框\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/checkbox)" + }, + "t-checkbox-group": { + "attributes": [ + "disabled", + "max", + "name", + "options", + "value", + "change" + ], + "description": "CheckboxGroup\n\n多选框组\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/checkbox-group)" + }, + "t-collapse": { + "attributes": [ + "default-expand-all", + "disabled", + "expand-icon", + "expand-mutex", + "value", + "change" + ], + "description": "Collapse\n\n折叠\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/collapse)" + }, + "t-collapse-panel": { + "attributes": [ + "content", + "default", + "destroy-on-collapse", + "disabled", + "expand-icon", + "header", + "header-right-content", + "value" + ], + "description": "CollapsePanel\n\n折叠面板\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/collapse-panel)" + }, + "t-comment": { + "attributes": [ + "actions", + "author", + "avatar", + "content", + "datetime", + "quote", + "reply" + ], + "description": "Comment\n\n评论\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/comment)" + }, + "t-count-down": { + "attributes": [ + "auto-start", + "content", + "format", + "millisecond", + "size", + "split-with-unit", + "theme", + "time", + "change", + "finish" + ], + "description": "CountDown\n\n倒计时\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/count-down)" + }, + "t-date-range-picker": { + "attributes": [ + "presets-placement", + "time-picker-props" + ], + "description": "DateRangePicker\n\n日期范围选择器\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/date-range-picker)" + }, + "t-date-time-picker": { + "attributes": [ + "cancel-btn", + "confirm-btn", + "end", + "footer", + "format", + "header", + "mode", + "render-label", + "show-week", + "start", + "title", + "value", + "cancel", + "change", + "confirm", + "pick" + ], + "description": "DateTimePicker\n\n日期时间选择器\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/date-time-picker)" + }, + "t-dialog": { + "attributes": [ + "actions", + "button-layout", + "cancel-btn", + "close-on-overlay-click", + "confirm-btn", + "content", + "destroy-on-close", + "overlay-props", + "prevent-scroll-through", + "show-in-attached-element", + "show-overlay", + "title", + "visible", + "width", + "z-index", + "cancel", + "close", + "confirm", + "overlay-click" + ], + "description": "Dialog\n\n对话框\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/dialog)" + }, + "t-divider": { + "attributes": [ + "align", + "content", + "dashed", + "default", + "layout", + "line-color" + ], + "description": "Divider\n\n分割线\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/divider)" + }, + "t-drawer": { + "attributes": [ + "attach", + "cancel-btn", + "close-btn", + "close-on-overlay-click", + "confirm-btn", + "destroy-on-close", + "items", + "mode", + "placement", + "show-overlay", + "size", + "visible", + "z-index", + "close", + "item-click", + "overlay-click" + ], + "description": "Drawer\n\n模态抽屉\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/drawer)" + }, + "t-dropdown-item": { + "attributes": [ + "disabled", + "keys", + "label", + "multiple", + "options", + "options-columns", + "options-layout", + "value", + "change", + "confirm" + ], + "description": "DropdownItem\n\n下拉菜单选项\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/dropdown-item)" + }, + "t-dropdown-menu": { + "attributes": [ + "active-color", + "close-on-click-overlay", + "duration", + "show-overlay", + "z-index" + ], + "description": "DropdownMenu\n\n下拉菜单\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/dropdown-menu)" + }, + "t-empty": { + "attributes": [ + "action", + "description", + "image" + ], + "description": "Empty\n\n空状态\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/empty)" + }, + "t-fab": { + "attributes": [ + "button-props", + "icon", + "style", + "text", + "click" + ], + "description": "Fab\n\n悬浮按钮\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/fab)" + }, + "t-form": { + "attributes": [ + "validate" + ], + "description": "Form\n\n表单\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/form)" + }, + "t-grid": { + "attributes": [ + "align", + "border", + "column", + "gutter" + ], + "description": "Grid\n\n栅格\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/grid)" + }, + "t-grid-item": { + "attributes": [ + "badge-props", + "description", + "image", + "image-props", + "layout", + "text" + ], + "description": "GridItem\n\n宫格子项\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/grid-item)" + }, + "t-icon-svg": { + "attributes": [ + "load-default-icons", + "name", + "size", + "style", + "url", + "click" + ], + "description": "IconSVG\n\n图标(IconSVG)\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/icon-svg)" + }, + "t-iconfont": { + "attributes": [ + "load-default-icons", + "name", + "size", + "style", + "tag", + "url", + "click" + ], + "description": "Iconfont\n\n图标(Iconfont)\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/iconfont)" + }, + "t-image": { + "attributes": [ + "alt", + "error", + "fit", + "lazy", + "loading", + "position", + "shape", + "src", + "error", + "load" + ], + "description": "Image\n\n图片\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/image)" + }, + "t-image-viewer": { + "attributes": [ + "close-btn", + "images", + "initial-index", + "max-zoom", + "show-index", + "visible", + "close", + "index-change" + ], + "description": "ImageViewer\n\n图片预览\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/image-viewer)" + }, + "t-indexes": { + "attributes": [ + "height", + "list", + "sticky", + "select" + ], + "description": "Indexes\n\n索引\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/indexes)" + }, + "t-input": { + "attributes": [ + "align", + "allow-input-over-max", + "autocomplete", + "autofocus", + "clearable", + "disabled", + "error-message", + "format", + "label", + "maxcharacter", + "maxlength", + "name", + "placeholder", + "prefix-icon", + "readonly", + "size", + "status", + "suffix", + "suffix-icon", + "tips", + "type", + "value", + "blur", + "change", + "clear", + "focus", + "validate" + ], + "description": "Input\n\n输入框\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/input)" + }, + "t-input-adornment": { + "attributes": [ + "append", + "prepend" + ], + "description": "InputAdornment\n\n输入装饰器\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/input-adornment)" + }, + "t-list": { + "attributes": [ + "async-loading", + "footer", + "header", + "load-more", + "scroll" + ], + "description": "List\n\n列表\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/list)" + }, + "t-loading": { + "attributes": [ + "default", + "delay", + "duration", + "indicator", + "inherit-color", + "layout", + "loading", + "pause", + "progress", + "reverse", + "size", + "theme" + ], + "description": "Loading\n\n加载中\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/loading)" + }, + "t-message": { + "attributes": [ + "align", + "close-btn", + "content", + "duration", + "marquee", + "theme", + "visible", + "z-index", + "change", + "close", + "closed", + "open", + "opened" + ], + "description": "Message\n\n全局提醒\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/message)" + }, + "t-navbar": { + "attributes": [ + "animation", + "background", + "fixed", + "left", + "left-arrow", + "right", + "title", + "title-max-length", + "visible", + "left-click", + "right-click" + ], + "description": "Navbar\n\n导航条\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/navbar)" + }, + "t-notice-bar": { + "attributes": [ + "content", + "extra", + "marquee", + "prefix-icon", + "suffix-icon", + "theme", + "visible", + "change", + "click" + ], + "description": "NoticeBar\n\n公告栏\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/notice-bar)" + }, + "t-overlay": { + "attributes": [ + "duration", + "prevent-scroll-through", + "transparent", + "visible", + "z-index", + "click" + ], + "description": "Overlay\n\n遮罩层\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/overlay)" + }, + "t-pagination": { + "attributes": [ + "show-first-and-last-page-btn", + "show-page-number", + "show-page-size", + "show-previous-and-next-btn" + ], + "description": "Pagination\n\n分页\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/pagination)" + }, + "t-picker": { + "attributes": [ + "cancel-btn", + "columns", + "confirm-btn", + "footer", + "header", + "render-label", + "title", + "value", + "visible", + "cancel", + "change", + "confirm", + "pick" + ], + "description": "Picker\n\n选择器\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/picker)" + }, + "t-popconfirm": { + "attributes": [ + "content", + "default", + "destroy-on-close", + "trigger-element" + ], + "description": "Popconfirm\n\n气泡确认框\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/popconfirm)" + }, + "t-popup": { + "attributes": [ + "close-on-overlay-click", + "custom-style", + "lock-scroll", + "overlay-props", + "placement", + "show-overlay", + "to", + "transition-name", + "visible", + "z-index", + "close", + "closed", + "open", + "opened", + "visible-change" + ], + "description": "Popup\n\n气泡框\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/popup)" + }, + "t-progress": { + "attributes": [ + "color", + "label", + "percentage", + "status", + "stroke-width", + "theme", + "track-color" + ], + "description": "Progress\n\n进度条\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/progress)" + }, + "t-pull-down-refresh": { + "attributes": [ + "loading-bar-height", + "loading-props", + "loading-texts", + "max-bar-height", + "refresh-timeout", + "value", + "change", + "refresh", + "timeout" + ], + "description": "PullDownRefresh\n\n下拉刷新\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/pull-down-refresh)" + }, + "t-radio": { + "attributes": [ + "align", + "checked", + "content", + "content-disabled", + "default", + "disabled", + "icon", + "label", + "name", + "value", + "change" + ], + "description": "Radio\n\n单选框\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/radio)" + }, + "t-radio-group": { + "attributes": [ + "disabled", + "name", + "options", + "value", + "change" + ], + "description": "RadioGroup\n\n单选框组\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/radio-group)" + }, + "t-range-input": { + "attributes": [ + "active-index", + "clearable", + "disabled", + "format", + "input-props", + "label", + "placeholder", + "prefix-icon", + "readonly", + "separator", + "status", + "suffix", + "suffix-icon", + "tips", + "value", + "blur", + "change", + "clear", + "click", + "enter", + "focus" + ], + "description": "RangeInput\n\n范围输入框\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/range-input)" + }, + "t-range-input-popup": { + "attributes": [ + "status", + "tips" + ], + "description": "RangeInputPopup\n\n范围输入框触发器\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/range-input-popup)" + }, + "t-rate": { + "attributes": [ + "allow-half", + "clearable", + "color", + "count", + "disabled", + "gap", + "icon", + "show-text", + "size", + "texts", + "value", + "variant", + "change" + ], + "description": "Rate\n\n评分\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/rate)" + }, + "t-result": { + "attributes": [ + "description", + "title" + ], + "description": "Result\n\n结果\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/result)" + }, + "t-search": { + "attributes": [ + "action", + "autocomplete-options", + "autofocus", + "center", + "clearable", + "disabled", + "filter", + "label", + "placeholder", + "prefix-icon", + "readonly", + "shape", + "suffix", + "suffix-icon", + "value", + "action-click", + "blur", + "change", + "clear", + "focus", + "search", + "submit" + ], + "description": "Search\n\n搜索\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/search)" + }, + "t-segmented-control": { + "attributes": [ + "items", + "value", + "change" + ], + "description": "SegmentedControl\n\n分段器\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/segmented-control)" + }, + "t-select": { + "attributes": [ + "select-input-props", + "tag-input-props", + "tag-props" + ], + "description": "Select\n\n选择器\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/select)" + }, + "t-skeleton": { + "attributes": [ + "animation", + "content", + "default", + "delay", + "loading", + "row-col", + "theme" + ], + "description": "Skeleton\n\n骨架屏\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/skeleton)" + }, + "t-slider": { + "attributes": [ + "disabled", + "label", + "marks", + "max", + "min", + "range", + "show-extreme-value", + "step", + "value", + "change", + "dragend", + "dragstart" + ], + "description": "Slider\n\n滑块\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/slider)" + }, + "t-space": { + "attributes": [ + "align", + "break-line", + "direction", + "separator", + "size" + ], + "description": "Space\n\n间距\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/space)" + }, + "t-step-item": { + "attributes": [ + "content", + "icon", + "status", + "title" + ], + "description": "StepItem\n\n步骤\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/step-item)" + }, + "t-stepper": { + "attributes": [ + "disable-input", + "disabled", + "input-width", + "max", + "min", + "step", + "theme", + "value", + "blur", + "change", + "overlimit" + ], + "description": "Stepper\n\n步进器\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/stepper)" + }, + "t-steps": { + "attributes": [ + "current", + "layout", + "options", + "readonly", + "separator", + "theme", + "change" + ], + "description": "Steps\n\n步骤条\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/steps)" + }, + "t-sticky": { + "attributes": [ + "container", + "disabled", + "offset-top", + "z-index", + "scroll" + ], + "description": "Sticky\n\n吸顶容器\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/sticky)" + }, + "t-swipe-cell": { + "attributes": [ + "content", + "default", + "disabled", + "expanded", + "left", + "right", + "change", + "click" + ], + "description": "SwipeCell\n\n滑动操作\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/swipe-cell)" + }, + "t-swiper": { + "attributes": [ + "animation", + "autoplay", + "current", + "direction", + "duration", + "height", + "interval", + "loop", + "navigation", + "pagination-position", + "change" + ], + "description": "Swiper\n\n轮播\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/swiper)" + }, + "t-switch": { + "attributes": [ + "colors", + "custom-value", + "disabled", + "label", + "value", + "change" + ], + "description": "Switch\n\n开关\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/switch)" + }, + "t-tab-bar": { + "attributes": [ + "bordered", + "fixed", + "value", + "change" + ], + "description": "TabBar\n\n标签栏\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/tab-bar)" + }, + "t-tab-bar-item": { + "attributes": [ + "badge-props", + "icon", + "sub-tab-bar", + "value" + ], + "description": "TabBarItem\n\n标签栏选项\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/tab-bar-item)" + }, + "t-tab-panel": { + "attributes": [ + "destroy-on-hide", + "disabled", + "label", + "panel", + "value" + ], + "description": "TabPanel\n\n选项卡面板\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/tab-panel)" + }, + "t-tabs": { + "attributes": [ + "animation", + "list", + "placement", + "show-bottom-line", + "size", + "space-evenly", + "sticky-props", + "swipeable", + "value", + "change" + ], + "description": "Tabs\n\n选项卡\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/tabs)" + }, + "t-tag": { + "attributes": [ + "closable", + "content", + "disabled", + "icon", + "max-width", + "shape", + "size", + "theme", + "variant", + "click", + "close" + ], + "description": "Tag\n\n标签\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/tag)" + }, + "t-textarea": { + "attributes": [ + "allow-input-over-max", + "autofocus", + "autosize", + "disabled", + "label", + "maxcharacter", + "maxlength", + "name", + "placeholder", + "value", + "blur", + "change", + "focus" + ], + "description": "Textarea\n\n文本输入框\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/textarea)" + }, + "t-time-line": { + "attributes": [ + "label-align", + "layout", + "mode", + "reverse", + "theme" + ], + "description": "TimeLine\n\n时间轴\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/time-line)" + }, + "t-time-line-item": { + "attributes": [ + "content", + "dot", + "dot-color", + "label", + "label-align" + ], + "description": "TimeLineItem\n\n时间轴\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/time-line-item)" + }, + "t-time-range-picker": { + "attributes": [ + "focus" + ], + "description": "TimeRangePicker\n\n时间范围选择器\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/time-range-picker)" + }, + "t-toast": { + "attributes": [ + "direction", + "duration", + "icon", + "message", + "overlay-props", + "placement", + "prevent-scroll-through", + "show-overlay", + "theme" + ], + "description": "Toast\n\n轻提示\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/toast)" + }, + "t-tree-select": { + "attributes": [ + "clearable", + "filterable", + "multiple", + "placeholder", + "select-input-props", + "size", + "tag-props", + "value" + ], + "description": "TreeSelect\n\n树选择\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/tree-select)" + }, + "t-upload": { + "attributes": [ + "accept", + "action", + "allow-upload-duplicate-file", + "auto-upload", + "before-all-files-upload", + "before-upload", + "data", + "delete-btn", + "disabled", + "file-list-display", + "files", + "format", + "format-request", + "format-response", + "grid-config", + "headers", + "image-props", + "max", + "method", + "multiple", + "request-method", + "show-upload-progress", + "size-limit", + "trigger", + "use-mock-progress", + "with-credentials", + "cancel-upload", + "change", + "fail", + "one-file-fail", + "one-file-success", + "preview", + "progress", + "remove", + "select-change", + "success", + "validate", + "waiting-upload-files-change" + ], + "description": "Upload\n\n上传\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/upload)" + }, + "t-watermark": { + "attributes": [ + "alpha", + "content", + "default", + "height", + "is-repeat", + "line-space", + "movable", + "move-interval", + "offset", + "removable", + "rotate", + "watermark-content", + "width", + "x", + "y", + "z-index" + ], + "description": "Watermark\n\n水印\n\n[docs](https://tdesign.tencent.com/mobile-vue/components/watermark)" + } +} \ No newline at end of file diff --git a/helper/web-types.json b/helper/web-types.json new file mode 100644 index 000000000..dc74b4b2d --- /dev/null +++ b/helper/web-types.json @@ -0,0 +1,7815 @@ +{ + "$schema": "http://json.schemastore.org/web-types", + "framework": "vue", + "name": "tdesign-mobile-vue", + "js-types-syntax": "typescript", + "description-markup": "markdown", + "contributions": { + "html": { + "vue-components": [ + { + "name": "t-action-sheet", + "source": { + "symbol": "ActionSheet" + }, + "description": "ActionSheet\n\n动作面板", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/action-sheet", + "props": [ + { + "name": "cancel-text", + "description": "设置取消按钮的文本", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/action-sheet?tab=api#actionsheet-props", + "type": [ + "String" + ] + }, + { + "name": "count", + "description": "设置每页展示菜单的数量,仅当 type=grid 时有效", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/action-sheet?tab=api#actionsheet-props", + "type": [ + "Number" + ], + "default": "8" + }, + { + "name": "items", + "description": "菜单项", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/action-sheet?tab=api#actionsheet-props", + "type": [ + "Array" + ] + }, + { + "name": "show-cancel", + "description": "是否显示取消按钮", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/action-sheet?tab=api#actionsheet-props", + "type": [ + "Boolean" + ], + "default": "true" + }, + { + "name": "theme", + "description": "展示类型,列表和表格形式展示", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/action-sheet?tab=api#actionsheet-props", + "type": [ + "String" + ], + "default": "list", + "attribute-value": { + "type": "enum" + }, + "values": [ + { + "name": "list" + }, + { + "name": "grid" + } + ] + }, + { + "name": "visible", + "description": "显示与隐藏", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/action-sheet?tab=api#actionsheet-props", + "type": [ + "Boolean" + ], + "default": "false" + } + ], + "js": { + "events": [ + { + "name": "cancel", + "description": "点击取消按钮时触发", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/action-sheet?tab=api#actionsheet-events" + }, + { + "name": "close", + "description": "关闭时触发", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/action-sheet?tab=api#actionsheet-events" + }, + { + "name": "selected", + "description": "选择菜单项时触发", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/action-sheet?tab=api#actionsheet-events" + } + ] + } + }, + { + "name": "t-avatar", + "source": { + "symbol": "Avatar" + }, + "description": "Avatar\n\n头像", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/avatar", + "props": [ + { + "name": "alt", + "description": "show it when url is not valid\n\n头像替换文本,仅当图片加载失败时有效", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/avatar?tab=api#avatar-props", + "type": [ + "String" + ] + }, + { + "name": "badge-props", + "description": "头像右上角提示信息,继承 Badge 组件的全部特性。如:小红点,或者数字", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/avatar?tab=api#avatar-props", + "type": [ + "Object" + ] + }, + { + "name": "hide-on-load-failed", + "description": "hide image when loading image failed\n\n加载失败时隐藏图片", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/avatar?tab=api#avatar-props", + "type": [ + "Boolean" + ], + "default": "false" + }, + { + "name": "icon", + "description": "use icon to fill\n\n图标", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/avatar?tab=api#avatar-props", + "type": [ + "TNode" + ] + }, + { + "name": "image", + "description": "images url\n\n图片地址", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/avatar?tab=api#avatar-props", + "type": [ + "String" + ] + }, + { + "name": "image-props", + "description": "透传至 Image 组件", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/avatar?tab=api#avatar-props", + "type": [ + "Object" + ] + }, + { + "name": "shape", + "description": "shape\n\n形状", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/avatar?tab=api#avatar-props", + "type": [ + "String" + ], + "default": "circle", + "attribute-value": { + "type": "enum" + }, + "values": [ + { + "name": "circle" + }, + { + "name": "round" + } + ] + }, + { + "name": "size", + "description": "size\n\n尺寸,示例值:small/medium/large/24px/38px 等,默认为 large", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/avatar?tab=api#avatar-props", + "type": [ + "String" + ] + } + ], + "js": { + "events": [ + { + "name": "error", + "description": "trigger on image load failed\n\n图片加载失败时触发", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/avatar?tab=api#avatar-events" + } + ] + } + }, + { + "name": "t-avatar-group", + "source": { + "symbol": "AvatarGroup" + }, + "description": "AvatarGroup\n\n头像组", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/avatar-group", + "props": [ + { + "name": "cascading", + "description": "multiple images cascading\n\n图片之间的层叠关系,可选值:左侧图片在上和右侧图片在上", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/avatar-group?tab=api#avatargroup-props", + "type": [ + "String" + ], + "default": "'right-up'", + "attribute-value": { + "type": "enum" + }, + "values": [ + { + "name": "left-up" + }, + { + "name": "right-up" + } + ] + }, + { + "name": "collapse-avatar", + "description": "头像数量超出时,会出现一个头像折叠元素。该元素内容可自定义。默认为 `+N`。示例:`+5`,`...`, `更多`", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/avatar-group?tab=api#avatargroup-props", + "type": [ + "String", + "TNode" + ] + }, + { + "name": "max", + "description": "能够同时显示的最多头像数量", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/avatar-group?tab=api#avatargroup-props", + "type": [ + "Number" + ] + }, + { + "name": "size", + "description": "size\n\n尺寸,示例值:small/medium/large/24px/38px 等。优先级低于 Avatar.size", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/avatar-group?tab=api#avatargroup-props", + "type": [ + "String" + ], + "default": "medium" + } + ] + }, + { + "name": "t-back-top", + "source": { + "symbol": "BackTop" + }, + "description": "BackTop\n\n回到顶部", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/back-top", + "props": [ + { + "name": "fixed", + "description": "是否绝对定位固定到屏幕右下方", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/back-top?tab=api#backtop-props", + "type": [ + "Boolean" + ], + "default": "true" + }, + { + "name": "icon", + "description": "图标", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/back-top?tab=api#backtop-props", + "type": [ + "TNode" + ], + "default": "'backtop'" + }, + { + "name": "target", + "description": "定位滚动到指定对象", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/back-top?tab=api#backtop-props", + "type": [ + "Function" + ] + }, + { + "name": "text", + "description": "文案", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/back-top?tab=api#backtop-props", + "type": [ + "String" + ], + "default": "''" + }, + { + "name": "theme", + "description": "预设的样式类型", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/back-top?tab=api#backtop-props", + "type": [ + "String" + ], + "default": "round", + "attribute-value": { + "type": "enum" + }, + "values": [ + { + "name": "round" + }, + { + "name": "half-round" + }, + { + "name": "round-dark" + }, + { + "name": "half-round-dark" + } + ] + } + ], + "js": { + "events": [ + { + "name": "to-top", + "description": "点击触发", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/back-top?tab=api#backtop-events" + } + ] + } + }, + { + "name": "t-badge", + "source": { + "symbol": "Badge" + }, + "description": "Badge\n\n徽标数", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/badge", + "props": [ + { + "name": "color", + "description": "颜色", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/badge?tab=api#badge-props", + "type": [ + "String" + ] + }, + { + "name": "content", + "description": "徽标内容", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/badge?tab=api#badge-props", + "type": [ + "String", + "TNode" + ] + }, + { + "name": "count", + "description": "徽标右上角内容。可以是数字,也可以是文字。如:'new'/3/99+", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/badge?tab=api#badge-props", + "type": [ + "String", + "Number", + "TNode" + ], + "default": "0" + }, + { + "name": "dot", + "description": "是否为红点", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/badge?tab=api#badge-props", + "type": [ + "Boolean" + ], + "default": "false" + }, + { + "name": "max-count", + "description": "封顶的数字值", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/badge?tab=api#badge-props", + "type": [ + "Number" + ], + "default": "99" + }, + { + "name": "offset", + "description": "设置状态点的位置偏移,示例:[-10, 20] 或 ['10em', '8rem']", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/badge?tab=api#badge-props", + "type": [ + "Array" + ] + }, + { + "name": "shape", + "description": "形状", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/badge?tab=api#badge-props", + "type": [ + "String" + ], + "default": "circle", + "attribute-value": { + "type": "enum" + }, + "values": [ + { + "name": "circle" + }, + { + "name": "round" + }, + { + "name": "ribbon" + } + ] + }, + { + "name": "show-zero", + "description": "当数值为 0 时,是否展示徽标", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/badge?tab=api#badge-props", + "type": [ + "Boolean" + ], + "default": "false" + }, + { + "name": "size", + "description": "尺寸", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/badge?tab=api#badge-props", + "type": [ + "String" + ], + "default": "medium", + "attribute-value": { + "type": "enum" + }, + "values": [ + { + "name": "small" + }, + { + "name": "medium" + } + ] + } + ] + }, + { + "name": "t-button", + "source": { + "symbol": "Button" + }, + "description": "Button\n\n按钮", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/button", + "props": [ + { + "name": "block", + "description": "make button to be a block-level element\n\n是否为块级元素", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/button?tab=api#button-props", + "type": [ + "Boolean" + ], + "default": "false" + }, + { + "name": "content", + "description": "button's children elements\n\n按钮内容", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/button?tab=api#button-props", + "type": [ + "String", + "TNode" + ] + }, + { + "name": "disabled", + "description": "disable the button, make it can not be clicked\n\n禁用状态", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/button?tab=api#button-props", + "type": [ + "Boolean" + ], + "default": "false" + }, + { + "name": "ghost", + "description": "make background-color to be transparent\n\n是否为幽灵按钮(镂空按钮)", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/button?tab=api#button-props", + "type": [ + "Boolean" + ], + "default": "false" + }, + { + "name": "href", + "description": "跳转地址。href 存在时,按钮标签默认使用 `
` 渲染;如果指定了 `tag` 则使用指定的标签渲染", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/button?tab=api#button-props", + "type": [ + "String" + ] + }, + { + "name": "icon", + "description": "use it to set left icon in button\n\n按钮内部图标,可完全自定义", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/button?tab=api#button-props", + "type": [ + "TNode" + ] + }, + { + "name": "loading", + "description": "set button to be loading state\n\n是否显示为加载状态", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/button?tab=api#button-props", + "type": [ + "Boolean" + ], + "default": "false" + }, + { + "name": "shape", + "description": "button shape\n\n按钮形状,有 4 种:长方形、正方形、圆角长方形、圆形", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/button?tab=api#button-props", + "type": [ + "String" + ], + "default": "rectangle", + "attribute-value": { + "type": "enum" + }, + "values": [ + { + "name": "rectangle" + }, + { + "name": "square" + }, + { + "name": "round" + }, + { + "name": "circle" + } + ] + }, + { + "name": "size", + "description": "a button has three size\n\n组件尺寸", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/button?tab=api#button-props", + "type": [ + "String" + ], + "default": "medium", + "attribute-value": { + "type": "enum" + }, + "values": [ + { + "name": "small" + }, + { + "name": "medium" + }, + { + "name": "large" + } + ] + }, + { + "name": "tag", + "description": "HTML Tag Element\n\n渲染按钮的 HTML 标签,默认使用标签 ` }`", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/slider?tab=api#slider-props", + "type": [ + "Object", + "Array" + ] + }, + { + "name": "max", + "description": "滑块范围最大值", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/slider?tab=api#slider-props", + "type": [ + "Number" + ], + "default": "100" + }, + { + "name": "min", + "description": "滑块范围最小值", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/slider?tab=api#slider-props", + "type": [ + "Number" + ], + "default": "0" + }, + { + "name": "range", + "description": "双游标滑块", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/slider?tab=api#slider-props", + "type": [ + "Boolean" + ], + "default": "false" + }, + { + "name": "show-extreme-value", + "description": "是否边界值", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/slider?tab=api#slider-props", + "type": [ + "Boolean" + ], + "default": "false" + }, + { + "name": "step", + "description": "步长", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/slider?tab=api#slider-props", + "type": [ + "Number" + ], + "default": "1" + }, + { + "name": "value", + "description": "滑块值", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/slider?tab=api#slider-props", + "type": [ + "Number", + "Array" + ], + "default": "0" + } + ], + "js": { + "events": [ + { + "name": "change", + "description": "滑块值变化时触发", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/slider?tab=api#slider-events" + }, + { + "name": "dragend", + "description": "结束拖动时触发", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/slider?tab=api#slider-events" + }, + { + "name": "dragstart", + "description": "开始拖动时触发", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/slider?tab=api#slider-events" + } + ] + } + }, + { + "name": "t-space", + "source": { + "symbol": "Space" + }, + "description": "Space\n\n间距", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/space", + "props": [ + { + "name": "align", + "description": "alignment\n\n对齐方式", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/space?tab=api#space-props", + "type": [ + "String" + ], + "attribute-value": { + "type": "enum" + }, + "values": [ + { + "name": "start" + }, + { + "name": "end" + }, + { + "name": "center" + }, + { + "name": "baseline" + } + ] + }, + { + "name": "break-line", + "description": "Whether to wrap, valid only in horizontal\n\n是否自动换行,仅在 horizontal 时有效\t", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/space?tab=api#space-props", + "type": [ + "Boolean" + ], + "default": "false" + }, + { + "name": "direction", + "description": "Spacing direction\n\n间距方向", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/space?tab=api#space-props", + "type": [ + "String" + ], + "default": "horizontal", + "attribute-value": { + "type": "enum" + }, + "values": [ + { + "name": "vertical" + }, + { + "name": "horizontal" + } + ] + }, + { + "name": "separator", + "description": "separator\n\n分隔符", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/space?tab=api#space-props", + "type": [ + "String", + "TNode" + ] + }, + { + "name": "size", + "description": "Spacing\n\n间距大小", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/space?tab=api#space-props", + "type": [ + "String", + "Number" + ], + "default": "medium", + "attribute-value": { + "type": "of-match" + }, + "values": [ + { + "name": "small" + }, + { + "name": "medium" + }, + { + "name": "large" + } + ] + } + ] + }, + { + "name": "t-step-item", + "source": { + "symbol": "StepItem" + }, + "description": "StepItem\n\n步骤", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/step-item", + "props": [ + { + "name": "content", + "description": "步骤描述", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/step-item?tab=api#stepitem-props", + "type": [ + "String", + "TNode" + ], + "default": "''" + }, + { + "name": "icon", + "description": "图标,默认显示内置图标,也可以自定义图标,值为 false 则不显示图标。优先级大于 `status` 定义的图标", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/step-item?tab=api#stepitem-props", + "type": [ + "Boolean", + "TNode" + ], + "default": "true" + }, + { + "name": "status", + "description": "当前步骤的状态:默认状态(未开始)、进行中状态、完成状态、错误状态", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/step-item?tab=api#stepitem-props", + "type": [ + "String" + ], + "default": "default", + "attribute-value": { + "type": "enum" + }, + "values": [ + { + "name": "default" + }, + { + "name": "process" + }, + { + "name": "finish" + }, + { + "name": "error" + } + ] + }, + { + "name": "title", + "description": "标题", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/step-item?tab=api#stepitem-props", + "type": [ + "String", + "TNode" + ], + "default": "''" + } + ] + }, + { + "name": "t-stepper", + "source": { + "symbol": "Stepper" + }, + "description": "Stepper\n\n步进器", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/stepper", + "props": [ + { + "name": "disable-input", + "description": "禁用输入框", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/stepper?tab=api#stepper-props", + "type": [ + "Boolean" + ], + "default": "false" + }, + { + "name": "disabled", + "description": "禁用全部操作", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/stepper?tab=api#stepper-props", + "type": [ + "Boolean" + ], + "default": "false" + }, + { + "name": "input-width", + "description": "输入框宽度", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/stepper?tab=api#stepper-props", + "type": [ + "Number" + ] + }, + { + "name": "max", + "description": "最大值", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/stepper?tab=api#stepper-props", + "type": [ + "Number" + ], + "default": "100" + }, + { + "name": "min", + "description": "最小值", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/stepper?tab=api#stepper-props", + "type": [ + "Number" + ], + "default": "0" + }, + { + "name": "step", + "description": "步长", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/stepper?tab=api#stepper-props", + "type": [ + "Number" + ], + "default": "1" + }, + { + "name": "theme", + "description": "stylish\n\n组件风格", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/stepper?tab=api#stepper-props", + "type": [ + "String" + ], + "default": "normal", + "attribute-value": { + "type": "enum" + }, + "values": [ + { + "name": "normal" + }, + { + "name": "grey" + } + ] + }, + { + "name": "value", + "description": "值", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/stepper?tab=api#stepper-props", + "type": [ + "String", + "Number" + ], + "default": "0" + } + ], + "js": { + "events": [ + { + "name": "blur", + "description": "输入框失去焦点时触发", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/stepper?tab=api#stepper-events" + }, + { + "name": "change", + "description": "数值发生变更时触发", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/stepper?tab=api#stepper-events" + }, + { + "name": "overlimit", + "description": "数值超出限制时触发", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/stepper?tab=api#stepper-events" + } + ] + } + }, + { + "name": "t-steps", + "source": { + "symbol": "Steps" + }, + "description": "Steps\n\n步骤条", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/steps", + "props": [ + { + "name": "current", + "description": "当前步骤,即整个步骤条进度。默认根据步骤下标判断步骤的完成状态,当前步骤为进行中,当前步骤之前的步骤为已完成,当前步骤之后的步骤为未开始。如果每个步骤没有设置 value,current 值为步骤长度则表示所有步骤已完成。如果每个步骤设置了自定义 value,则 current = 'FINISH' 表示所有状态完成", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/steps?tab=api#steps-props", + "type": [ + "String", + "Number" + ] + }, + { + "name": "layout", + "description": "步骤条方向,有两种:横向和纵向", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/steps?tab=api#steps-props", + "type": [ + "String" + ], + "default": "horizontal", + "attribute-value": { + "type": "enum" + }, + "values": [ + { + "name": "horizontal" + }, + { + "name": "vertical" + } + ] + }, + { + "name": "options", + "description": "步骤条数据列表(作用和 StepItem 效果一样)", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/steps?tab=api#steps-props", + "type": [ + "Array" + ] + }, + { + "name": "readonly", + "description": "只读状态", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/steps?tab=api#steps-props", + "type": [ + "Boolean" + ], + "default": "false" + }, + { + "name": "separator", + "description": "步骤条分割符", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/steps?tab=api#steps-props", + "type": [ + "String" + ], + "default": "line", + "attribute-value": { + "type": "enum" + }, + "values": [ + { + "name": "line" + }, + { + "name": "dashed" + }, + { + "name": "arrow" + } + ] + }, + { + "name": "theme", + "description": "步骤条风格", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/steps?tab=api#steps-props", + "type": [ + "String" + ], + "default": "default", + "attribute-value": { + "type": "enum" + }, + "values": [ + { + "name": "default" + }, + { + "name": "dot" + } + ] + } + ], + "js": { + "events": [ + { + "name": "change", + "description": "当前步骤发生变化时触发", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/steps?tab=api#steps-events" + } + ] + } + }, + { + "name": "t-sticky", + "source": { + "symbol": "Sticky" + }, + "description": "Sticky\n\n吸顶容器", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/sticky", + "props": [ + { + "name": "container", + "description": "指定滚动的容器。数据类型为 String 时,会被当作选择器处理,进行节点查询。示例:'body' 或 () => document.body", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/sticky?tab=api#sticky-props", + "type": [ + "String", + "Function" + ], + "default": "body" + }, + { + "name": "disabled", + "description": "是否禁用组件", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/sticky?tab=api#sticky-props", + "type": [ + "Boolean" + ], + "default": "false" + }, + { + "name": "offset-top", + "description": "吸顶时与顶部的距离,单位`px`", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/sticky?tab=api#sticky-props", + "type": [ + "String", + "Number" + ], + "default": "0" + }, + { + "name": "z-index", + "description": "吸顶时的 z-index", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/sticky?tab=api#sticky-props", + "type": [ + "Number" + ], + "default": "99" + } + ], + "js": { + "events": [ + { + "name": "scroll", + "description": "滚动时触发,scrollTop: 距离顶部位置,isFixed: 是否吸顶", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/sticky?tab=api#sticky-events" + } + ] + } + }, + { + "name": "t-swipe-cell", + "source": { + "symbol": "SwipeCell" + }, + "description": "SwipeCell\n\n滑动操作", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/swipe-cell", + "props": [ + { + "name": "content", + "description": "操作项以外的内容", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/swipe-cell?tab=api#swipecell-props", + "type": [ + "String", + "TNode" + ] + }, + { + "name": "default", + "description": "子内容,同 content", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/swipe-cell?tab=api#swipecell-props", + "type": [ + "String", + "TNode" + ] + }, + { + "name": "disabled", + "description": "是否禁用滑动", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/swipe-cell?tab=api#swipecell-props", + "type": [ + "Boolean" + ] + }, + { + "name": "expanded", + "description": "操作项是否呈现为打开态", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/swipe-cell?tab=api#swipecell-props", + "type": [ + "String" + ], + "attribute-value": { + "type": "enum" + }, + "values": [ + { + "name": "left" + }, + { + "name": "right" + } + ] + }, + { + "name": "left", + "description": "左侧滑动操作项。所有行为同 `right`", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/swipe-cell?tab=api#swipecell-props", + "type": [ + "Array", + "TNode" + ] + }, + { + "name": "right", + "description": "右侧滑动操作项。有两种定义方式,一种是使用数组,二种是使用插槽。`right.text` 表示操作文本,`right.className` 表示操作项类名,`right.style` 表示操作项样式,`right.onClick` 表示点击操作项后执行的回调函数。示例:`[{ text: '删除', style: 'background-color: red', onClick: () => {} }]`", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/swipe-cell?tab=api#swipecell-props", + "type": [ + "Array", + "TNode" + ] + } + ], + "js": { + "events": [ + { + "name": "change", + "description": "菜单展开或者收回后将菜单的状态传递给父组件,值为数组时表示分别控制左右滑动的展开和收起状态。", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/swipe-cell?tab=api#swipecell-events" + }, + { + "name": "click", + "description": "操作项点击时触发(插槽写法组件不触发,业务侧自定义内容和事件)", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/swipe-cell?tab=api#swipecell-events" + } + ] + } + }, + { + "name": "t-swiper", + "source": { + "symbol": "Swiper" + }, + "description": "Swiper\n\n轮播", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/swiper", + "props": [ + { + "name": "animation", + "description": "轮播切换动画效果类型", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/swiper?tab=api#swiper-props", + "type": [ + "String" + ], + "default": "slide", + "attribute-value": { + "type": "enum" + }, + "values": [ + { + "name": "slide" + } + ] + }, + { + "name": "autoplay", + "description": "是否自动播放", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/swiper?tab=api#swiper-props", + "type": [ + "Boolean" + ], + "default": "true" + }, + { + "name": "current", + "description": "当前轮播在哪一项(下标)", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/swiper?tab=api#swiper-props", + "type": [ + "Number" + ], + "default": "0" + }, + { + "name": "direction", + "description": "轮播滑动方向,包括横向滑动和纵向滑动两个方向", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/swiper?tab=api#swiper-props", + "type": [ + "String" + ], + "default": "horizontal", + "attribute-value": { + "type": "enum" + }, + "values": [ + { + "name": "horizontal" + }, + { + "name": "vertical" + } + ] + }, + { + "name": "duration", + "description": "滑动动画时长", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/swiper?tab=api#swiper-props", + "type": [ + "Number" + ], + "default": "300" + }, + { + "name": "height", + "description": "当使用垂直方向滚动时的高度", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/swiper?tab=api#swiper-props", + "type": [ + "Number" + ] + }, + { + "name": "interval", + "description": "轮播间隔时间", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/swiper?tab=api#swiper-props", + "type": [ + "Number" + ], + "default": "5000" + }, + { + "name": "loop", + "description": "是否循环播放", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/swiper?tab=api#swiper-props", + "type": [ + "Boolean" + ], + "default": "true" + }, + { + "name": "navigation", + "description": "导航器全部配置", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/swiper?tab=api#swiper-props", + "type": [ + "Object", + "TNode" + ] + }, + { + "name": "pagination-position", + "description": "页码信息展示位置", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/swiper?tab=api#swiper-props", + "type": [ + "String" + ], + "default": "bottom", + "attribute-value": { + "type": "enum" + }, + "values": [ + { + "name": "top-left" + }, + { + "name": "top" + }, + { + "name": "top-right" + }, + { + "name": "bottom-left" + }, + { + "name": "bottom" + }, + { + "name": "bottom-right" + } + ] + } + ], + "js": { + "events": [ + { + "name": "change", + "description": "轮播切换时触发", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/swiper?tab=api#swiper-events" + } + ] + } + }, + { + "name": "t-switch", + "source": { + "symbol": "Switch" + }, + "description": "Switch\n\n开关", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/switch", + "props": [ + { + "name": "colors", + "description": "自定义颜色,[打开时的颜色,关闭时的颜色]。组件默认颜色为 ['#0052d9', 'rgba(0, 0, 0, .26']。示例:[blue, gray]", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/switch?tab=api#switch-props", + "type": [ + "Array" + ] + }, + { + "name": "custom-value", + "description": "用于自定义开关的值,[打开时的值,关闭时的值]。默认为 [true, false]。示例:[1, 0]、['open', 'close']", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/switch?tab=api#switch-props", + "type": [ + "Array" + ], + "default": "[true, false]" + }, + { + "name": "disabled", + "description": "是否禁用组件", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/switch?tab=api#switch-props", + "type": [ + "Boolean" + ], + "default": "false" + }, + { + "name": "label", + "description": "开关的标签", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/switch?tab=api#switch-props", + "type": [ + "String" + ], + "default": "''" + }, + { + "name": "value", + "description": "开关值", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/switch?tab=api#switch-props", + "type": [ + "String", + "Number", + "Boolean" + ] + } + ], + "js": { + "events": [ + { + "name": "change", + "description": "数据发生变化时触发", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/switch?tab=api#switch-events" + } + ] + } + }, + { + "name": "t-tab-bar", + "source": { + "symbol": "TabBar" + }, + "description": "TabBar\n\n标签栏", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/tab-bar", + "props": [ + { + "name": "bordered", + "description": "是否显示外边框", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/tab-bar?tab=api#tabbar-props", + "type": [ + "Boolean" + ], + "default": "true" + }, + { + "name": "fixed", + "description": "是否固定在底部", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/tab-bar?tab=api#tabbar-props", + "type": [ + "Boolean" + ], + "default": "true" + }, + { + "name": "value", + "description": "当前选中标签的索引", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/tab-bar?tab=api#tabbar-props", + "type": [ + "String", + "Number", + "Array" + ], + "default": "undefined" + } + ], + "js": { + "events": [ + { + "name": "change", + "description": "选中标签切换时触发", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/tab-bar?tab=api#tabbar-events" + } + ] + } + }, + { + "name": "t-tab-bar-item", + "source": { + "symbol": "TabBarItem" + }, + "description": "TabBarItem\n\n标签栏选项", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/tab-bar-item", + "props": [ + { + "name": "badge-props", + "description": "图标右上角提示信息", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/tab-bar-item?tab=api#tabbaritem-props", + "type": [ + "Object" + ] + }, + { + "name": "icon", + "description": "图标名称", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/tab-bar-item?tab=api#tabbaritem-props", + "type": [ + "TNode" + ] + }, + { + "name": "sub-tab-bar", + "description": "二级菜单", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/tab-bar-item?tab=api#tabbaritem-props", + "type": [ + "Array" + ] + }, + { + "name": "value", + "description": "标识符", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/tab-bar-item?tab=api#tabbaritem-props", + "type": [ + "String", + "Number" + ] + } + ] + }, + { + "name": "t-tab-panel", + "source": { + "symbol": "TabPanel" + }, + "description": "TabPanel\n\n选项卡面板", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/tab-panel", + "props": [ + { + "name": "destroy-on-hide", + "description": "选项卡内容隐藏时是否销毁", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/tab-panel?tab=api#tabpanel-props", + "type": [ + "Boolean" + ], + "default": "true" + }, + { + "name": "disabled", + "description": "是否禁用当前选项卡", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/tab-panel?tab=api#tabpanel-props", + "type": [ + "Boolean" + ], + "default": "false" + }, + { + "name": "label", + "description": "选项卡名称,可自定义选项卡导航内容", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/tab-panel?tab=api#tabpanel-props", + "type": [ + "String", + "TNode" + ] + }, + { + "name": "panel", + "description": "用于自定义选项卡面板内容", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/tab-panel?tab=api#tabpanel-props", + "type": [ + "String", + "TNode" + ] + }, + { + "name": "value", + "description": "选项卡的值,唯一标识", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/tab-panel?tab=api#tabpanel-props", + "type": [ + "String", + "Number" + ] + } + ] + }, + { + "name": "t-tabs", + "source": { + "symbol": "Tabs" + }, + "description": "Tabs\n\n选项卡", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/tabs", + "props": [ + { + "name": "animation", + "description": "动画效果设置。其中 duration 表示动画时长", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/tabs?tab=api#tabs-props", + "type": [ + "Object" + ] + }, + { + "name": "list", + "description": "选项卡列表", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/tabs?tab=api#tabs-props", + "type": [ + "Array" + ] + }, + { + "name": "placement", + "description": "选项卡位置", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/tabs?tab=api#tabs-props", + "type": [ + "String" + ], + "default": "top", + "attribute-value": { + "type": "enum" + }, + "values": [ + { + "name": "left" + }, + { + "name": "top" + } + ] + }, + { + "name": "show-bottom-line", + "description": "是否展示底部激活线条", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/tabs?tab=api#tabs-props", + "type": [ + "Boolean" + ], + "default": "true" + }, + { + "name": "size", + "description": "组件尺寸", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/tabs?tab=api#tabs-props", + "type": [ + "String" + ], + "default": "medium", + "attribute-value": { + "type": "enum" + }, + "values": [ + { + "name": "medium" + }, + { + "name": "large" + } + ] + }, + { + "name": "space-evenly", + "description": "选项卡头部空间是否均分", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/tabs?tab=api#tabs-props", + "type": [ + "Boolean" + ], + "default": "true" + }, + { + "name": "sticky-props", + "description": "透传至 Sticky 组件", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/tabs?tab=api#tabs-props", + "type": [ + "Object" + ] + }, + { + "name": "swipeable", + "description": "是否可以滑动切换", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/tabs?tab=api#tabs-props", + "type": [ + "Boolean" + ], + "default": "true" + }, + { + "name": "value", + "description": "激活的选项卡值", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/tabs?tab=api#tabs-props", + "type": [ + "String", + "Number" + ] + } + ], + "js": { + "events": [ + { + "name": "change", + "description": "激活的选项卡发生变化时触发", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/tabs?tab=api#tabs-events" + } + ] + } + }, + { + "name": "t-tag", + "source": { + "symbol": "Tag" + }, + "description": "Tag\n\n标签", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/tag", + "props": [ + { + "name": "closable", + "description": "标签是否可关闭", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/tag?tab=api#tag-props", + "type": [ + "Boolean" + ], + "default": "false" + }, + { + "name": "content", + "description": "组件子元素", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/tag?tab=api#tag-props", + "type": [ + "String", + "Number", + "TNode" + ] + }, + { + "name": "disabled", + "description": "标签禁用态,失效标签不能触发事件。默认风格(theme=default)才有禁用态", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/tag?tab=api#tag-props", + "type": [ + "Boolean" + ], + "default": "false" + }, + { + "name": "icon", + "description": "标签中的图标,可自定义图标呈现", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/tag?tab=api#tag-props", + "type": [ + "TNode" + ], + "default": "undefined" + }, + { + "name": "max-width", + "description": "标签最大宽度,宽度超出后会出现省略号。示例:'50px' / 80", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/tag?tab=api#tag-props", + "type": [ + "String", + "Number" + ] + }, + { + "name": "shape", + "description": "标签类型,有三种:方形、圆角方形、标记型", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/tag?tab=api#tag-props", + "type": [ + "String" + ], + "default": "square", + "attribute-value": { + "type": "enum" + }, + "values": [ + { + "name": "square" + }, + { + "name": "round" + }, + { + "name": "mark" + } + ] + }, + { + "name": "size", + "description": "标签尺寸", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/tag?tab=api#tag-props", + "type": [ + "String" + ], + "default": "medium", + "attribute-value": { + "type": "enum" + }, + "values": [ + { + "name": "small" + }, + { + "name": "medium" + }, + { + "name": "large" + } + ] + }, + { + "name": "theme", + "description": "组件风格,用于描述组件不同的应用场景", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/tag?tab=api#tag-props", + "type": [ + "String" + ], + "default": "default", + "attribute-value": { + "type": "enum" + }, + "values": [ + { + "name": "default" + }, + { + "name": "primary" + }, + { + "name": "warning" + }, + { + "name": "danger" + }, + { + "name": "success" + } + ] + }, + { + "name": "variant", + "description": "标签风格变体", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/tag?tab=api#tag-props", + "type": [ + "String" + ], + "default": "dark", + "attribute-value": { + "type": "enum" + }, + "values": [ + { + "name": "dark" + }, + { + "name": "light" + }, + { + "name": "outline" + }, + { + "name": "light-outline" + } + ] + } + ], + "js": { + "events": [ + { + "name": "click", + "description": "点击时触发", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/tag?tab=api#tag-events" + }, + { + "name": "close", + "description": "如果关闭按钮存在,点击关闭按钮时触发", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/tag?tab=api#tag-events" + } + ] + } + }, + { + "name": "t-textarea", + "source": { + "symbol": "Textarea" + }, + "description": "Textarea\n\n文本输入框", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/textarea", + "props": [ + { + "name": "allow-input-over-max", + "description": "超出maxlength或maxcharacter之后是否还允许输入", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/textarea?tab=api#textarea-props", + "type": [ + "Boolean" + ], + "default": "false" + }, + { + "name": "autofocus", + "description": "自动聚焦,拉起键盘", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/textarea?tab=api#textarea-props", + "type": [ + "Boolean" + ], + "default": "false" + }, + { + "name": "autosize", + "description": "是否自动增高,值为 autosize 时,style.height 不生效", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/textarea?tab=api#textarea-props", + "type": [ + "Boolean" + ], + "default": "false" + }, + { + "name": "disabled", + "description": "是否禁用文本框", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/textarea?tab=api#textarea-props", + "type": [ + "Boolean" + ], + "default": "false" + }, + { + "name": "label", + "description": "左侧文本", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/textarea?tab=api#textarea-props", + "type": [ + "String", + "TNode" + ] + }, + { + "name": "maxcharacter", + "description": "用户最多可以输入的字符个数,一个中文汉字表示两个字符长度", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/textarea?tab=api#textarea-props", + "type": [ + "Number" + ] + }, + { + "name": "maxlength", + "description": "用户最多可以输入的字符个数", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/textarea?tab=api#textarea-props", + "type": [ + "Number" + ] + }, + { + "name": "name", + "description": "名称,HTML 元素原生属性", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/textarea?tab=api#textarea-props", + "type": [ + "String" + ] + }, + { + "name": "placeholder", + "description": "占位符", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/textarea?tab=api#textarea-props", + "type": [ + "String" + ], + "default": "undefined" + }, + { + "name": "value", + "description": "文本框值", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/textarea?tab=api#textarea-props", + "type": [ + "String", + "Number" + ] + } + ], + "js": { + "events": [ + { + "name": "blur", + "description": "失去焦点时触发", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/textarea?tab=api#textarea-events" + }, + { + "name": "change", + "description": "输入内容变化时触发", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/textarea?tab=api#textarea-events" + }, + { + "name": "focus", + "description": "获得焦点时触发", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/textarea?tab=api#textarea-events" + } + ] + } + }, + { + "name": "t-time-line", + "source": { + "symbol": "TimeLine" + }, + "description": "TimeLine\n\n时间轴", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/time-line", + "props": [ + { + "name": "label-align", + "description": "label info placement\n\n标签信息放在时间轴的位置,`mode='alternate'` 时生效。纵向时间轴信息位置:左侧、右侧或两侧,默认信息在时间轴右侧。横向时间轴信息位置:上方、下方、两侧", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/time-line?tab=api#timeline-props", + "type": [ + "String" + ], + "default": "left", + "attribute-value": { + "type": "enum" + }, + "values": [ + { + "name": "left" + }, + { + "name": "right" + }, + { + "name": "alternate" + }, + { + "name": "top" + }, + { + "name": "bottom" + } + ] + }, + { + "name": "layout", + "description": "time line layout\n\n时间轴方向:水平方向、垂直方向", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/time-line?tab=api#timeline-props", + "type": [ + "String" + ], + "default": "vertical", + "attribute-value": { + "type": "enum" + }, + "values": [ + { + "name": "horizontal" + }, + { + "name": "vertical" + } + ] + }, + { + "name": "mode", + "description": "The position relationship between the label and the content text, 'alternate' is displayed on both sides of the axis, and 'same' is displayed on the same side\n\n标签与内容文本的位置关系,`alternate` 为展示在轴两侧,`same` 为展示在同一侧", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/time-line?tab=api#timeline-props", + "type": [ + "String" + ], + "default": "alternate", + "attribute-value": { + "type": "enum" + }, + "values": [ + { + "name": "alternate" + }, + { + "name": "same" + } + ] + }, + { + "name": "reverse", + "description": "时间轴是否表现为倒序", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/time-line?tab=api#timeline-props", + "type": [ + "Boolean" + ], + "default": "false" + }, + { + "name": "theme", + "description": "步骤条风格", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/time-line?tab=api#timeline-props", + "type": [ + "String" + ], + "default": "default", + "attribute-value": { + "type": "enum" + }, + "values": [ + { + "name": "default" + }, + { + "name": "dot" + } + ] + } + ] + }, + { + "name": "t-time-line-item", + "source": { + "symbol": "TimeLineItem" + }, + "description": "TimeLineItem\n\n时间轴", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/time-line-item", + "props": [ + { + "name": "content", + "description": "描述内容", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/time-line-item?tab=api#timelineitem-props", + "type": [ + "String", + "TNode" + ] + }, + { + "name": "dot", + "description": "用于自定义时间轴节点元素", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/time-line-item?tab=api#timelineitem-props", + "type": [ + "TNode" + ] + }, + { + "name": "dot-color", + "description": "时间轴颜色,内置 `primary/warning/error/default` 四种色值,可传入 16 进制颜色码或 RGB 颜色值.", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/time-line-item?tab=api#timelineitem-props", + "type": [ + "String" + ], + "default": "primary", + "attribute-value": { + "type": "enum" + }, + "values": [ + { + "name": "primary" + }, + { + "name": "warning" + }, + { + "name": "error" + }, + { + "name": "default" + } + ] + }, + { + "name": "label", + "description": "标签文本内容,可完全自定义", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/time-line-item?tab=api#timelineitem-props", + "type": [ + "String", + "TNode" + ] + }, + { + "name": "label-align", + "description": "标签信息相对于时间轴的位置,在 `mode='alternate'` 时生效,优先级高于 `TimeLine.labelAlign`", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/time-line-item?tab=api#timelineitem-props", + "type": [ + "String" + ], + "attribute-value": { + "type": "enum" + }, + "values": [ + { + "name": "left" + }, + { + "name": "right" + }, + { + "name": "top" + }, + { + "name": "bottom" + } + ] + } + ] + }, + { + "name": "t-time-range-picker", + "source": { + "symbol": "TimeRangePicker" + }, + "description": "TimeRangePicker\n\n时间范围选择器", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/time-range-picker", + "props": [], + "js": { + "events": [ + { + "name": "focus", + "description": "范围输入框获得焦点时触发", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/time-range-picker?tab=api#timerangepicker-events" + } + ] + } + }, + { + "name": "t-toast", + "source": { + "symbol": "Toast" + }, + "description": "Toast\n\n轻提示", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/toast", + "props": [ + { + "name": "direction", + "description": "图标排列方式", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/toast?tab=api#toast-props", + "type": [ + "String" + ], + "default": "row", + "attribute-value": { + "type": "enum" + }, + "values": [ + { + "name": "row" + }, + { + "name": "column" + } + ] + }, + { + "name": "duration", + "description": "弹窗显示毫秒数", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/toast?tab=api#toast-props", + "type": [ + "Number" + ], + "default": "2000" + }, + { + "name": "icon", + "description": "自定义图标", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/toast?tab=api#toast-props", + "type": [ + "String", + "TNode" + ] + }, + { + "name": "message", + "description": "弹窗显示文字", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/toast?tab=api#toast-props", + "type": [ + "String", + "TNode" + ] + }, + { + "name": "overlay-props", + "description": "遮罩层属性,透传至 Overlay", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/toast?tab=api#toast-props", + "type": [ + "Object" + ], + "default": "{}" + }, + { + "name": "placement", + "description": "弹窗展示位置", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/toast?tab=api#toast-props", + "type": [ + "String" + ], + "default": "middle", + "attribute-value": { + "type": "enum" + }, + "values": [ + { + "name": " top" + }, + { + "name": "middle" + }, + { + "name": "bottom" + } + ] + }, + { + "name": "prevent-scroll-through", + "description": "防止滚动穿透,即不允许点击和滚动", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/toast?tab=api#toast-props", + "type": [ + "Boolean" + ], + "default": "false" + }, + { + "name": "show-overlay", + "description": "是否显示遮罩层", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/toast?tab=api#toast-props", + "type": [ + "Boolean" + ], + "default": "false" + }, + { + "name": "theme", + "description": "提示类型", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/toast?tab=api#toast-props", + "type": [ + "String" + ], + "attribute-value": { + "type": "enum" + }, + "values": [ + { + "name": "loading" + }, + { + "name": "success" + }, + { + "name": "fail" + } + ] + } + ] + }, + { + "name": "t-tree-select", + "source": { + "symbol": "TreeSelect" + }, + "description": "TreeSelect\n\n树选择", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/tree-select", + "props": [ + { + "name": "clearable", + "description": "是否允许清空", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/tree-select?tab=api#treeselect-props", + "type": [ + "Boolean" + ], + "default": "false" + }, + { + "name": "filterable", + "description": "是否可搜索", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/tree-select?tab=api#treeselect-props", + "type": [ + "Boolean" + ], + "default": "false" + }, + { + "name": "multiple", + "description": "是否允许多选", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/tree-select?tab=api#treeselect-props", + "type": [ + "Boolean" + ], + "default": "false" + }, + { + "name": "placeholder", + "description": "占位符", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/tree-select?tab=api#treeselect-props", + "type": [ + "String" + ], + "default": "undefined" + }, + { + "name": "select-input-props", + "description": "【开发中】透传 SelectInput 筛选器输入框组件的全部属性", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/tree-select?tab=api#treeselect-props", + "type": [ + "Object" + ] + }, + { + "name": "size", + "description": "尺寸", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/tree-select?tab=api#treeselect-props", + "type": [ + "String" + ], + "default": "medium", + "attribute-value": { + "type": "enum" + }, + "values": [ + { + "name": "small" + }, + { + "name": "medium" + }, + { + "name": "large" + } + ] + }, + { + "name": "tag-props", + "description": "【开发中】透传 Tag 标签组件全部属性", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/tree-select?tab=api#treeselect-props", + "type": [ + "Object" + ] + }, + { + "name": "value", + "description": "选中值", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/tree-select?tab=api#treeselect-props", + "type": [ + "String", + "Number", + "Object", + "Array" + ] + } + ] + }, + { + "name": "t-upload", + "source": { + "symbol": "Upload" + }, + "description": "Upload\n\n上传", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/upload", + "props": [ + { + "name": "accept", + "description": "接受上传的文件类型,[查看 W3C示例](https://www.w3schools.com/tags/att_input_accept.asp),[查看 MDN 示例](https://developer.mozilla.org/zh-CN/docs/Web/HTML/Element/Input/file)", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/upload?tab=api#upload-props", + "type": [ + "String" + ] + }, + { + "name": "action", + "description": "upload action url\n\n上传接口。设接口响应数据为字段 `response`,那么 `response.error` 存在时会判断此次上传失败,并显示错误文本信息;`response.url` 会作为文件上传成功后的地址,并使用该地址显示图片", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/upload?tab=api#upload-props", + "type": [ + "String" + ] + }, + { + "name": "allow-upload-duplicate-file", + "description": "是否允许重复上传相同文件名的文件", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/upload?tab=api#upload-props", + "type": [ + "Boolean" + ], + "default": "false" + }, + { + "name": "auto-upload", + "description": "是否选取文件后自动上传", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/upload?tab=api#upload-props", + "type": [ + "Boolean" + ], + "default": "true" + }, + { + "name": "before-all-files-upload", + "description": "before all files upload, return false can stop upload continue\n\n全部文件上传之前的钩子,参数为上传的文件,返回值决定是否继续上传,若返回值为 `false` 则终止上传", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/upload?tab=api#upload-props", + "type": [ + "Function" + ] + }, + { + "name": "before-upload", + "description": "单文件上传之前的钩子,参数为上传的文件,返回值决定是否继续上传,若返回值为 `false` 则终止上传", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/upload?tab=api#upload-props", + "type": [ + "Function" + ] + }, + { + "name": "data", + "description": "上传文件时所需的额外数据", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/upload?tab=api#upload-props", + "type": [ + "Object" + ] + }, + { + "name": "delete-btn", + "description": "删除图标。值为空,使用默认图标渲染;值为 slot 则表示使用插槽渲染;其他值无效。", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/upload?tab=api#upload-props", + "type": [ + "String", + "TNode" + ] + }, + { + "name": "disabled", + "description": "是否禁用", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/upload?tab=api#upload-props", + "type": [ + "Boolean" + ] + }, + { + "name": "file-list-display", + "description": "用于完全自定义文件列表内容", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/upload?tab=api#upload-props", + "type": [ + "TNode" + ] + }, + { + "name": "files", + "description": "已上传文件列表,同 `value`", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/upload?tab=api#upload-props", + "type": [ + "Array" + ], + "default": "[]" + }, + { + "name": "format", + "description": "文件上传前转换文件的数据结构,可新增或修改文件对象的属性", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/upload?tab=api#upload-props", + "type": [ + "Function" + ] + }, + { + "name": "format-request", + "description": "用于新增或修改文件上传请求参数", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/upload?tab=api#upload-props", + "type": [ + "Function" + ] + }, + { + "name": "format-response", + "description": "用于格式化文件上传后的接口响应数据,`response` 便是接口响应的原始数据。
此函数的返回值 `error` 或 `response.error` 会作为错误文本提醒,如果存在会判定为本次上传失败。
此函数的返回值 `url` 或 `response.url` 会作为上传成功后的链接", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/upload?tab=api#upload-props", + "type": [ + "Function" + ] + }, + { + "name": "grid-config", + "description": "upload组件每行上传图片列数以及图片的宽度和高度", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/upload?tab=api#upload-props", + "type": [ + "Object" + ] + }, + { + "name": "headers", + "description": "设置上传的请求头部", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/upload?tab=api#upload-props", + "type": [ + "Object" + ] + }, + { + "name": "image-props", + "description": "透传 Image 组件全部属性", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/upload?tab=api#upload-props", + "type": [ + "Object" + ] + }, + { + "name": "max", + "description": "用于控制文件上传数量,值为 0 则不限制", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/upload?tab=api#upload-props", + "type": [ + "Number" + ], + "default": "0" + }, + { + "name": "method", + "description": "HTTP 请求类型", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/upload?tab=api#upload-props", + "type": [ + "String" + ], + "default": "POST", + "attribute-value": { + "type": "enum" + }, + "values": [ + { + "name": "POST" + }, + { + "name": "GET" + }, + { + "name": "PUT" + }, + { + "name": "OPTION" + }, + { + "name": "PATCH" + }, + { + "name": "post" + }, + { + "name": "get" + }, + { + "name": "put" + }, + { + "name": "option" + }, + { + "name": "patch" + } + ] + }, + { + "name": "multiple", + "description": "是否支持多选文件", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/upload?tab=api#upload-props", + "type": [ + "Boolean" + ], + "default": "false" + }, + { + "name": "request-method", + "description": "自定义上传方法。返回值 `status` 表示上传成功或失败,`error` 或 `response.error` 表示上传失败的原因,`response` 表示请求上传成功后的返回数据,`response.url` 表示上传成功后的图片地址。示例一:`{ status: 'fail', error: '上传失败', response }`。示例二:`{ status: 'success', response: { url: 'https://tdesign.gtimg.com/site/avatar.jpg' } }`", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/upload?tab=api#upload-props", + "type": [ + "Function" + ] + }, + { + "name": "show-upload-progress", + "description": "是否显示上传进度", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/upload?tab=api#upload-props", + "type": [ + "Boolean" + ], + "default": "true" + }, + { + "name": "size-limit", + "description": "图片文件大小限制,单位 KB。可选单位有:`'B' | 'KB' | 'MB' | 'GB'`。示例一:`1000`。示例二:`{ size: 2, unit: 'MB', message: '图片大小不超过 {sizeLimit} MB' }`", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/upload?tab=api#upload-props", + "type": [ + "Number", + "Object" + ] + }, + { + "name": "trigger", + "description": "触发上传的元素,`files` 指本次显示的全部文件", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/upload?tab=api#upload-props", + "type": [ + "TNode" + ] + }, + { + "name": "use-mock-progress", + "description": "是否在请求时间超过 300ms 后显示模拟进度。上传进度有模拟进度和真实进度两种。一般大小的文件上传,真实的上传进度只有 0 和 100,不利于交互呈现,因此组件内置模拟上传进度。真实上传进度一般用于大文件上传。", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/upload?tab=api#upload-props", + "type": [ + "Boolean" + ], + "default": "true" + }, + { + "name": "with-credentials", + "description": "上传请求时是否携带 cookie", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/upload?tab=api#upload-props", + "type": [ + "Boolean" + ], + "default": "false" + } + ], + "js": { + "events": [ + { + "name": "cancel-upload", + "description": "点击「取消上传」时触发", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/upload?tab=api#upload-events" + }, + { + "name": "change", + "description": "已上传文件列表发生变化时触发,`trigger` 表示触发本次的来源", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/upload?tab=api#upload-events" + }, + { + "name": "fail", + "description": "`response.error` used for error tips, `formatResponse` can format `response`\n\n上传失败后触发。`response` 指接口响应结果,`response.error` 会作为错误文本提醒。如果希望判定为上传失败,但接口响应数据不包含 `error` 字段,可以使用 `formatResponse` 格式化 `response` 数据结构。如果是多文件多请求上传场景,请到事件 `onOneFileFail` 中查看 `response`", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/upload?tab=api#upload-events" + }, + { + "name": "one-file-fail", + "description": "trigger on one file upload failed\n\n多文件/图片场景下,单个文件上传失败后触发,如果一个请求上传一个文件,则会触发多次。单文件/图片不会触发", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/upload?tab=api#upload-events" + }, + { + "name": "one-file-success", + "description": "单个文件上传成功后触发,在多文件场景下会触发多次。`context.file` 表示当前上传成功的单个文件,`context.response` 表示上传请求的返回数据", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/upload?tab=api#upload-events" + }, + { + "name": "preview", + "description": "点击图片预览时触发,文件没有预览", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/upload?tab=api#upload-events" + }, + { + "name": "progress", + "description": "上传进度变化时触发,真实进度和模拟进度都会触发。`type=real` 表示真实上传进度,`type=mock` 表示模拟上传进度", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/upload?tab=api#upload-events" + }, + { + "name": "remove", + "description": "移除文件时触发", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/upload?tab=api#upload-events" + }, + { + "name": "select-change", + "description": "trigger after file choose and before upload\n\n选择文件或图片之后,上传之前,触发该事件", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/upload?tab=api#upload-events" + }, + { + "name": "success", + "description": "上传成功后触发。
`context.currentFiles` 表示当次请求上传的文件,`context.fileList` 表示上传成功后的文件,`context.response` 表示上传请求的返回数据。
`context.results` 表示单次选择全部文件上传成功后的响应结果,可以在这个字段存在时提醒用户上传成功或失败。
", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/upload?tab=api#upload-events" + }, + { + "name": "validate", + "description": "trigger on length over limit, or trigger on file size over limit\n\n文件上传校验结束事件,有文件数量超出时会触发,文件大小超出限制、文件同名时会触发等场景。注意如果设置允许上传同名文件,则此事件不会触发", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/upload?tab=api#upload-events" + }, + { + "name": "waiting-upload-files-change", + "description": "trigger on waiting upload files changed\n\n待上传文件列表发生变化时触发。`context.files` 表示事件参数为待上传文件,`context.trigger` 引起此次变化的触发来源", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/upload?tab=api#upload-events" + } + ] + } + }, + { + "name": "t-watermark", + "source": { + "symbol": "Watermark" + }, + "description": "Watermark\n\n水印", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/watermark", + "props": [ + { + "name": "alpha", + "description": "水印整体透明度,取值范围 [0-1]", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/watermark?tab=api#watermark-props", + "type": [ + "Number" + ], + "default": "1" + }, + { + "name": "content", + "description": "水印所覆盖的内容节点", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/watermark?tab=api#watermark-props", + "type": [ + "String", + "TNode" + ] + }, + { + "name": "default", + "description": "水印所覆盖的内容节点,同 `content`", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/watermark?tab=api#watermark-props", + "type": [ + "String", + "TNode" + ] + }, + { + "name": "height", + "description": "水印高度", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/watermark?tab=api#watermark-props", + "type": [ + "Number" + ] + }, + { + "name": "is-repeat", + "description": "水印是否重复出现", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/watermark?tab=api#watermark-props", + "type": [ + "Boolean" + ], + "default": "true" + }, + { + "name": "line-space", + "description": "行间距,只作用在多行(`content` 配置为数组)情况下", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/watermark?tab=api#watermark-props", + "type": [ + "Number" + ], + "default": "16" + }, + { + "name": "movable", + "description": "水印是否可移动", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/watermark?tab=api#watermark-props", + "type": [ + "Boolean" + ], + "default": "false" + }, + { + "name": "move-interval", + "description": "水印发生运动位移的间隙,单位:毫秒", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/watermark?tab=api#watermark-props", + "type": [ + "Number" + ], + "default": "3000" + }, + { + "name": "offset", + "description": "水印在画布上绘制的水平和垂直偏移量,正常情况下水印绘制在中间位置,即 `offset = [gapX / 2, gapY / 2]`", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/watermark?tab=api#watermark-props", + "type": [ + "Array" + ] + }, + { + "name": "removable", + "description": "水印是否可被删除,默认会开启水印节点防删", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/watermark?tab=api#watermark-props", + "type": [ + "Boolean" + ], + "default": "true" + }, + { + "name": "rotate", + "description": "水印旋转的角度,单位 °", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/watermark?tab=api#watermark-props", + "type": [ + "Number" + ], + "default": "-22" + }, + { + "name": "watermark-content", + "description": "水印内容,需要显示多行情况下可配置为数组", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/watermark?tab=api#watermark-props", + "type": [ + "Object", + "Array" + ] + }, + { + "name": "width", + "description": "水印宽度", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/watermark?tab=api#watermark-props", + "type": [ + "Number" + ] + }, + { + "name": "x", + "description": "水印之间的水平间距", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/watermark?tab=api#watermark-props", + "type": [ + "Number" + ] + }, + { + "name": "y", + "description": "水印之间的垂直间距", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/watermark?tab=api#watermark-props", + "type": [ + "Number" + ] + }, + { + "name": "z-index", + "description": "水印元素的 `z-index`,默认值写在 CSS 中", + "doc-url": "https://tdesign.tencent.com/mobile-vue/components/watermark?tab=api#watermark-props", + "type": [ + "Number" + ] + } + ] + } + ] + } + } +} \ No newline at end of file diff --git a/src/action-sheet/action-sheet.md b/src/action-sheet/action-sheet.md index 998e46308..49f404598 100644 --- a/src/action-sheet/action-sheet.md +++ b/src/action-sheet/action-sheet.md @@ -1,6 +1,7 @@ :: BASE_DOC :: ## API + ### ActionSheet Props 名称 | 类型 | 默认值 | 说明 | 必传 diff --git a/src/avatar/props.ts b/src/avatar/props.ts index a66d93123..d7b8cde09 100644 --- a/src/avatar/props.ts +++ b/src/avatar/props.ts @@ -41,10 +41,10 @@ export default { return ['circle', 'round'].includes(val); }, }, - /** 尺寸,示例值:small/medium/large/24px/38px 等。优先级高于 AvatarGroup.size 。Avatar 单独存在时,默认值为 medium。如果父组件存在 AvatarGroup,默认值便由 AvatarGroup.size 决定 */ + /** 尺寸,示例值:small/medium/large/24px/38px 等,默认为 large */ size: { type: String, - default: 'medium', + default: '', }, /** 图片加载失败时触发 */ onError: Function as PropType, diff --git a/src/avatar/type.ts b/src/avatar/type.ts index b63f4cd17..99b6956d3 100644 --- a/src/avatar/type.ts +++ b/src/avatar/type.ts @@ -5,8 +5,7 @@ * */ import { BadgeProps } from '../badge'; -import { ImageProps } from '../image'; -import { TNode, ImageEvent } from '../common'; +import { TNode } from '../common'; export interface TdAvatarProps { /** @@ -35,21 +34,21 @@ export interface TdAvatarProps { /** * 透传至 Image 组件 */ - imageProps?: ImageProps; + imageProps?: object; /** * 形状 * @default circle */ shape?: ShapeEnum; /** - * 尺寸,示例值:small/medium/large/24px/38px 等。优先级高于 AvatarGroup.size 。Avatar 单独存在时,默认值为 medium。如果父组件存在 AvatarGroup,默认值便由 AvatarGroup.size 决定 - * @default medium + * 尺寸,示例值:small/medium/large/24px/38px 等,默认为 large + * @default '' */ size?: string; /** * 图片加载失败时触发 */ - onError?: (context: { e: ImageEvent }) => void; + onError?: () => void; } export interface TdAvatarGroupProps { diff --git a/src/button/button.en-US.md b/src/button/button.en-US.md index 3b073a906..37db30d5b 100644 --- a/src/button/button.en-US.md +++ b/src/button/button.en-US.md @@ -11,13 +11,12 @@ disabled | Boolean | false | disable the button, make it can not be clicked | N ghost | Boolean | false | make background-color to be transparent | N icon | Slot / Function | - | use it to set left icon in button。Typescript:`TNode`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N loading | Boolean | false | set button to be loading state | N -loadingProps | Object | - | Typescript:`LoadingProps`,[Loading API Documents](./loading?tab=api)。[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/button/type.ts) | N shape | String | rectangle | button shape。options:rectangle/square/round/circle | N size | String | medium | a button has three size。options:extra-small/small/medium/large。Typescript:`SizeEnum`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N suffix | Slot / Function | - | Typescript:`TNode`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N theme | String | default | button theme。options:default/primary/danger/light | N type | String | button | type of button element in html。options:submit/reset/button | N -variant | String | base | button variant。options:base/outline/text | N +variant | String | base | button variant。options:base/outline/dashed/text | N onClick | Function | | Typescript:`(e: MouseEvent) => void`
trigger on click | N ### Button Events diff --git a/src/button/button.md b/src/button/button.md index 11ba63c97..7e45ec6b4 100644 --- a/src/button/button.md +++ b/src/button/button.md @@ -11,13 +11,12 @@ disabled | Boolean | false | 禁用状态 | N ghost | Boolean | false | 是否为幽灵按钮(镂空按钮) | N icon | Slot / Function | - | 按钮内部图标,可完全自定义。TS 类型:`TNode`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N loading | Boolean | false | 是否显示为加载状态 | N -loadingProps | Object | - | 透传加载组件全部属性。TS 类型:`LoadingProps`,[Loading API Documents](./loading?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/button/type.ts) | N shape | String | rectangle | 按钮形状,有 4 种:长方形、正方形、圆角长方形、圆形。可选项:rectangle/square/round/circle | N size | String | medium | 组件尺寸。可选项:extra-small/small/medium/large。TS 类型:`SizeEnum`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N suffix | Slot / Function | - | 右侧内容,可用于定义右侧图标。TS 类型:`TNode`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N theme | String | default | 组件风格,依次为品牌色、危险色。可选项:default/primary/danger/light | N type | String | button | 按钮类型。可选项:submit/reset/button | N -variant | String | base | 按钮形式,基础、线框、文字。可选项:base/outline/text | N +variant | String | base | 按钮形式,基础、线框、文字。可选项:base/outline/dashed/text | N onClick | Function | | TS 类型:`(e: MouseEvent) => void`
点击时触发 | N ### Button Events diff --git a/src/button/props.ts b/src/button/props.ts index 0b9694246..508fc67d6 100644 --- a/src/button/props.ts +++ b/src/button/props.ts @@ -24,10 +24,6 @@ export default { }, /** 是否显示为加载状态 */ loading: Boolean, - /** 透传加载组件全部属性 */ - loadingProps: { - type: Object as PropType, - }, /** 按钮形状,有 4 种:长方形、正方形、圆角长方形、圆形 */ shape: { type: String as PropType, @@ -74,7 +70,7 @@ export default { default: 'base' as TdButtonProps['variant'], validator(val: TdButtonProps['variant']): boolean { if (!val) return true; - return ['base', 'outline', 'text'].includes(val); + return ['base', 'outline', 'dashed', 'text'].includes(val); }, }, /** 点击时触发 */ diff --git a/src/button/type.ts b/src/button/type.ts index 6e9edfae9..9606f0624 100644 --- a/src/button/type.ts +++ b/src/button/type.ts @@ -4,7 +4,6 @@ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC * */ -import { LoadingProps } from '../loading'; import { TNode, SizeEnum } from '../common'; export interface TdButtonProps { @@ -36,10 +35,6 @@ export interface TdButtonProps { * @default false */ loading?: boolean; - /** - * 透传加载组件全部属性 - */ - loadingProps?: LoadingProps; /** * 按钮形状,有 4 种:长方形、正方形、圆角长方形、圆形 * @default rectangle @@ -68,7 +63,7 @@ export interface TdButtonProps { * 按钮形式,基础、线框、文字 * @default base */ - variant?: 'base' | 'outline' | 'text'; + variant?: 'base' | 'outline' | 'dashed' | 'text'; /** * 点击时触发 */ diff --git a/src/calendar/calendar.en-US.md b/src/calendar/calendar.en-US.md index 14df283f3..630bbebf9 100644 --- a/src/calendar/calendar.en-US.md +++ b/src/calendar/calendar.en-US.md @@ -5,6 +5,7 @@ name | type | default | description | required -- | -- | -- | -- | -- +autoClose | Boolean | true | \- | N confirmBtn | String / Object / Slot / Function | '' | Typescript:`string \| ButtonProps \| TNode \| null`,[Button API Documents](./button?tab=api)。[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts)。[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/calendar/type.ts) | N firstDayOfWeek | Number | 0 | \- | N format | Function | - | Typescript:`CalendarFormatType ` `type CalendarFormatType = (day: TDate) => TDate` `type TDateType = 'selected' \| 'disabled' \| 'start' \| 'centre' \| 'end' \| ''` `interface TDate { date: Date; day: number; type: TDateType; className?: string; prefix?: string; suffix?: string;}`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/calendar/type.ts) | N @@ -15,7 +16,7 @@ type | String | 'single' | options:single/multiple/range | N usePopup | Boolean | true | \- | N value | Number / Array / Date | - | `v-model` and `v-model:value` is supported。Typescript:`number \| Date \| TCalendarValue[]` `type TCalendarValue = number \| Date`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/calendar/type.ts) | N defaultValue | Number / Array / Date | - | uncontrolled property。Typescript:`number \| Date \| TCalendarValue[]` `type TCalendarValue = number \| Date`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/calendar/type.ts) | N -visible | Boolean | false | `v-model:visible` is supported | N +visible | Boolean | false | \- | N onChange | Function | | Typescript:`(value: Date) => void`
| N onClose | Function | | Typescript:`(trigger: CalendarTrigger) => void`
[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/calendar/type.ts)。
`type CalendarTrigger = 'close-btn' \| 'confirm-btn' \| 'overlay'`
| N onConfirm | Function | | Typescript:`(value: Date) => void`
| N diff --git a/src/calendar/calendar.md b/src/calendar/calendar.md index 00a919f87..74c16c083 100644 --- a/src/calendar/calendar.md +++ b/src/calendar/calendar.md @@ -5,6 +5,7 @@ 名称 | 类型 | 默认值 | 说明 | 必传 -- | -- | -- | -- | -- +autoClose | Boolean | true | 自动关闭;在点击关闭按钮、确认按钮、遮罩层时自动关闭,不需要手动设置 visible | N confirmBtn | String / Object / Slot / Function | '' | 确认按钮。值为 null 则不显示确认按钮。值类型为字符串,则表示自定义按钮文本,值类型为 Object 则表示透传 Button 组件属性。。TS 类型:`string \| ButtonProps \| TNode \| null`,[Button API Documents](./button?tab=api)。[通用类型定义](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts)。[详细类型定义](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/calendar/type.ts) | N firstDayOfWeek | Number | 0 | 第一天从星期几开始,默认 0 = 周日 | N format | Function | - | 用于格式化日期的函数。TS 类型:`CalendarFormatType ` `type CalendarFormatType = (day: TDate) => TDate` `type TDateType = 'selected' \| 'disabled' \| 'start' \| 'centre' \| 'end' \| ''` `interface TDate { date: Date; day: number; type: TDateType; className?: string; prefix?: string; suffix?: string;}`。[详细类型定义](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/calendar/type.ts) | N @@ -15,8 +16,7 @@ type | String | 'single' | 日历的选择类型,single = 单选;multiple = usePopup | Boolean | true | 是否使用弹出层包裹日历 | N value | Number / Array / Date | - | 当前选择的日期,不传则默认今天,当 type = multiple 或 range 时传入数组。支持语法糖 `v-model` 或 `v-model:value`。TS 类型:`number \| Date \| TCalendarValue[]` `type TCalendarValue = number \| Date`。[详细类型定义](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/calendar/type.ts) | N defaultValue | Number / Array / Date | - | 当前选择的日期,不传则默认今天,当 type = multiple 或 range 时传入数组。非受控属性。TS 类型:`number \| Date \| TCalendarValue[]` `type TCalendarValue = number \| Date`。[详细类型定义](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/calendar/type.ts) | N -visible | Boolean | false | 是否显示日历;`usePopup` 为 true 时有效。支持语法糖 `v-model:visible` | N -defaultVisible | Boolean | false | 是否显示日历;`usePopup` 为 true 时有效。非受控属性 | N +visible | Boolean | false | 是否显示日历;`usePopup` 为 true 时有效 | N onChange | Function | | TS 类型:`(value: Date) => void`
不显示 confirm-btn 时,完成选择时触发(暂不支持 type = multiple) | N onClose | Function | | TS 类型:`(trigger: CalendarTrigger) => void`
关闭按钮时触发。[详细类型定义](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/calendar/type.ts)。
`type CalendarTrigger = 'close-btn' \| 'confirm-btn' \| 'overlay'`
| N onConfirm | Function | | TS 类型:`(value: Date) => void`
点击确认按钮时触发 | N diff --git a/src/calendar/props.ts b/src/calendar/props.ts index c7986bf29..1cf5863bf 100644 --- a/src/calendar/props.ts +++ b/src/calendar/props.ts @@ -18,10 +18,6 @@ export default { type: Number, default: 0, }, - /** 用于格式化日期的函数 */ - format: { - type: Function as PropType, - }, /** 最大可选的日期,不传则默认半年后 */ maxDate: { type: [Number, Date] as PropType, @@ -32,7 +28,8 @@ export default { }, /** 标题,不传默认为“请选择日期” */ title: { - type: [String, Function] as PropType, + type: String, + default: '', }, /** 日历的选择类型,single = 单选;multiple = 多选; range = 区间选择 */ type: { @@ -43,11 +40,6 @@ export default { return ['single', 'multiple', 'range'].includes(val); }, }, - /** 是否使用弹出层包裹日历 */ - usePopup: { - type: Boolean, - default: true, - }, /** 当前选择的日期,不传则默认今天,当 type = multiple 或 range 时传入数组 */ value: { type: [Number, Array, Date] as PropType, @@ -61,14 +53,6 @@ export default { defaultValue: { type: [Number, Array, Date] as PropType, }, - /** 是否显示日历;`usePopup` 为 true 时有效 */ + /** 是否显示日历 */ visible: Boolean, - /** 不显示 confirm-btn 时,完成选择时触发(暂不支持 type = multiple) */ - onChange: Function as PropType, - /** 关闭按钮时触发 */ - onClose: Function as PropType, - /** 点击确认按钮时触发 */ - onConfirm: Function as PropType, - /** 点击日期时触发 */ - onSelect: Function as PropType, }; diff --git a/src/calendar/type.ts b/src/calendar/type.ts index 22997ce69..7d5201b5a 100644 --- a/src/calendar/type.ts +++ b/src/calendar/type.ts @@ -18,80 +18,41 @@ export interface TdCalendarProps { * @default 0 */ firstDayOfWeek?: number; - /** - * 用于格式化日期的函数 - */ - format?: CalendarFormatType; /** * 最大可选的日期,不传则默认半年后 */ - maxDate?: number | Date; + maxDate?: number | date; /** * 最小可选的日期,不传则默认今天 */ - minDate?: number | Date; + minDate?: number | date; /** * 标题,不传默认为“请选择日期” + * @default '' */ - title?: string | TNode; + title?: string; /** * 日历的选择类型,single = 单选;multiple = 多选; range = 区间选择 - * @default 'single' + * @default single */ type?: 'single' | 'multiple' | 'range'; - /** - * 是否使用弹出层包裹日历 - * @default true - */ - usePopup?: boolean; /** * 当前选择的日期,不传则默认今天,当 type = multiple 或 range 时传入数组 */ - value?: number | Date | TCalendarValue[]; + value?: CalendarValue | CalendarValue[]; /** * 当前选择的日期,不传则默认今天,当 type = multiple 或 range 时传入数组,非受控属性 */ - defaultValue?: number | Date | TCalendarValue[]; + defaultValue?: CalendarValue | CalendarValue[]; /** * 当前选择的日期,不传则默认今天,当 type = multiple 或 range 时传入数组 */ - modelValue?: number | Date | TCalendarValue[]; + modelValue?: CalendarValue | CalendarValue[]; /** - * 是否显示日历;`usePopup` 为 true 时有效 + * 是否显示日历 * @default false */ visible?: boolean; - /** - * 不显示 confirm-btn 时,完成选择时触发(暂不支持 type = multiple) - */ - onChange?: (value: Date) => void; - /** - * 关闭按钮时触发 - */ - onClose?: (trigger: CalendarTrigger) => void; - /** - * 点击确认按钮时触发 - */ - onConfirm?: (value: Date) => void; - /** - * 点击日期时触发 - */ - onSelect?: (value: Date) => void; } -export type CalendarFormatType = (day: TDate) => TDate; - -export type TDateType = 'selected' | 'disabled' | 'start' | 'centre' | 'end' | ''; - -export interface TDate { - date: Date; - day: number; - type: TDateType; - className?: string; - prefix?: string; - suffix?: string; -} - -export type TCalendarValue = number | Date; - -export type CalendarTrigger = 'close-btn' | 'confirm-btn' | 'overlay'; +export type CalendarValue = number | Date; diff --git a/src/checkbox-group/checkbox-group.en-US.md b/src/checkbox-group/checkbox-group.en-US.md new file mode 100644 index 000000000..24b105742 --- /dev/null +++ b/src/checkbox-group/checkbox-group.en-US.md @@ -0,0 +1,20 @@ +:: BASE_DOC :: + +## API +### CheckboxGroup Props + +name | type | default | description | required +-- | -- | -- | -- | -- +disabled | Boolean | - | \- | N +max | Number | undefined | \- | N +name | String | - | \- | N +options | Array | - | Typescript:`Array` `type CheckboxOption = string \| number \| CheckboxOptionObj` `interface CheckboxOptionObj extends TdCheckboxProps { text?: string; }`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/checkbox/type.ts) | N +value | Array | [] | `v-model` and `v-model:value` is supported。Typescript:`T` `type CheckboxGroupValue = Array`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/checkbox/type.ts) | N +defaultValue | Array | [] | uncontrolled property。Typescript:`T` `type CheckboxGroupValue = Array`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/checkbox/type.ts) | N +onChange | Function | | Typescript:`(value: T, context: CheckboxGroupChangeContext) => void`
[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/checkbox/type.ts)。
`interface CheckboxGroupChangeContext { e: Event; current: string \| number; option: CheckboxOption \| TdCheckboxProps; type: 'check' \| 'uncheck' }`
| N + +### CheckboxGroup Events + +name | params | description +-- | -- | -- +change | `(value: T, context: CheckboxGroupChangeContext)` | [see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/checkbox/type.ts)。
`interface CheckboxGroupChangeContext { e: Event; current: string \| number; option: CheckboxOption \| TdCheckboxProps; type: 'check' \| 'uncheck' }`
diff --git a/src/checkbox-group/checkbox-group.md b/src/checkbox-group/checkbox-group.md new file mode 100644 index 000000000..6b03e7698 --- /dev/null +++ b/src/checkbox-group/checkbox-group.md @@ -0,0 +1,20 @@ +:: BASE_DOC :: + +## API +### CheckboxGroup Props + +名称 | 类型 | 默认值 | 说明 | 必传 +-- | -- | -- | -- | -- +disabled | Boolean | - | 是否禁用组件,默认为 false。CheckboxGroup.disabled 优先级低于 Checkbox.disabled | N +max | Number | undefined | 支持最多选中的数量 | N +name | String | - | 统一设置内部复选框 HTML 属性 | N +options | Array | - | 以配置形式设置子元素。示例1:`['北京', '上海']` ,示例2: `[{ label: '全选', checkAll: true }, { label: '上海', value: 'shanghai' }]`。checkAll 值为 true 表示当前选项为「全选选项」。TS 类型:`Array` `type CheckboxOption = string \| number \| CheckboxOptionObj` `interface CheckboxOptionObj extends TdCheckboxProps { text?: string; }`。[详细类型定义](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/checkbox/type.ts) | N +value | Array | [] | 选中值。支持语法糖 `v-model` 或 `v-model:value`。TS 类型:`T` `type CheckboxGroupValue = Array`。[详细类型定义](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/checkbox/type.ts) | N +defaultValue | Array | [] | 选中值。非受控属性。TS 类型:`T` `type CheckboxGroupValue = Array`。[详细类型定义](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/checkbox/type.ts) | N +onChange | Function | | TS 类型:`(value: T, context: CheckboxGroupChangeContext) => void`
值变化时触发。`context.current` 表示当前变化的数据项,如果是全选则为空;`context.type` 表示引起选中数据变化的是选中或是取消选中,`context.option` 表示当前变化的数据项。[详细类型定义](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/checkbox/type.ts)。
`interface CheckboxGroupChangeContext { e: Event; current: string \| number; option: CheckboxOption \| TdCheckboxProps; type: 'check' \| 'uncheck' }`
| N + +### CheckboxGroup Events + +名称 | 参数 | 描述 +-- | -- | -- +change | `(value: T, context: CheckboxGroupChangeContext)` | 值变化时触发。`context.current` 表示当前变化的数据项,如果是全选则为空;`context.type` 表示引起选中数据变化的是选中或是取消选中,`context.option` 表示当前变化的数据项。[详细类型定义](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/checkbox/type.ts)。
`interface CheckboxGroupChangeContext { e: Event; current: string \| number; option: CheckboxOption \| TdCheckboxProps; type: 'check' \| 'uncheck' }`
diff --git a/src/dialog/dialog.en-US.md b/src/dialog/dialog.en-US.md index 1d83f7af3..b7bfca912 100644 --- a/src/dialog/dialog.en-US.md +++ b/src/dialog/dialog.en-US.md @@ -17,7 +17,7 @@ overlayProps | Object | {} | \- | N preventScrollThrough | Boolean | true | \- | N showOverlay | Boolean | true | \- | 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 -visible | Boolean | - | \- | N +visible | Boolean | false | \- | N width | String / Number | - | \- | N zIndex | Number | - | \- | N onCancel | Function | | Typescript:`(context: { e: MouseEvent }) => void`
| N @@ -40,16 +40,16 @@ name | type | default | description | required -- | -- | -- | -- | -- className | String | - | \- | N style | String / Object | - | Typescript:`string \| Styles`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N -`Omit` | \- | - | extends `Omit` | N +`Omit` | \- | - | \- | N ### DialogInstance name | params | return | description -- | -- | -- | -- -destroy | \- | \- | required -hide | \- | \- | required -show | \- | \- | required -update | `(props: DialogOptions)` | \- | required +destroy | \- | \- | \- +hide | \- | \- | \- +show | \- | \- | \- +update | `(props: DialogOptions)` | \- | \- ### DialogPlugin @@ -69,8 +69,6 @@ name | params | default | description -- | -- | -- | -- options | \- | - | Typescript:`DialogOptions` -插件返回值:`DialogInstance` - ### DialogPlugin.alert 同时也支持 `this.$dialog.alert`。 @@ -78,5 +76,3 @@ options | \- | - | Typescript:`DialogOptions` name | params | default | description -- | -- | -- | -- options | Object | - | Typescript:`Omit` - -插件返回值:`DialogInstance` diff --git a/src/dialog/dialog.md b/src/dialog/dialog.md index 94f2f468a..fbaea1393 100644 --- a/src/dialog/dialog.md +++ b/src/dialog/dialog.md @@ -1,6 +1,7 @@ :: BASE_DOC :: ## API + ### Dialog Props 名称 | 类型 | 默认值 | 说明 | 必传 @@ -8,7 +9,6 @@ actions | Array / Slot / Function | - | 操作栏。TS 类型:`Array`,[Button API Documents](./button?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/dialog/type.ts) | N buttonLayout | String | horizontal | 多按钮排列方式。可选项:horizontal/vertical | N cancelBtn | String / Object / Slot / Function | - | 取消按钮,可自定义。值为 null 则不显示取消按钮。值类型为字符串,则表示自定义按钮文本,值类型为 Object 则表示透传 Button 组件属性。使用 TNode 自定义按钮时,需自行控制取消事件。TS 类型:`string \| ButtonProps \| TNode \| null`,[Button API Documents](./button?tab=api)。[通用类型定义](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts)。[详细类型定义](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/dialog/type.ts) | N -closeBtn | Boolean | false | 多按钮排列方式。可选项:true/false | N closeOnOverlayClick | Boolean | undefined | 点击蒙层时是否触发关闭事件 | N confirmBtn | String / Object / Slot / Function | - | 确认按钮。值为 null 则不显示确认按钮。值类型为字符串,则表示自定义按钮文本,值类型为 Object 则表示透传 Button 组件属性。使用 TNode 自定义按钮时,需自行控制确认事件。TS 类型:`string \| ButtonProps \| TNode \| null`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N content | String / Slot / Function | - | 内容。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N @@ -17,7 +17,7 @@ overlayProps | Object | {} | 透传至 Overlay 组件 | N preventScrollThrough | Boolean | true | 防止滚动穿透 | N showOverlay | Boolean | true | 是否显示遮罩层 | N title | String / Slot / Function | - | 标题。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N -visible | Boolean | - | 控制对话框是否显示 | N +visible | Boolean | false | 控制对话框是否显示 | N width | String / Number | - | 对话框宽度,示例:320, '500px', '80%' | N zIndex | Number | - | 对话框层级,Web 侧样式默认为 2500,移动端和小程序样式默认为 1500 | N onCancel | Function | | TS 类型:`(context: { e: MouseEvent }) => void`
如果“取消”按钮存在,则点击“取消”按钮时触发,同时触发关闭事件 | N @@ -40,16 +40,16 @@ overlay-click | `(context: { e: MouseEvent })` | 如果蒙层存在,点击蒙 -- | -- | -- | -- | -- className | String | - | 弹框类名,示例:'t-class-dialog-first t-class-dialog-second' | N style | String / Object | - | 弹框 style 属性,输入 [CSSStyleDeclaration.cssText](https://developer.mozilla.org/en-US/docs/Web/API/CSSStyleDeclaration/cssText)。TS 类型:`string \| Styles`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N -`Omit` | \- | - | 继承 `Omit` 中的全部属性 | N +`Omit` | \- | - | 继承 `Omit` 中的全部 API | N ### DialogInstance 名称 | 参数 | 返回值 | 描述 -- | -- | -- | -- -destroy | \- | \- | 必需。销毁弹框 -hide | \- | \- | 必需。隐藏弹框 -show | \- | \- | 必需。显示弹框 -update | `(props: DialogOptions)` | \- | 必需。更新弹框内容 +destroy | \- | \- | 销毁弹框 +hide | \- | \- | 隐藏弹框 +show | \- | \- | 显示弹框 +update | `(props: DialogOptions)` | \- | 更新弹框内容 ### DialogPlugin @@ -69,8 +69,6 @@ options | \- | - | TS 类型:`DialogOptions` -- | -- | -- | -- options | \- | - | TS 类型:`DialogOptions` -插件返回值:`DialogInstance` - ### DialogPlugin.alert 同时也支持 `this.$dialog.alert`。 @@ -78,5 +76,3 @@ options | \- | - | TS 类型:`DialogOptions` 参数名称 | 参数类型 | 参数默认值 | 参数说明 -- | -- | -- | -- options | Object | - | TS 类型:`Omit` - -插件返回值:`DialogInstance` diff --git a/src/dialog/props.ts b/src/dialog/props.ts index 6b6d3f377..18752c52c 100644 --- a/src/dialog/props.ts +++ b/src/dialog/props.ts @@ -25,11 +25,6 @@ export default { cancelBtn: { type: [String, Object, Function] as PropType, }, - /** 是否显示关闭按钮 */ - closeBtn: { - type: Boolean, - default: false, - }, /** 点击蒙层时是否触发关闭事件 */ closeOnOverlayClick: { type: Boolean, diff --git a/src/dialog/type.ts b/src/dialog/type.ts index 5bfd034c8..37d78ccad 100644 --- a/src/dialog/type.ts +++ b/src/dialog/type.ts @@ -59,6 +59,7 @@ export interface TdDialogProps { title?: string | TNode; /** * 控制对话框是否显示 + * @default false */ visible?: boolean; /** @@ -103,19 +104,19 @@ export interface DialogInstance { /** * 销毁弹框 */ - destroy: () => void; + destroy?: () => void; /** * 隐藏弹框 */ - hide: () => void; + hide?: () => void; /** * 显示弹框 */ - show: () => void; + show?: () => void; /** * 更新弹框内容 */ - update: (props: DialogOptions) => void; + update?: (props: DialogOptions) => void; } export type DialogEventSource = 'cancel' | 'overlay'; diff --git a/src/drawer/drawer.en-US.md b/src/drawer/drawer.en-US.md index fa2eb94c2..139bff2a8 100644 --- a/src/drawer/drawer.en-US.md +++ b/src/drawer/drawer.en-US.md @@ -1,20 +1,27 @@ :: BASE_DOC :: ## API + ### Drawer Props name | type | default | description | required -- | -- | -- | -- | -- attach | String / Function | - | Typescript:`AttachNode`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N +cancelBtn | String / Object / Slot / Function | - | Typescript:`FooterButton` | N +closeBtn | String / Boolean / Slot / Function | - | Typescript:`string \| boolean \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N closeOnOverlayClick | Boolean | undefined | \- | N +confirmBtn | String / Object / Slot / Function | - | Typescript:`FooterButton` `type FooterButton = string \| ButtonProps \| TNode`,[Button API Documents](./button?tab=api)。[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts)。[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/drawer/type.ts) | N destroyOnClose | Boolean | false | \- | N footer | Slot / Function | - | Typescript:`TNode`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N items | Array | - | Typescript:`DrawerItem[] ` `interface DrawerItem { title: string; icon: TNode; }`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts)。[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/drawer/type.ts) | N +mode | String | overlay | options:overlay/push | N placement | String | right | options:left/right | N showOverlay | Boolean | true | \- | N +size | String | undefined | \- | 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 visible | Boolean | false | \- | N zIndex | Number | - | \- | N +onClose | Function | | Typescript:`(context: DrawerCloseContext) => void`
[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/drawer/type.ts)。
`type DrawerEventSource = 'esc' \| 'close-btn' \| 'cancel' \| 'overlay'`

`interface DrawerCloseContext { trigger: DrawerEventSource; e: MouseEvent \| KeyboardEvent }`
| N onClose | Function | | Typescript:`(trigger: TriggerSource) => void`
[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/drawer/type.ts)。
`type TriggerSource = 'overlay'`
| N onItemClick | Function | | Typescript:`( index: number, item: DrawerItem, context: { e: MouseEvent }) => void`
| N onOverlayClick | Function | | Typescript:`(context: { e: MouseEvent }) => void`
| N @@ -23,6 +30,7 @@ onOverlayClick | Function | | Typescript:`(context: { e: MouseEvent }) => voi name | params | description -- | -- | -- +close | `(context: DrawerCloseContext)` | [see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/drawer/type.ts)。
`type DrawerEventSource = 'esc' \| 'close-btn' \| 'cancel' \| 'overlay'`

`interface DrawerCloseContext { trigger: DrawerEventSource; e: MouseEvent \| KeyboardEvent }`
close | `(trigger: TriggerSource)` | [see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/drawer/type.ts)。
`type TriggerSource = 'overlay'`
item-click | `( index: number, item: DrawerItem, context: { e: MouseEvent })` | \- overlay-click | `(context: { e: MouseEvent })` | \- diff --git a/src/drawer/drawer.md b/src/drawer/drawer.md index 9699019ac..92a688a96 100644 --- a/src/drawer/drawer.md +++ b/src/drawer/drawer.md @@ -1,20 +1,27 @@ :: BASE_DOC :: ## API + ### Drawer Props 名称 | 类型 | 默认值 | 说明 | 必传 -- | -- | -- | -- | -- attach | String / Function | - | 抽屉挂载的节点,默认挂在组件本身的位置。数据类型为 String 时,会被当作选择器处理,进行节点查询。示例:'body' 或 () => document.body。TS 类型:`AttachNode`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N +cancelBtn | String / Object / Slot / Function | - | 取消按钮,可自定义。值为 null 则不显示取消按钮。值类型为字符串,则表示自定义按钮文本,值类型为 Object 则表示透传 Button 组件属性。使用 TNode 自定义按钮时,需自行控制取消事件。TS 类型:`FooterButton` | N +closeBtn | String / Boolean / Slot / Function | - | 关闭按钮,可以自定义。值为 true 显示默认关闭按钮,值为 false 不显示关闭按钮。值类型为 string 则直接显示值,如:“关闭”。值类型为 TNode,则表示呈现自定义按钮示例。TS 类型:`string \| boolean \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N closeOnOverlayClick | Boolean | undefined | 点击蒙层时是否触发抽屉关闭事件 | N +confirmBtn | String / Object / Slot / Function | - | 确认按钮。值类型为字符串,则表示自定义按钮文本,值类型为 Object 则表示透传 Button 组件属性。使用 TNode 自定义按钮时,需自行控制确认事件。TS 类型:`FooterButton` `type FooterButton = string \| ButtonProps \| TNode`,[Button API Documents](./button?tab=api)。[通用类型定义](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts)。[详细类型定义](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/drawer/type.ts) | N destroyOnClose | Boolean | false | 抽屉关闭时是否销毁节点 | N footer | Slot / Function | - | 抽屉的底部。TS 类型:`TNode`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N items | Array | - | 抽屉里的列表项。TS 类型:`DrawerItem[] ` `interface DrawerItem { title: string; icon: TNode; }`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts)。[详细类型定义](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/drawer/type.ts) | N +mode | String | overlay | 展开方式,有两种:直接展示在内容上方 和 推开内容区域。可选项:overlay/push | N placement | String | right | 抽屉方向。可选项:left/right | N showOverlay | Boolean | true | 是否显示遮罩层 | N +size | String | undefined | 尺寸,支持 'small', 'medium', 'large','35px', '30%', '3em' 等。纵向抽屉调整的是抽屉宽度,横向抽屉调整的是抽屉高度 | N title | String / Slot / Function | - | 抽屉的标题。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N visible | Boolean | false | 组件是否可见 | N zIndex | Number | - | 抽屉层级,样式默认为 1500 | N +onClose | Function | | TS 类型:`(context: DrawerCloseContext) => void`
关闭事件,取消按钮点击时、关闭按钮点击时、ESC 按下时、点击蒙层时均会触发。[详细类型定义](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/drawer/type.ts)。
`type DrawerEventSource = 'esc' \| 'close-btn' \| 'cancel' \| 'overlay'`

`interface DrawerCloseContext { trigger: DrawerEventSource; e: MouseEvent \| KeyboardEvent }`
| N onClose | Function | | TS 类型:`(trigger: TriggerSource) => void`
关闭时触发。[详细类型定义](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/drawer/type.ts)。
`type TriggerSource = 'overlay'`
| N onItemClick | Function | | TS 类型:`( index: number, item: DrawerItem, context: { e: MouseEvent }) => void`
点击抽屉里的列表项 | N onOverlayClick | Function | | TS 类型:`(context: { e: MouseEvent }) => void`
如果蒙层存在,点击蒙层时触发 | N @@ -23,6 +30,7 @@ onOverlayClick | Function | | TS 类型:`(context: { e: MouseEvent }) => void 名称 | 参数 | 描述 -- | -- | -- +close | `(context: DrawerCloseContext)` | 关闭事件,取消按钮点击时、关闭按钮点击时、ESC 按下时、点击蒙层时均会触发。[详细类型定义](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/drawer/type.ts)。
`type DrawerEventSource = 'esc' \| 'close-btn' \| 'cancel' \| 'overlay'`

`interface DrawerCloseContext { trigger: DrawerEventSource; e: MouseEvent \| KeyboardEvent }`
close | `(trigger: TriggerSource)` | 关闭时触发。[详细类型定义](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/drawer/type.ts)。
`type TriggerSource = 'overlay'`
item-click | `( index: number, item: DrawerItem, context: { e: MouseEvent })` | 点击抽屉里的列表项 overlay-click | `(context: { e: MouseEvent })` | 如果蒙层存在,点击蒙层时触发 diff --git a/src/dropdown-menu/dropdown-menu.en-US.md b/src/dropdown-menu/dropdown-menu.en-US.md index ffab0e3c7..ed751ef17 100644 --- a/src/dropdown-menu/dropdown-menu.en-US.md +++ b/src/dropdown-menu/dropdown-menu.en-US.md @@ -20,6 +20,7 @@ label | String | - | \- | N multiple | Boolean | false | \- | N options | Array | [] | Typescript:`Array` `interface DropdownOption { label: string; disabled: boolean; value: DropdownValue; }`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/dropdown-menu/type.ts) | N optionsColumns | String / Number | 1 | \- | N +optionsLayout | String | columns | `deprecated` | N value | String / Number | undefined | `v-model` and `v-model:value` is supported。Typescript:`DropdownValue ` `type DropdownValue = string \| number;`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/dropdown-menu/type.ts) | N defaultValue | String / Number | undefined | uncontrolled property。Typescript:`DropdownValue ` `type DropdownValue = string \| number;`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/dropdown-menu/type.ts) | N onChange | Function | | Typescript:`(value: DropdownValue) => void`
| N diff --git a/src/dropdown-menu/dropdown-menu.md b/src/dropdown-menu/dropdown-menu.md index 94742228e..9e3806409 100644 --- a/src/dropdown-menu/dropdown-menu.md +++ b/src/dropdown-menu/dropdown-menu.md @@ -20,6 +20,7 @@ label | String | - | 标题 | N multiple | Boolean | false | 是否多选 | N options | Array | [] | 选项数据。TS 类型:`Array` `interface DropdownOption { label: string; disabled: boolean; value: DropdownValue; }`。[详细类型定义](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/dropdown-menu/type.ts) | N optionsColumns | String / Number | 1 | 选项分栏(1-3) | N +optionsLayout | String | columns | 已废弃。选项排列;不再支持 tree 布局,可与 treeSelect 配合使用 | N value | String / Number | undefined | 选中值。支持语法糖 `v-model` 或 `v-model:value`。TS 类型:`DropdownValue ` `type DropdownValue = string \| number;`。[详细类型定义](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/dropdown-menu/type.ts) | N defaultValue | String / Number | undefined | 选中值。非受控属性。TS 类型:`DropdownValue ` `type DropdownValue = string \| number;`。[详细类型定义](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/dropdown-menu/type.ts) | N onChange | Function | | TS 类型:`(value: DropdownValue) => void`
值改变时触发 | N diff --git a/src/form/form.en-US.md b/src/form/form.en-US.md index 08f635f49..4a319ce4f 100644 --- a/src/form/form.en-US.md +++ b/src/form/form.en-US.md @@ -12,13 +12,13 @@ disabled | Boolean | undefined | \- | N errorMessage | Object | - | Typescript:`FormErrorMessage` | N formControlledComponents | Array | - | Typescript:`Array` | N labelAlign | String | right | options:left/right/top | N -labelWidth | String / Number | '81px' | \- | N +labelWidth | String / Number | '100px' | \- | N layout | String | vertical | options:vertical/inline | N preventSubmitDefault | Boolean | true | \- | N requiredMark | Boolean | undefined | \- | N resetType | String | empty | options:empty/initial | N rules | Object | - | Typescript:`FormRules` `type FormRules = { [field in keyof T]?: Array }`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/form/type.ts) | N -scrollToFirstError | String | - | options:smooth/auto | N +scrollToFirstError | String | - | options:''/smooth/auto | N showErrorMessage | Boolean | true | \- | N statusIcon | Boolean / Slot / Function | undefined | Typescript:`boolean \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N submitWithWarningMessage | Boolean | false | \- | N diff --git a/src/form/form.md b/src/form/form.md index 9604dee96..9041b07ba 100644 --- a/src/form/form.md +++ b/src/form/form.md @@ -10,15 +10,17 @@ colon | Boolean | false | 是否在表单标签字段右侧显示冒号 | N data | Object | {} | 表单数据。TS 类型:`FormData` | N disabled | Boolean | undefined | 是否禁用整个表单 | N errorMessage | Object | - | 表单错误信息配置,示例:`{ idcard: '请输入正确的身份证号码', max: '字符长度不能超过 ${max}' }`。TS 类型:`FormErrorMessage` | N -formControlledComponents | Array | - | 【开发中】允许表单统一控制禁用状态的自定义组件名称列表。默认会有组件库的全部输入类组件:TInput、TSwitch、TRadio、TRadioGroup、TUpload、TSlider。对于自定义组件,组件内部需要包含可以控制表单禁用状态的变量 `formDisabled`。示例:`['CustomUpload', 'CustomInput']`。TS 类型:`Array` | N +formControlledComponents | Array | - | 允许表单统一控制禁用状态的自定义组件名称列表。默认会有组件库的全部输入类组件:TInput、TInputNumber、TCascader、TSelect、TOption、TSwitch、TCheckbox、TCheckboxGroup、TRadio、TRadioGroup、TTreeSelect、TDatePicker、TTimePicker、TUpload、TTransfer、TSlider。对于自定义组件,组件内部需要包含可以控制表单禁用状态的变量 `formDisabled`。示例:`['CustomUpload', 'CustomInput']`。TS 类型:`Array` | N labelAlign | String | right | 表单字段标签对齐方式:左对齐、右对齐、顶部对齐。可选项:left/right/top | N -labelWidth | String / Number | '81px' | 可以整体设置label标签宽度,默认为81px | N -contentAlign | String | left | 表单内容对齐方式:左对齐、右对齐。可选项:left/right | N +labelWidth | String / Number | '100px' | 可以整体设置label标签宽度,默认为100px | N +layout | String | vertical | 表单布局,有两种方式:纵向布局 和 行内布局。可选项:vertical/inline | N +preventSubmitDefault | Boolean | true | 是否阻止表单提交默认事件(表单提交默认事件会刷新页面),设置为 `true` 可以避免刷新 | N requiredMark | Boolean | undefined | 是否显示必填符号(*),默认显示 | N resetType | String | empty | 重置表单的方式,值为 empty 表示重置表单为空,值为 initial 表示重置表单数据为初始值。可选项:empty/initial | N rules | Object | - | 表单字段校验规则。TS 类型:`FormRules` `type FormRules = { [field in keyof T]?: Array }`。[详细类型定义](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/form/type.ts) | N -scrollToFirstError | String | - | 【开发中】表单校验不通过时,是否自动滚动到第一个校验不通过的字段,平滑滚动或是瞬间直达。值为空则表示不滚动。可选项:smooth/auto | N +scrollToFirstError | String | - | 表单校验不通过时,是否自动滚动到第一个校验不通过的字段,平滑滚动或是瞬间直达。值为空则表示不滚动。可选项:''/smooth/auto | N showErrorMessage | Boolean | true | 校验不通过时,是否显示错误提示信息,统一控制全部表单项。如果希望控制单个表单项,请给 FormItem 设置该属性 | N +statusIcon | Boolean / Slot / Function | undefined | 校验状态图标,值为 `true` 显示默认图标,默认图标有 成功、失败、警告 等,不同的状态图标不同。`statusIcon` 值为 `false`,不显示图标。`statusIcon` 值类型为渲染函数,则可以自定义右侧状态图标。TS 类型:`boolean \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N submitWithWarningMessage | Boolean | false | 【讨论中】当校验结果只有告警信息时,是否触发 `submit` 提交事件 | N onReset | Function | | TS 类型:`(context: { e?: FormResetEvent }) => void`
表单重置时触发 | N onSubmit | Function | | TS 类型:`(context: SubmitContext) => void`
表单提交时触发。其中 `context.validateResult` 表示校验结果,`context.firstError` 表示校验不通过的第一个规则提醒。`context.validateResult` 值为 `true` 表示校验通过;如果校验不通过,`context.validateResult` 值为校验结果列表。
【注意】⚠️ 默认情况,输入框按下 Enter 键会自动触发提交事件,如果希望禁用这个默认行为,可以给输入框添加 enter 事件,并在事件中设置 `e.preventDefault()`。[详细类型定义](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/form/type.ts)。
`interface SubmitContext { e?: FormSubmitEvent; validateResult: FormValidateResult; firstError?: string; fields?: any }`

`type FormValidateResult = boolean \| ValidateResultObj`

`type ValidateResultObj = { [key in keyof T]: boolean \| ValidateResultList }`

`type ValidateResultList = Array`

`type AllValidateResult = CustomValidateObj \| ValidateResultType`

`interface ValidateResultType extends FormRule { result: boolean }`

`type ValidateResult = { [key in keyof T]: boolean \| ErrorList }`

`type ErrorList = Array`
| N @@ -52,11 +54,15 @@ help | String / Slot / Function | - | 表单项说明内容。TS 类型:`strin label | String / Slot / Function | '' | 字段标签名称。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N labelAlign | String | - | 表单字段标签对齐方式:左对齐、右对齐、顶部对齐。默认使用 Form 的对齐方式,优先级高于 Form.labelAlign。可选项:left/right/top | N labelWidth | String / Number | - | 可以整体设置标签宽度,优先级高于 Form.labelWidth | N -contentAlign | String | left | 表单内容对齐方式:左对齐、右对齐。可选项:left/right | N name | String / Number | - | 表单字段名称。TS 类型:`string \| number` | N requiredMark | Boolean | undefined | 是否显示必填符号(*),优先级高于 Form.requiredMark | N rules | Array | - | 表单字段校验规则。TS 类型:`Array` | N showErrorMessage | Boolean | undefined | 校验不通过时,是否显示错误提示信息,优先级高于 `Form.showErrorMessage` | N +status | String | - | 校验状态,可在需要完全自主控制校验状态时使用。TS 类型:`'error' \| 'warning' \| 'success' \| 'validating'` | N +statusIcon | Boolean / Slot / Function | undefined | 校验状态图标,值为 `true` 显示默认图标,默认图标有 成功、失败、警告 等,不同的状态图标不同。`statusIcon` 值为 `false`,不显示图标。`statusIcon` 值类型为渲染函数,则可以自定义右侧状态图标。优先级高级 Form 的 statusIcon。TS 类型:`boolean \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N +successBorder | Boolean | false | 是否显示校验成功的边框,默认不显示 | N +tips | String / Slot / Function | - | 自定义提示内容,样式跟随 `status` 变动,可在需要完全自主控制校验规则时使用。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N + ### FormRule 名称 | 类型 | 默认值 | 说明 | 必传 diff --git a/src/link/link.en-US.md b/src/link/link.en-US.md index 708078c03..c79cd316f 100644 --- a/src/link/link.en-US.md +++ b/src/link/link.en-US.md @@ -1,6 +1,7 @@ :: BASE_DOC :: ## API + ### Link Props name | type | default | description | required @@ -12,7 +13,7 @@ hover | Boolean | - | \- | N href | String | - | \- | N prefixIcon | Slot / Function | - | Typescript:`TNode`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N size | String | medium | options:small/medium/large。Typescript:`SizeEnum`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N -suffixIcon | Slot / Function | - | Typescript:`TNode`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N +suffixIcon | Function / Slot / Function | - | Typescript:`function \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N target | String | - | target is an attribute of `
` | N theme | String | default | options:default/primary/danger/warning/success | N underline | Boolean | - | \- | N diff --git a/src/link/link.md b/src/link/link.md index 4e0576efd..06576a5c6 100644 --- a/src/link/link.md +++ b/src/link/link.md @@ -1,6 +1,7 @@ :: BASE_DOC :: ## API + ### Link Props 名称 | 类型 | 默认值 | 说明 | 必传 @@ -12,7 +13,7 @@ hover | Boolean | - | 是否开启点击反馈 | N href | String | - | 跳转链接 | N prefixIcon | Slot / Function | - | 前置图标。TS 类型:`TNode`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N size | String | medium | 尺寸。可选项:small/medium/large。TS 类型:`SizeEnum`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N -suffixIcon | Slot / Function | - | 后置图标。TS 类型:`TNode`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N +suffixIcon | Function / Slot / Function | - | 后置图标。TS 类型:`function \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N target | String | - | 跳转方式,如:当前页面打开、新页面打开等,同 HTML 属性 target 含义相同 | N theme | String | default | 组件风格,依次为默认色、品牌色、危险色、警告色、成功色。可选项:default/primary/danger/warning/success | N underline | Boolean | - | 普通状态是否显示链接下划线 | N diff --git a/src/loading/loading.en-US.md b/src/loading/loading.en-US.md index c3cd950e0..f765c9759 100644 --- a/src/loading/loading.en-US.md +++ b/src/loading/loading.en-US.md @@ -1,6 +1,7 @@ :: BASE_DOC :: ## API + ### Loading Props name | type | default | description | required @@ -9,12 +10,11 @@ content | String / Slot / Function | - | Typescript:`string \| TNode`。[see m default | String / Slot / Function | - | Typescript:`string \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N delay | Number | 0 | \- | N duration | Number | 800 | \- | N -indicator | Boolean | true | \- | N +indicator | Boolean / Slot / Function | true | Typescript:`boolean \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N inheritColor | Boolean | false | \- | N layout | String | horizontal | options:horizontal/vertical | N loading | Boolean | true | \- | N pause | Boolean | false | \- | N -progress | Number | - | \- | N reverse | Boolean | - | \- | N size | String | '20px' | \- | N text | String / Slot / Function | - | Typescript:`string \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N diff --git a/src/loading/loading.md b/src/loading/loading.md index 6fc6b2502..98e40d312 100644 --- a/src/loading/loading.md +++ b/src/loading/loading.md @@ -1,6 +1,7 @@ :: BASE_DOC :: ## API + ### Loading Props 名称 | 类型 | 默认值 | 说明 | 必传 @@ -9,12 +10,11 @@ content | String / Slot / Function | - | 子元素。TS 类型:`string \| TNod default | String / Slot / Function | - | 子元素,同 content。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N delay | Number | 0 | 延迟显示加载效果的时间,用于防止请求速度过快引起的加载闪烁,单位:毫秒 | N duration | Number | 800 | 加载动画执行完成一次的时间,单位:毫秒 | N -indicator | Boolean | true | 是否显示加载指示符 | N +indicator | Boolean / Slot / Function | true | 加载指示符,值为 true 显示默认指示符,值为 false 则不显示,也可以自定义指示符。TS 类型:`boolean \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N inheritColor | Boolean | false | 是否继承父元素颜色 | N layout | String | horizontal | 对齐方式。可选项:horizontal/vertical | N loading | Boolean | true | 是否处于加载状态 | N pause | Boolean | false | 是否暂停动画 | N -progress | Number | - | 加载进度 | N reverse | Boolean | - | 加载动画是否反向 | N size | String | '20px' | 尺寸,示例:20px | N text | String / Slot / Function | - | 加载提示文案。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N diff --git a/src/message/message.en-US.md b/src/message/message.en-US.md index efcee543a..d3a207655 100644 --- a/src/message/message.en-US.md +++ b/src/message/message.en-US.md @@ -17,14 +17,24 @@ theme | String | info | options:info/success/warning/error。Typescript:`Mes visible | Boolean | false | `v-model` and `v-model:visible` is supported | N defaultVisible | Boolean | false | uncontrolled property | N zIndex | Number | - | \- | N +onChange | Function | | Typescript:`(visible: boolean) => void`
`deprecated` | N +onClose | Function | | Typescript:`(context: { trigger: 'close-click' \| 'duration-end', e?: MouseEvent }) => void`
`deprecated`。close message event。Typescript:`string \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N onCloseBtnClick | Function | | Typescript:`(context: { e: MouseEvent }) => void`
| N +onClosed | Function | | Typescript:`() => void`
`deprecated` | N onDurationEnd | Function | | Typescript:`() => void`
| N onLinkClick | Function | | Typescript:`(context: { e: MouseEvent }) => void`
| N +onOpen | Function | | Typescript:`() => void`
`deprecated` | N +onOpened | Function | | Typescript:`() => void`
`deprecated` | N ### Message Events name | params | description -- | -- | -- +change | `(visible: boolean)` | `deprecated` +close | `(context: { trigger: 'close-click' \| 'duration-end', e?: MouseEvent })` | `deprecated`。close message event。Typescript:`string \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) close-btn-click | `(context: { e: MouseEvent })` | \- +closed | \- | `deprecated` duration-end | \- | \- link-click | `(context: { e: MouseEvent })` | \- +open | \- | `deprecated` +opened | \- | `deprecated` diff --git a/src/message/message.md b/src/message/message.md index f42061135..c67565a66 100644 --- a/src/message/message.md +++ b/src/message/message.md @@ -17,14 +17,24 @@ theme | String | info | 消息组件风格。可选项:info/success/warning/er visible | Boolean | false | 是否显示,隐藏时默认销毁组件。支持语法糖 `v-model` 或 `v-model:visible` | N defaultVisible | Boolean | false | 是否显示,隐藏时默认销毁组件。非受控属性 | N zIndex | Number | - | 元素层级,样式默认为 5000 | N +onChange | Function | | TS 类型:`(visible: boolean) => void`
已废弃。可见性变化时触发 | N +onClose | Function | | TS 类型:`(context: { trigger: 'close-click' \| 'duration-end', e?: MouseEvent }) => void`
已废弃。关闭消息时触发。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N onCloseBtnClick | Function | | TS 类型:`(context: { e: MouseEvent }) => void`
当关闭按钮存在时,用户点击关闭按钮触发 | N +onClosed | Function | | TS 类型:`() => void`
已废弃。关闭消息并且动画结束后触发 | N onDurationEnd | Function | | TS 类型:`() => void`
计时结束后触发 | N onLinkClick | Function | | TS 类型:`(context: { e: MouseEvent }) => void`
当link链接存在时,点击链接文本时触发 | N +onOpen | Function | | TS 类型:`() => void`
已废弃。展示Message时触发 | N +onOpened | Function | | TS 类型:`() => void`
已废弃。展示Message时并且动画结束后触发 | N ### Message Events 名称 | 参数 | 描述 -- | -- | -- +change | `(visible: boolean)` | 已废弃。可见性变化时触发 +close | `(context: { trigger: 'close-click' \| 'duration-end', e?: MouseEvent })` | 已废弃。关闭消息时触发。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) close-btn-click | `(context: { e: MouseEvent })` | 当关闭按钮存在时,用户点击关闭按钮触发 +closed | \- | 已废弃。关闭消息并且动画结束后触发 duration-end | \- | 计时结束后触发 link-click | `(context: { e: MouseEvent })` | 当link链接存在时,点击链接文本时触发 +open | \- | 已废弃。展示Message时触发 +opened | \- | 已废弃。展示Message时并且动画结束后触发 diff --git a/src/navbar/navbar.en-US.md b/src/navbar/navbar.en-US.md index d14347f46..eaba71f15 100644 --- a/src/navbar/navbar.en-US.md +++ b/src/navbar/navbar.en-US.md @@ -6,16 +6,16 @@ name | type | default | description | required -- | -- | -- | -- | -- animation | Boolean | true | \- | N -capsule | Slot / Function | - | Typescript:`TNode`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N +background | String | - | background | N fixed | Boolean | true | \- | N -left | Slot / Function | - | Typescript:`TNode`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N +left | String / Slot / Function | - | Typescript:`string \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N leftArrow | Boolean | false | \- | N -right | Slot / Function | - | Typescript:`TNode`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N -title | String / Slot / Function | - | page title。Typescript:`string | TNode`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N +right | String / Slot / Function | - | Typescript:`string \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N +title | String / Slot / Function | - | page title。Typescript:`string \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N titleMaxLength | Number | - | \- | N visible | Boolean | true | \- | N -onLeftClick | Function | | Typescript:`() => void` | N -onRightClick | Function | | Typescript:`() => void` | N +onLeftClick | Function | | Typescript:`() => void`
| N +onRightClick | Function | | Typescript:`() => void`
| N ### Navbar Events diff --git a/src/navbar/navbar.md b/src/navbar/navbar.md index 5e0bf1409..f08e9e258 100644 --- a/src/navbar/navbar.md +++ b/src/navbar/navbar.md @@ -6,20 +6,20 @@ 名称 | 类型 | 默认值 | 说明 | 必传 -- | -- | -- | -- | -- animation | Boolean | true | 是否添加动画效果 | N -capsule | Slot / Function | - | 左侧胶囊区域。TS 类型:`TNode`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N +background | String | - | 背景 | N fixed | Boolean | true | 是否固定在顶部 | N -left | Slot / Function | - | 左侧区域。TS 类型:`TNode`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N -leftArrow | Boolean | false | 是否展示左侧箭头 | N -right | Slot / Function | - | 右侧区域。TS 类型:`TNode`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N -title | String / Slot / Function | - | 页面标题。TS 类型:`string | TNode`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N +left | String / Slot / Function | - | 左侧区域。值为 `string` 表示文本,为其他表示自定义内容。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N +leftArrow | Boolean | false | 是否显示左侧箭头 | N +right | String / Slot / Function | - | 右侧区域。值为 `string` 表示文本,为其他表示自定义内容。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N +title | String / Slot / Function | - | 页面标题。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N titleMaxLength | Number | - | 标题文字最大长度,超出的范围使用 `...` 表示 | N visible | Boolean | true | 是否显示 | N -onLeftClick | Function | | TS 类型:`() => void`
点击左侧按钮时触发 | N -onRightClick | Function | | TS 类型:`() => void`
点击右侧图标时触发 | N +onLeftClick | Function | | TS 类型:`() => void`
点击左侧区域时触发 | N +onRightClick | Function | | TS 类型:`() => void`
点击右侧区域时触发 | N ### Navbar Events 名称 | 参数 | 描述 -- | -- | -- -left-click | \- | 点击左侧按钮时触发 -right-click | \- | 点击右侧图标时触发 +left-click | \- | 点击左侧区域时触发 +right-click | \- | 点击右侧区域时触发 diff --git a/src/navbar/props.ts b/src/navbar/props.ts index e717b3334..e0485bddc 100644 --- a/src/navbar/props.ts +++ b/src/navbar/props.ts @@ -13,27 +13,25 @@ export default { type: Boolean, default: true, }, - /** 左侧胶囊区域 */ - capsule: { - type: Function as PropType, + /** 背景 */ + background: { + type: String, + default: '', }, /** 是否固定在顶部 */ fixed: { type: Boolean, default: true, }, - /** 左侧区域 */ + /** 左侧区域。值为 `string` 表示文本,为其他表示自定义内容 */ left: { - type: Function as PropType, + type: [String, Function] as PropType, }, - /** 是否展示左侧箭头 */ - leftArrow: { - type: Boolean, - default: false, - }, - /** 右侧区域 */ + /** 是否显示左侧箭头 */ + leftArrow: Boolean, + /** 右侧区域。值为 `string` 表示文本,为其他表示自定义内容 */ right: { - type: Function as PropType, + type: [String, Function] as PropType, }, /** 页面标题 */ title: { diff --git a/src/navbar/type.ts b/src/navbar/type.ts index a92b49742..a082b25f4 100644 --- a/src/navbar/type.ts +++ b/src/navbar/type.ts @@ -13,27 +13,28 @@ export interface TdNavbarProps { */ animation?: boolean; /** - * 左侧胶囊区域 + * 背景 + * @default '' */ - capsule?: TNode; + background?: string; /** * 是否固定在顶部 * @default true */ fixed?: boolean; /** - * 左侧区域 + * 左侧区域。值为 `string` 表示文本,为其他表示自定义内容 */ - left?: TNode; + left?: string | TNode; /** - * 是否展示左侧箭头 + * 是否显示左侧箭头 * @default false */ leftArrow?: boolean; /** - * 右侧区域 + * 右侧区域。值为 `string` 表示文本,为其他表示自定义内容 */ - right?: TNode; + right?: string | TNode; /** * 页面标题 */ diff --git a/src/notice-bar/notice-bar.en-US.md b/src/notice-bar/notice-bar.en-US.md index cfa265eff..9597f89bd 100644 --- a/src/notice-bar/notice-bar.en-US.md +++ b/src/notice-bar/notice-bar.en-US.md @@ -7,17 +7,20 @@ name | type | default | description | required -- | -- | -- | -- | -- content | String / Array / Slot / Function | - | Typescript:`string \| string[] \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N direction | String | horizontal | options:horizontal/vertical | N +extra | String / Slot / Function | - | Typescript:`string \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N marquee | Boolean / Object | false | Typescript:`boolean \| DrawMarquee` `interface DrawMarquee { speed?: number; loop?: number; delay?: number }`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/notice-bar/type.ts) | N operation | String / Slot / Function | - | Typescript:`string \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N -prefixIcon | Boolean / Slot / Function | - | Typescript:`Boolean \ | TNode \| Function`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N +prefixIcon | Slot / Function | - | Typescript:`TNode`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N suffixIcon | Slot / Function | - | Typescript:`TNode`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N theme | String | info | options:info/success/warning/error | N visible | Boolean | false | `v-model` and `v-model:visible` is supported | N defaultVisible | Boolean | false | uncontrolled property | N +onChange | Function | | Typescript:`(value: boolean) => void`
`deprecated` | N onClick | Function | | Typescript:`(trigger: NoticeBarTrigger) => void`
[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/notice-bar/type.ts)。
`type NoticeBarTrigger = 'prefix-icon' \| 'content' \| 'operation' \| 'suffix-icon';`
| N ### NoticeBar Events name | params | description -- | -- | -- +change | `(value: boolean)` | `deprecated` click | `(trigger: NoticeBarTrigger)` | [see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/notice-bar/type.ts)。
`type NoticeBarTrigger = 'prefix-icon' \| 'content' \| 'operation' \| 'suffix-icon';`
diff --git a/src/notice-bar/notice-bar.md b/src/notice-bar/notice-bar.md index 975820186..ced8fe0fd 100644 --- a/src/notice-bar/notice-bar.md +++ b/src/notice-bar/notice-bar.md @@ -7,17 +7,20 @@ -- | -- | -- | -- | -- content | String / Array / Slot / Function | - | 文本内容。TS 类型:`string \| string[] \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N direction | String | horizontal | 滚动方向。可选项:horizontal/vertical | N +extra | String / Slot / Function | - | 已废弃。右侧额外信息。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N marquee | Boolean / Object | false | 跑马灯效果。speed 指速度控制;loop 指循环播放次数,值为 -1 表示循环播放,值为 0 表示不循环播放;delay 表示延迟多久开始播放。TS 类型:`boolean \| DrawMarquee` `interface DrawMarquee { speed?: number; loop?: number; delay?: number }`。[详细类型定义](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/notice-bar/type.ts) | N operation | String / Slot / Function | - | 右侧额外信息。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N -prefixIcon | Boolean / Slot / Function | - | 前缀图标。 值为 false 表示不显示前缀图标。TS 类型:`Boolean \ | TNode \ | Function`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N +prefixIcon | Slot / Function | - | 前缀图标。TS 类型:`TNode`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N suffixIcon | Slot / Function | - | 后缀图标。TS 类型:`TNode`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N theme | String | info | 内置主题。可选项:info/success/warning/error | N visible | Boolean | false | 显示/隐藏。支持语法糖 `v-model` 或 `v-model:visible` | N defaultVisible | Boolean | false | 显示/隐藏。非受控属性 | N +onChange | Function | | TS 类型:`(value: boolean) => void`
已废弃。展示或关闭公告栏时触发。参数为true时,代表展示公告栏。参数为false时,代表关闭公告栏 | N onClick | Function | | TS 类型:`(trigger: NoticeBarTrigger) => void`
点击事件。[详细类型定义](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/notice-bar/type.ts)。
`type NoticeBarTrigger = 'prefix-icon' \| 'content' \| 'operation' \| 'suffix-icon';`
| N ### NoticeBar Events 名称 | 参数 | 描述 -- | -- | -- +change | `(value: boolean)` | 已废弃。展示或关闭公告栏时触发。参数为true时,代表展示公告栏。参数为false时,代表关闭公告栏 click | `(trigger: NoticeBarTrigger)` | 点击事件。[详细类型定义](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/notice-bar/type.ts)。
`type NoticeBarTrigger = 'prefix-icon' \| 'content' \| 'operation' \| 'suffix-icon';`
diff --git a/src/popup/popup.en-US.md b/src/popup/popup.en-US.md index b450984e1..1317d2368 100644 --- a/src/popup/popup.en-US.md +++ b/src/popup/popup.en-US.md @@ -8,14 +8,12 @@ name | type | default | description | required attach | String / Function | 'body' | Typescript:`AttachNode`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N closeBtn | Boolean / Slot / Function | - | Typescript:`boolean \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N closeOnOverlayClick | Boolean | true | \- | N -destroyOnClose | Boolean | false | \- | N overlayProps | Object | {} | \- | N placement | String | top | options:top/left/right/bottom/center | N preventScrollThrough | Boolean | true | \- | N showOverlay | Boolean | true | \- | N transitionName | String | - | \- | N visible | Boolean | - | `v-model` and `v-model:visible` is supported。Typescript:`boolean` | N -defaultVisible | Boolean | - | uncontrolled property。Typescript:`boolean` | N zIndex | Number | - | \- | N onClose | Function | | Typescript:`(context: { e: MouseEvent }) => void`
| N onClosed | Function | | Typescript:`() => void`
| N diff --git a/src/popup/popup.md b/src/popup/popup.md index b39739650..a94f1600e 100644 --- a/src/popup/popup.md +++ b/src/popup/popup.md @@ -8,14 +8,12 @@ attach | String / Function | 'body' | 制定挂载节点。数据类型为 String 时,会被当作选择器处理,进行节点查询。示例:'body' 或 () => document.body。TS 类型:`AttachNode`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N closeBtn | Boolean / Slot / Function | - | 是否展示关闭按钮,值为 `true` 显示默认关闭按钮;值为 `false` 则不显示关闭按钮;也可以自定义关闭按钮。TS 类型:`boolean \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N closeOnOverlayClick | Boolean | true | 点击遮罩层是否关闭 | N -destroyOnClose | Boolean | false | 是否在关闭浮层时销毁浮层 | N overlayProps | Object | {} | 遮罩层的属性,透传至 overlay | N placement | String | top | 浮层出现位置。可选项:top/left/right/bottom/center | N -preventScrollThrough | Boolean | true | 是否阻止背景滚动 | N +preventScrollThrough | Boolean | true | 防止滚动穿透 | N showOverlay | Boolean | true | 是否显示遮罩层 | N transitionName | String | - | 弹出层内容区的动画名,等价于transition组件的name属性 | N visible | Boolean | - | 是否显示浮层。支持语法糖 `v-model` 或 `v-model:visible`。TS 类型:`boolean` | N -defaultVisible | Boolean | - | 是否显示浮层。非受控属性。TS 类型:`boolean` | N zIndex | Number | - | 组件层级,Web 侧样式默认为 5500,移动端和小程序样式默认为 1500 | N onClose | Function | | TS 类型:`(context: { e: MouseEvent }) => void`
组件准备关闭时触发 | N onClosed | Function | | TS 类型:`() => void`
组件关闭且动画结束后执行 | N diff --git a/src/rate/rate.en-US.md b/src/rate/rate.en-US.md index e01094f13..fa1a1a31c 100644 --- a/src/rate/rate.en-US.md +++ b/src/rate/rate.en-US.md @@ -1,16 +1,18 @@ :: BASE_DOC :: ## API + ### Rate Props name | type | default | description | required -- | -- | -- | -- | -- allowHalf | Boolean | false | \- | N +clearable | Boolean | false | `deprecated` | N color | String / Array | '#ED7B2F' | Typescript:`string \| Array` | N count | Number | 5 | \- | N disabled | Boolean | - | \- | N -gap | Number | 8 | \- | N -icon | Array / Slot / Function | - | Typescript:`Array`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N +gap | Number | 4 | \- | N +icon | Array / Slot / Function | - | Typescript:`string \| string[]` | N showText | Boolean | false | \- | N size | String | 24px | \- | N texts | Array | [] | Typescript:`Array` | N diff --git a/src/rate/rate.md b/src/rate/rate.md index 3e16bf391..b6045dbb7 100644 --- a/src/rate/rate.md +++ b/src/rate/rate.md @@ -1,16 +1,18 @@ :: BASE_DOC :: ## API + ### Rate Props 名称 | 类型 | 默认值 | 说明 | 必传 -- | -- | -- | -- | -- allowHalf | Boolean | false | 是否允许半选 | N +clearable | Boolean | false | 已废弃。是否允许取消选择 | N color | String / Array | '#ED7B2F' | 评分图标的颜色,样式中默认为 #ED7B2F。一个值表示设置选中高亮的五角星颜色,示例:[选中颜色]。数组则表示分别设置 选中高亮的五角星颜色 和 未选中暗灰的五角星颜色,[选中颜色,未选中颜色]。示例:['#ED7B2F', '#E3E6EB']。。TS 类型:`string \| Array` | N count | Number | 5 | 评分的数量 | N disabled | Boolean | - | 是否禁用评分 | N -gap | Number | 8 | 评分图标的间距 | N -icon | Array / Slot / Function | - | 自定义评分图标,[选中图标,未选中图标]。TS 类型:`Array`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N +gap | Number | 4 | 评分图标的间距 | N +icon | Array / Slot / Function | - | 自定义评分图标,[选中图标,未选中图标]。TS 类型:`string \| string[]` | N showText | Boolean | false | 是否显示对应的辅助文字 | N size | String | 24px | 评分图标的大小 | N texts | Array | [] | 评分等级对应的辅助文字。组件内置默认值为:['极差', '失望', '一般', '满意', '惊喜']。自定义值示例:['1分', '2分', '3分', '4分', '5分']。TS 类型:`Array` | N diff --git a/src/search/search.en-US.md b/src/search/search.en-US.md index d84cd6635..846be689b 100644 --- a/src/search/search.en-US.md +++ b/src/search/search.en-US.md @@ -11,7 +11,7 @@ center | Boolean | false | \- | N clearable | Boolean | true | \- | N disabled | Boolean | - | \- | N focus | Boolean | false | \- | N -leftIcon | Slot / Function | 'search' | Typescript:`TNode`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N +leftIcon | String / Slot / Function | 'search' | Typescript:`string \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N placeholder | String | '' | \- | N readonly | Boolean | false | \- | N shape | String | 'square' | options:square/round | N @@ -31,7 +31,7 @@ name | params | description -- | -- | -- action-click | `(context: { e: MouseEvent })` | \- blur | `(context: { value: string; e: FocusEvent })` | \- -change | `(value: string, context: { e?: InputEvent \| MouseEvent })` | \- +change | `(value: string, context: { trigger: 'input-change' \| 'option-click'; e?: InputEvent \| MouseEvent })` | \- clear | `(context: { e: MouseEvent })` | \- focus | `(context: { value: string; e: FocusEvent })` | \- search | `(context?: { value: string; trigger: 'submit' \| 'option-click' \| 'clear'; e?: InputEvent \| MouseEvent })` | \- diff --git a/src/search/search.md b/src/search/search.md index 0d6ab9913..a0d23e905 100644 --- a/src/search/search.md +++ b/src/search/search.md @@ -11,7 +11,7 @@ center | Boolean | false | 是否居中 | N clearable | Boolean | true | 是否可清空 | N disabled | Boolean | - | 禁用状态 | N focus | Boolean | false | 是否聚焦 | N -leftIcon | String / Slot / Function | 'search' | 左侧图标。TS 类型:`TNode`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N +leftIcon | String / Slot / Function | 'search' | 左侧图标。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N placeholder | String | '' | 占位符 | N readonly | Boolean | false | 只读状态 | N shape | String | 'square' | 搜索框形状。可选项:square/round | N @@ -31,7 +31,7 @@ onSubmit | Function | | TS 类型:`(context: { value: string; e: KeyboardEven -- | -- | -- action-click | `(context: { e: MouseEvent })` | 点击搜索框右侧操作内容时触发 blur | `(context: { value: string; e: FocusEvent })` | 失去焦点时触发 -change | `(value: string, context: { e?: InputEvent \| MouseEvent })` | 搜索关键词发生变化时触发,可能场景有:搜索框内容发生变化、点击联想词 +change | `(value: string, context: { trigger: 'input-change' \| 'option-click'; e?: InputEvent \| MouseEvent })` | 搜索关键词发生变化时触发,可能场景有:搜索框内容发生变化、点击联想词 clear | `(context: { e: MouseEvent })` | 点击清除时触发 focus | `(context: { value: string; e: FocusEvent })` | 获得焦点时触发 search | `(context?: { value: string; trigger: 'submit' \| 'option-click' \| 'clear'; e?: InputEvent \| MouseEvent })` | 【讨论中】搜索触发,包含:手机键盘提交健、联想关键词点击、清空按钮点击等 diff --git a/src/select/props.ts b/src/select/props.ts new file mode 100644 index 000000000..e0405f67e --- /dev/null +++ b/src/select/props.ts @@ -0,0 +1,23 @@ +/* eslint-disable */ + +/** + * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC + * */ + +import { TdSelectProps } from './type'; +import { PropType } from 'vue'; + +export default { + /** 透传 SelectInput 筛选器输入框组件的全部属性 */ + selectInputProps: { + type: Object as PropType, + }, + /** 透传 TagInput 标签输入框组件的全部属性 */ + tagInputProps: { + type: Object as PropType, + }, + /** 透传 Tag 标签组件全部属性 */ + tagProps: { + type: Object as PropType, + }, +}; diff --git a/src/select/select.en-US.md b/src/select/select.en-US.md new file mode 100644 index 000000000..862e1c4c5 --- /dev/null +++ b/src/select/select.en-US.md @@ -0,0 +1,11 @@ +:: BASE_DOC :: + +## API + +### Select Props + +name | type | default | description | required +-- | -- | -- | -- | -- +selectInputProps | Object | - | Typescript:`SelectInputProps`,[SelectInput API Documents](./select-input?tab=api)。[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/select/type.ts) | N +tagInputProps | Object | - | Typescript:`TagInputProps`,[TagInput API Documents](./tag-input?tab=api)。[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/select/type.ts) | N +tagProps | Object | - | Typescript:`TagProps`,[Tag API Documents](./tag?tab=api)。[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/select/type.ts) | N diff --git a/src/select/select.md b/src/select/select.md new file mode 100644 index 000000000..b77dc20a0 --- /dev/null +++ b/src/select/select.md @@ -0,0 +1,11 @@ +:: BASE_DOC :: + +## API + +### Select Props + +名称 | 类型 | 默认值 | 说明 | 必传 +-- | -- | -- | -- | -- +selectInputProps | Object | - | 透传 SelectInput 筛选器输入框组件的全部属性。TS 类型:`SelectInputProps`,[SelectInput API Documents](./select-input?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/select/type.ts) | N +tagInputProps | Object | - | 透传 TagInput 标签输入框组件的全部属性。TS 类型:`TagInputProps`,[TagInput API Documents](./tag-input?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/select/type.ts) | N +tagProps | Object | - | 透传 Tag 标签组件全部属性。TS 类型:`TagProps`,[Tag API Documents](./tag?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/select/type.ts) | N diff --git a/src/select/type.ts b/src/select/type.ts new file mode 100644 index 000000000..635ed2089 --- /dev/null +++ b/src/select/type.ts @@ -0,0 +1,24 @@ +/* eslint-disable */ + +/** + * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC + * */ + +import { SelectInputProps } from '../select-input'; +import { TagInputProps } from '../tag-input'; +import { TagProps } from '../tag'; + +export interface TdSelectProps { + /** + * 透传 SelectInput 筛选器输入框组件的全部属性 + */ + selectInputProps?: SelectInputProps; + /** + * 透传 TagInput 标签输入框组件的全部属性 + */ + tagInputProps?: TagInputProps; + /** + * 透传 Tag 标签组件全部属性 + */ + tagProps?: TagProps; +} diff --git a/src/skeleton/skeleton.en-US.md b/src/skeleton/skeleton.en-US.md index 21602f5be..ad1ff93fe 100644 --- a/src/skeleton/skeleton.en-US.md +++ b/src/skeleton/skeleton.en-US.md @@ -9,5 +9,5 @@ name | type | default | description | required animation | String | none | options:gradient/flashed/none | N delay | Number | 0 | \- | N loading | Boolean | true | \- | N -rowCol | Array | - | Typescript:`SkeletonRowCol` `type SkeletonRowCol = Array>` `interface SkeletonRowColObj { width?: string; height?: string; size?: string; marginRight?: string; marginLeft?: string; margin?: string; content?: string \| TNode; type?: 'rect' \| 'circle' \| 'text' }`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts)。[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/skeleton/type.ts) | N +rowCol | Array | [1, 1, 1, { width: '70%' }] | Typescript:`SkeletonRowCol` `type SkeletonRowCol = Array>` `interface SkeletonRowColObj { width?: string; height?: string; size?: string; marginRight?: string; marginLeft?: string; margin?: string; content?: string \| TNode; type?: 'rect' \| 'circle' \| 'text' }`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts)。[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/skeleton/type.ts) | N theme | String | text | options:avatar/image/text/paragraph | N diff --git a/src/skeleton/skeleton.md b/src/skeleton/skeleton.md index 2544d7fb6..f09e2a28d 100644 --- a/src/skeleton/skeleton.md +++ b/src/skeleton/skeleton.md @@ -1,6 +1,7 @@ :: BASE_DOC :: ## API + ### Skeleton Props 名称 | 类型 | 默认值 | 说明 | 必传 @@ -8,5 +9,5 @@ animation | String | none | 动画效果,有「渐变加载动画」和「闪烁加载动画」两种。值为 'none' 则表示没有动画。可选项:gradient/flashed/none | N delay | Number | 0 | 延迟显示加载效果的时间,用于防止请求速度过快引起的加载闪烁,单位:毫秒 | N loading | Boolean | true | 是否为加载状态,如果是则显示骨架图,如果不是则显示加载完成的内容 | N -rowCol | Array | - | 高级设置,用于自定义行列数量、宽度高度、间距等。【示例一】,`[1, 1, 2]` 表示输出三行骨架图,第一行一列,第二行一列,第三行两列。【示例二】,`[1, 1, { width: '100px' }]` 表示自定义第三行的宽度为 `100px`。【示例三】,`[1, 2, [{ width, height }, { width, height, marginLeft }]]` 表示第三行有两列,且自定义宽度、高度、尺寸(圆形或方形使用)、间距、内容等。TS 类型:`SkeletonRowCol` `type SkeletonRowCol = Array>` `interface SkeletonRowColObj { width?: string; height?: string; size?: string; marginRight?: string; marginLeft?: string; margin?: string; content?: string \| TNode; type?: 'rect' \| 'circle' \| 'text' }`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts)。[详细类型定义](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/skeleton/type.ts) | N +rowCol | Array | [1, 1, 1, { width: '70%' }] | 高级设置,用于自定义行列数量、宽度高度、间距等。【示例一】,`[1, 1, 2]` 表示输出三行骨架图,第一行一列,第二行一列,第三行两列。【示例二】,`[1, 1, { width: '100px' }]` 表示自定义第三行的宽度为 `100px`。【示例三】,`[1, 2, [{ width, height }, { width, height, marginLeft }]]` 表示第三行有两列,且自定义宽度、高度、尺寸(圆形或方形使用)、间距、内容等。TS 类型:`SkeletonRowCol` `type SkeletonRowCol = Array>` `interface SkeletonRowColObj { width?: string; height?: string; size?: string; marginRight?: string; marginLeft?: string; margin?: string; content?: string \| TNode; type?: 'rect' \| 'circle' \| 'text' }`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts)。[详细类型定义](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/skeleton/type.ts) | N theme | String | text | 骨架图风格,有基础、头像组合等两大类。可选项:avatar/image/text/paragraph | N diff --git a/src/slider/slider.md b/src/slider/slider.md index 829069fb1..c062677df 100644 --- a/src/slider/slider.md +++ b/src/slider/slider.md @@ -17,9 +17,13 @@ theme | String | default | 滑块风格。可选项:default/capsule | N value | Number / Array | 0 | 滑块值。支持语法糖 `v-model` 或 `v-model:value`。TS 类型:`SliderValue` `type SliderValue = number \| Array`。[详细类型定义](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/slider/type.ts) | N defaultValue | Number / Array | 0 | 滑块值。非受控属性。TS 类型:`SliderValue` `type SliderValue = number \| Array`。[详细类型定义](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/slider/type.ts) | N onChange | Function | | TS 类型:`(value: SliderValue) => void`
滑块值变化时触发 | N +onDragend | Function | | TS 类型:`() => void`
结束拖动时触发 | N +onDragstart | Function | | TS 类型:`() => void`
开始拖动时触发 | N ### Slider Events 名称 | 参数 | 描述 -- | -- | -- change | `(value: SliderValue)` | 滑块值变化时触发 +dragend | \- | 结束拖动时触发 +dragstart | \- | 开始拖动时触发 diff --git a/src/stepper/stepper.en-US.md b/src/stepper/stepper.en-US.md index 20fd3427e..d5ad3969f 100644 --- a/src/stepper/stepper.en-US.md +++ b/src/stepper/stepper.en-US.md @@ -1,6 +1,7 @@ :: BASE_DOC :: ## API + ### Stepper Props name | type | default | description | required @@ -17,7 +18,6 @@ value | String / Number | 0 | `v-model` and `v-model:value` is supported | N defaultValue | String / Number | 0 | uncontrolled property | N onBlur | Function | | Typescript:`(value: string \| number) => void`
| N onChange | Function | | Typescript:`(value: string \| number) => void`
| N -onFocus | Function | | Typescript:`(value: string \| number) => void`
| N onOverlimit | Function | | Typescript:`(type: 'minus' \| 'plus') => void`
| N ### Stepper Events @@ -26,5 +26,4 @@ name | params | description -- | -- | -- blur | `(value: string \| number)` | \- change | `(value: string \| number)` | \- -focus | `(value: string \| number)` | \- overlimit | `(type: 'minus' \| 'plus')` | \- diff --git a/src/stepper/stepper.md b/src/stepper/stepper.md index 9f9163c95..ea42801ae 100644 --- a/src/stepper/stepper.md +++ b/src/stepper/stepper.md @@ -1,6 +1,7 @@ :: BASE_DOC :: ## API + ### Stepper Props 名称 | 类型 | 默认值 | 说明 | 必传 @@ -17,7 +18,6 @@ value | String / Number | 0 | 值。支持语法糖 `v-model` 或 `v-model:value defaultValue | String / Number | 0 | 值。非受控属性 | N onBlur | Function | | TS 类型:`(value: string \| number) => void`
输入框失去焦点时触发 | N onChange | Function | | TS 类型:`(value: string \| number) => void`
数值发生变更时触发 | N -onFocus | Function | | TS 类型:`(value: string \| number) => void`
输入框聚焦时触发 | N onOverlimit | Function | | TS 类型:`(type: 'minus' \| 'plus') => void`
数值超出限制时触发 | N ### Stepper Events @@ -26,5 +26,4 @@ onOverlimit | Function | | TS 类型:`(type: 'minus' \| 'plus') => void`
-- | -- | -- blur | `(value: string \| number)` | 输入框失去焦点时触发 change | `(value: string \| number)` | 数值发生变更时触发 -focus | `(value: string \| number)` | 输入框聚焦时触发 overlimit | `(type: 'minus' \| 'plus')` | 数值超出限制时触发 diff --git a/src/tabs/tabs.en-US.md b/src/tabs/tabs.en-US.md index 0427cf9b9..5a7065ed4 100644 --- a/src/tabs/tabs.en-US.md +++ b/src/tabs/tabs.en-US.md @@ -7,6 +7,7 @@ name | type | default | description | required -- | -- | -- | -- | -- animation | Object | - | Typescript:`TabAnimation` `type TabAnimation = { duration: number } & Record`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/tabs/type.ts) | N list | Array | - | Typescript:`Array` | N +placement | String | top | options:left/top | N showBottomLine | Boolean | true | \- | N size | String | medium | options:medium/large | N spaceEvenly | Boolean | true | \- | N diff --git a/src/tabs/tabs.md b/src/tabs/tabs.md index 1a4cc9da0..63f647ec2 100644 --- a/src/tabs/tabs.md +++ b/src/tabs/tabs.md @@ -7,6 +7,7 @@ -- | -- | -- | -- | -- animation | Object | - | 动画效果设置。其中 duration 表示动画时长。TS 类型:`TabAnimation` `type TabAnimation = { duration: number } & Record`。[详细类型定义](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/tabs/type.ts) | N list | Array | - | 选项卡列表。TS 类型:`Array` | N +placement | String | top | 已废弃。选项卡位置。可选项:left/top | N showBottomLine | Boolean | true | 是否展示底部激活线条 | N size | String | medium | 组件尺寸。可选项:medium/large | N spaceEvenly | Boolean | true | 选项卡头部空间是否均分 | N diff --git a/src/textarea/textarea.en-US.md b/src/textarea/textarea.en-US.md index e5a72112a..f1905fcaf 100644 --- a/src/textarea/textarea.en-US.md +++ b/src/textarea/textarea.en-US.md @@ -1,6 +1,7 @@ :: BASE_DOC :: ## API + ### Textarea Props name | type | default | description | required @@ -8,11 +9,9 @@ name | type | default | description | required allowInputOverMax | Boolean | false | \- | N autofocus | Boolean | false | \- | N autosize | Boolean | false | \- | N -bordered | Boolean | false | \- | N disabled | Boolean | false | \- | N indicator | Boolean | false | \- | N label | String / Slot / Function | - | Typescript:`string \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N -layout | String | horizontal | maxcharacter | Number | - | \- | N maxlength | Number | - | \- | N name | String | - | \- | N diff --git a/src/textarea/textarea.md b/src/textarea/textarea.md index 4b6ab8fc8..5951c9865 100644 --- a/src/textarea/textarea.md +++ b/src/textarea/textarea.md @@ -1,6 +1,7 @@ :: BASE_DOC :: ## API + ### Textarea Props 名称 | 类型 | 默认值 | 说明 | 必传 @@ -8,11 +9,9 @@ allowInputOverMax | Boolean | false | 超出maxlength或maxcharacter之后是否还允许输入 | N autofocus | Boolean | false | 自动聚焦,拉起键盘 | N autosize | Boolean | false | 是否自动增高,值为 autosize 时,style.height 不生效 | N -bordered | Boolean | false | 是否显示外边框 | N disabled | Boolean | false | 是否禁用文本框 | N indicator | Boolean | false | 显示文本计数器,如 0/140。当 maxlength < 0 && maxcharacter < 0 成立时, indicator无效 | N label | String / Slot / Function | - | 左侧文本。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N -layout | String | horizontal | 标题输入框布局方式。可选项:vertical/horizontal | N maxcharacter | Number | - | 用户最多可以输入的字符个数,一个中文汉字表示两个字符长度 | N maxlength | Number | - | 用户最多可以输入的字符个数 | N name | String | - | 名称,HTML 元素原生属性 | N diff --git a/src/time-line/props.ts b/src/time-line/props.ts new file mode 100644 index 000000000..16ae79ed9 --- /dev/null +++ b/src/time-line/props.ts @@ -0,0 +1,49 @@ +/* eslint-disable */ + +/** + * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC + * */ + +import { TdTimeLineProps } from './type'; +import { PropType } from 'vue'; + +export default { + /** 标签信息放在时间轴的位置,`mode='alternate'` 时生效。纵向时间轴信息位置:左侧、右侧或两侧,默认信息在时间轴右侧。横向时间轴信息位置:上方、下方、两侧 */ + labelAlign: { + type: String as PropType, + default: 'right' as TdTimeLineProps['labelAlign'], + validator(val: TdTimeLineProps['labelAlign']): boolean { + if (!val) return true; + return ['left', 'right', 'alternate', 'top', 'bottom'].includes(val); + }, + }, + /** 时间轴方向:水平方向、垂直方向 */ + layout: { + type: String as PropType, + default: 'vertical' as TdTimeLineProps['layout'], + validator(val: TdTimeLineProps['layout']): boolean { + if (!val) return true; + return ['horizontal', 'vertical'].includes(val); + }, + }, + /** 标签与内容文本的位置关系,`alternate` 为展示在轴两侧,`same` 为展示在同一侧 */ + mode: { + type: String as PropType, + default: 'alternate' as TdTimeLineProps['mode'], + validator(val: TdTimeLineProps['mode']): boolean { + if (!val) return true; + return ['alternate', 'same'].includes(val); + }, + }, + /** 时间轴是否表现为倒序 */ + reverse: Boolean, + /** 步骤条风格 */ + theme: { + type: String as PropType, + default: 'default' as TdTimeLineProps['theme'], + validator(val: TdTimeLineProps['theme']): boolean { + if (!val) return true; + return ['default', 'dot'].includes(val); + }, + }, +}; diff --git a/src/time-line/time-line-item-props.ts b/src/time-line/time-line-item-props.ts new file mode 100644 index 000000000..e69de29bb diff --git a/src/time-line/time-line.en-US.md b/src/time-line/time-line.en-US.md new file mode 100644 index 000000000..215ca5128 --- /dev/null +++ b/src/time-line/time-line.en-US.md @@ -0,0 +1 @@ +:: BASE_DOC :: diff --git a/src/time-line/time-line.md b/src/time-line/time-line.md new file mode 100644 index 000000000..215ca5128 --- /dev/null +++ b/src/time-line/time-line.md @@ -0,0 +1 @@ +:: BASE_DOC :: diff --git a/src/time-line/type.ts b/src/time-line/type.ts new file mode 100644 index 000000000..802c4d6e6 --- /dev/null +++ b/src/time-line/type.ts @@ -0,0 +1,63 @@ +/* eslint-disable */ + +/** + * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC + * */ + +import { TNode } from '../common'; + +export interface TdTimeLineProps { + /** + * 标签信息放在时间轴的位置,`mode='alternate'` 时生效。纵向时间轴信息位置:左侧、右侧或两侧,默认信息在时间轴右侧。横向时间轴信息位置:上方、下方、两侧 + * @default right + */ + labelAlign?: 'left' | 'right' | 'alternate' | 'top' | 'bottom'; + /** + * 时间轴方向:水平方向、垂直方向 + * @default vertical + */ + layout?: 'horizontal' | 'vertical'; + /** + * 标签与内容文本的位置关系,`alternate` 为展示在轴两侧,`same` 为展示在同一侧 + * @default alternate + */ + mode?: 'alternate' | 'same'; + /** + * 时间轴是否表现为倒序 + * @default false + */ + reverse?: boolean; + /** + * 步骤条风格 + * @default default + */ + theme?: 'default' | 'dot'; +} + +export interface TdTimeLineItemProps { + /** + * 描述内容 + */ + content?: string | TNode; + /** + * 用于自定义时间轴节点元素 + */ + dot?: TNode; + /** + * 时间轴颜色,内置 `primary/warning/error/default` 四种色值,可传入 16 进制颜色码或 RGB 颜色值. + * @default default + */ + dotColor?: string; + /** + * 标签文本内容,可完全自定义 + */ + label?: string | TNode; + /** + * 标签信息相对于时间轴的位置,在 `mode='alternate'` 时生效,优先级高于 `TimeLine.labelAlign` + */ + labelAlign?: 'left' | 'right' | 'top' | 'bottom'; + /** + * 当前步骤状态:默认状态(未开始)、进行中状态、完成状态 + */ + status?: 'default' | 'process' | 'finish'; +} diff --git a/src/toast/toast.en-US.md b/src/toast/toast.en-US.md index 77faaec71..1810e5f37 100644 --- a/src/toast/toast.en-US.md +++ b/src/toast/toast.en-US.md @@ -10,6 +10,7 @@ duration | Number | 2000 | \- | N icon | String / Slot / Function | - | Typescript:`string \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N message | String / Slot / Function | - | Typescript:`string \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N overlayProps | Object | {} | Typescript:`OverlayProps `,[Overlay API Documents](./overlay?tab=api)。[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/toast/type.ts) | N +placement | String | middle | options: top/middle/bottom | N preventScrollThrough | Boolean | false | \- | N showOverlay | Boolean | false | \- | N theme | String | - | options:loading/success/error | N @@ -21,4 +22,4 @@ onDestroy | Function | | Typescript:`() => void`
| N name | params | description -- | -- | -- close | \- | \- -Destroy | \- | \- +destroy | \- | \-