diff --git a/db/TDesign.db b/db/TDesign.db index 4080955fd..6194fe695 100644 Binary files a/db/TDesign.db and b/db/TDesign.db differ diff --git a/packages/products/tdesign-miniprogram/src/rate/README.en-US.md b/packages/products/tdesign-miniprogram/src/rate/README.en-US.md index 41de01fbc..858fef87d 100644 --- a/packages/products/tdesign-miniprogram/src/rate/README.en-US.md +++ b/packages/products/tdesign-miniprogram/src/rate/README.en-US.md @@ -11,7 +11,7 @@ custom-style | Object | - | CSS(Cascading Style Sheets),used to set style on v allow-half | Boolean | false | \- | N color | String / Array | '#ED7B2F' | `0.30.0`。Typescript:`string \| Array` | N count | Number | 5 | \- | N -disabled | Boolean | - | \- | N +disabled | Boolean | undefined | \- | N gap | Number | 8 | \- | N icon | String / Array | - | `0.30.0`。Typescript:`string \| string[]` | N icon-prefix | String | undefined | \- | N diff --git a/packages/products/tdesign-miniprogram/src/rate/README.md b/packages/products/tdesign-miniprogram/src/rate/README.md index b1a76e01f..0574b2c9c 100644 --- a/packages/products/tdesign-miniprogram/src/rate/README.md +++ b/packages/products/tdesign-miniprogram/src/rate/README.md @@ -11,7 +11,7 @@ custom-style | Object | - | 样式,一般用于开启虚拟化组件节点场 allow-half | Boolean | false | 是否允许半选 | N color | String / Array | '#ED7B2F' | `0.30.0`。评分图标的颜色,样式中默认为 #ED7B2F。一个值表示设置选中高亮的五角星颜色,示例:[选中颜色]。数组则表示分别设置 选中高亮的五角星颜色 和 未选中暗灰的五角星颜色,[选中颜色,未选中颜色]。示例:['#ED7B2F', '#E3E6EB']。TS 类型:`string \| Array` | N count | Number | 5 | 评分的数量 | N -disabled | Boolean | - | 是否禁用评分 | N +disabled | Boolean | undefined | 是否禁用评分 | N gap | Number | 8 | 评分图标的间距 | N icon | String / Array | - | `0.30.0`。自定义评分图标,[选中图标,未选中图标]。TS 类型:`string \| string[]` | N icon-prefix | String | undefined | 定义图标前缀 | N diff --git a/packages/products/tdesign-miniprogram/src/rate/props.ts b/packages/products/tdesign-miniprogram/src/rate/props.ts index 2d8c8991a..c1e63355e 100644 --- a/packages/products/tdesign-miniprogram/src/rate/props.ts +++ b/packages/products/tdesign-miniprogram/src/rate/props.ts @@ -23,19 +23,34 @@ const props: TdRateProps = { }, /** 是否禁用评分 */ disabled: { - type: Boolean, + type: null, + value: undefined, }, /** 评分图标的间距 */ gap: { type: Number, - value: 4, + value: 8, + }, + /** 自定义评分图标,[选中图标,未选中图标] */ + icon: { + type: null, + }, + /** 定义图标前缀 */ + iconPrefix: { + type: String, + value: undefined, + }, + /** 选择评分弹框的位置 */ + placement: { + type: String, + value: 'top', }, /** 是否显示对应的辅助文字 */ showText: { type: Boolean, value: false, }, - /** 评分图标的大小,示例:`20px` */ + /** 评分图标的大小 */ size: { type: String, value: '24px', @@ -60,7 +75,7 @@ const props: TdRateProps = { type: Number, value: 0, }, - /** 形状类型,有描边类型和填充类型两种 */ + /** 已废弃。形状类型,有描边类型和填充类型两种 */ variant: { type: String, value: 'outline', diff --git a/packages/products/tdesign-miniprogram/src/rate/type.ts b/packages/products/tdesign-miniprogram/src/rate/type.ts index 7d038150f..07e5381c1 100644 --- a/packages/products/tdesign-miniprogram/src/rate/type.ts +++ b/packages/products/tdesign-miniprogram/src/rate/type.ts @@ -4,8 +4,6 @@ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC * */ -import { TNode } from '../common/common'; - export interface TdRateProps { /** * 是否允许半选 @@ -40,18 +38,33 @@ export interface TdRateProps { }; /** * 评分图标的间距 - * @default 4 + * @default 8 */ gap?: { type: NumberConstructor; value?: number; }; /** - * 自定义评分图标,插槽参数:{ type: 'grey' | 'highlight' | 'half' },分别表示 灰色图标、高亮图标 和 半分图标 + * 自定义评分图标,[选中图标,未选中图标] */ icon?: { - type: undefined; - value?: TNode<{ type: 'grey' | 'highlight' | 'half' }>; + type: null; + value?: string | string[]; + }; + /** + * 定义图标前缀 + */ + iconPrefix?: { + type: StringConstructor; + value?: string; + }; + /** + * 选择评分弹框的位置 + * @default top + */ + placement?: { + type: StringConstructor; + value?: 'top' | 'bottom'; }; /** * 是否显示对应的辅助文字 @@ -62,7 +75,7 @@ export interface TdRateProps { value?: boolean; }; /** - * 评分图标的大小,示例:`20px` + * 评分图标的大小 * @default 24px */ size?: { @@ -102,7 +115,7 @@ export interface TdRateProps { value?: number; }; /** - * 形状类型,有描边类型和填充类型两种 + * 已废弃。形状类型,有描边类型和填充类型两种 * @default outline */ variant?: { diff --git a/packages/products/tdesign-miniprogram/src/slider/README.en-US.md b/packages/products/tdesign-miniprogram/src/slider/README.en-US.md index b6c196e1e..39f7f136a 100644 --- a/packages/products/tdesign-miniprogram/src/slider/README.en-US.md +++ b/packages/products/tdesign-miniprogram/src/slider/README.en-US.md @@ -9,7 +9,7 @@ name | type | default | description | required style | Object | - | CSS(Cascading Style Sheets) | N custom-style | Object | - | CSS(Cascading Style Sheets),used to set style on virtual component | N colors | Array | [] | `deprecated`。Typescript:`Array` | N -disabled | Boolean | false | \- | N +disabled | Boolean | undefined | \- | N disabled-color | Array | [] | `deprecated`。Typescript:`Array` | N label | String / Boolean | false | Typescript:`string \| boolean` | N marks | Object / Array | {} | Typescript:`Record \| Array` | N diff --git a/packages/products/tdesign-miniprogram/src/slider/README.md b/packages/products/tdesign-miniprogram/src/slider/README.md index 5cfd87481..69892d241 100644 --- a/packages/products/tdesign-miniprogram/src/slider/README.md +++ b/packages/products/tdesign-miniprogram/src/slider/README.md @@ -9,7 +9,7 @@ style | Object | - | 样式 | N custom-style | Object | - | 样式,一般用于开启虚拟化组件节点场景 | N colors | Array | [] | 已废弃。颜色,[已选择, 未选择]。TS 类型:`Array` | N -disabled | Boolean | false | 是否禁用组件 | N +disabled | Boolean | undefined | 是否禁用组件 | N disabled-color | Array | [] | 已废弃。禁用状态滑动条的颜色,[已选, 未选]。TS 类型:`Array` | N label | String / Boolean | false | 滑块当前值文本。
值为 true 显示默认文案;值为 false 不显示滑块当前值文本;
值为 `${value}%` 则表示组件会根据占位符渲染文案;
值类型为函数时,参数 `value` 标识滑块值,参数 `position=start` 表示范围滑块的起始值,参数 `position=end` 表示范围滑块的终点值。TS 类型:`string \| boolean` | N marks | Object / Array | {} | 刻度标记,示例:`[0, 10, 40, 200]` 或者 `{ 5: '5¥', 10: '10%' }`。TS 类型:`Record \| Array` | N diff --git a/packages/products/tdesign-miniprogram/src/slider/props.ts b/packages/products/tdesign-miniprogram/src/slider/props.ts index 87404be55..8fbef625c 100644 --- a/packages/products/tdesign-miniprogram/src/slider/props.ts +++ b/packages/products/tdesign-miniprogram/src/slider/props.ts @@ -6,20 +6,10 @@ import { TdSliderProps } from './type'; const props: TdSliderProps = { - /** 颜色,[已选择, 未选择] */ - colors: { - type: Array, - value: ['#0052D9', 'rgba(220, 220, 220, 1)'], - }, /** 是否禁用组件 */ disabled: { - type: Boolean, - value: false, - }, - /** 禁用状态滑动条的颜色,[已选, 未选] */ - disabledColor: { - type: Array, - value: ['#bbd3fb', '#dcdcdc'], + type: null, + value: undefined, }, /** 组件类名,分别用于设置 组件外层元素、滑道底部、滑道激活态、滑道禁用态、游标 等元素类名 */ externalClasses: { @@ -65,6 +55,11 @@ const props: TdSliderProps = { type: String, value: '', }, + /** 滑块风格 */ + theme: { + type: String, + value: 'default', + }, /** 滑块值 */ value: { type: null, @@ -75,6 +70,11 @@ const props: TdSliderProps = { type: null, value: 0, }, + /** 是否是垂直的滑块(渲染垂直滑块时,默认高度为400rpx,可通过修改`--td-slider-bar-height`来自定义高度) */ + vertical: { + type: Boolean, + value: false, + }, }; export default props; diff --git a/packages/products/tdesign-miniprogram/src/slider/type.ts b/packages/products/tdesign-miniprogram/src/slider/type.ts index b5c92a5a0..608fec9c1 100644 --- a/packages/products/tdesign-miniprogram/src/slider/type.ts +++ b/packages/products/tdesign-miniprogram/src/slider/type.ts @@ -4,33 +4,14 @@ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC * */ -import { TNode } from '../common/common'; - export interface TdSliderProps { - /** - * 颜色,[已选择, 未选择] - * @default ['#0052D9', 'rgba(220, 220, 220, 1)'] - */ - colors?: { - type: ArrayConstructor; - value?: Array; - }; /** * 是否禁用组件 - * @default false */ disabled?: { type: BooleanConstructor; value?: boolean; }; - /** - * 禁用状态滑动条的颜色,[已选, 未选] - * @default ['#bbd3fb', '#dcdcdc'] - */ - disabledColor?: { - type: ArrayConstructor; - value?: Array; - }; /** * 组件类名,分别用于设置 组件外层元素、滑道底部、滑道激活态、滑道禁用态、游标 等元素类名 */ @@ -44,7 +25,7 @@ export interface TdSliderProps { */ label?: { type: null; - value?: string | boolean | TNode<{ value: SliderValue; position?: 'start' | 'end' }>; + value?: string | boolean; }; /** * 刻度标记,示例:`[0, 10, 40, 200]` 或者 `{ 5: '5¥', 10: '10%' }` @@ -102,6 +83,14 @@ export interface TdSliderProps { type: StringConstructor; value?: string; }; + /** + * 滑块风格 + * @default default + */ + theme?: { + type: StringConstructor; + value?: 'default' | 'capsule'; + }; /** * 滑块值 * @default 0 @@ -118,6 +107,14 @@ export interface TdSliderProps { type: null; value?: SliderValue; }; + /** + * 是否是垂直的滑块(渲染垂直滑块时,默认高度为400rpx,可通过修改`--td-slider-bar-height`来自定义高度) + * @default false + */ + vertical?: { + type: BooleanConstructor; + value?: boolean; + }; } export type SliderValue = number | Array; diff --git a/packages/products/tdesign-miniprogram/src/stepper/README.en-US.md b/packages/products/tdesign-miniprogram/src/stepper/README.en-US.md index 74cd4eb11..5bc09072d 100644 --- a/packages/products/tdesign-miniprogram/src/stepper/README.en-US.md +++ b/packages/products/tdesign-miniprogram/src/stepper/README.en-US.md @@ -9,7 +9,7 @@ name | type | default | description | required style | Object | - | CSS(Cascading Style Sheets) | N custom-style | Object | - | CSS(Cascading Style Sheets),used to set style on virtual component | N disable-input | Boolean | false | \- | N -disabled | Boolean | false | \- | N +disabled | Boolean | undefined | \- | N input-width | Number | - | \- | N max | Number | 100 | \- | N min | Number | 0 | \- | N diff --git a/packages/products/tdesign-miniprogram/src/stepper/README.md b/packages/products/tdesign-miniprogram/src/stepper/README.md index 00d05577d..9b69b8019 100644 --- a/packages/products/tdesign-miniprogram/src/stepper/README.md +++ b/packages/products/tdesign-miniprogram/src/stepper/README.md @@ -9,7 +9,7 @@ style | Object | - | 样式 | N custom-style | Object | - | 样式,一般用于开启虚拟化组件节点场景 | N disable-input | Boolean | false | 禁用输入框 | N -disabled | Boolean | false | 禁用全部操作 | N +disabled | Boolean | undefined | 禁用全部操作 | N input-width | Number | - | 输入框宽度,默认单位 `px` | N max | Number | 100 | 最大值 | N min | Number | 0 | 最小值 | N diff --git a/packages/products/tdesign-miniprogram/src/stepper/props.ts b/packages/products/tdesign-miniprogram/src/stepper/props.ts index 608ebb41b..1eea798dc 100644 --- a/packages/products/tdesign-miniprogram/src/stepper/props.ts +++ b/packages/products/tdesign-miniprogram/src/stepper/props.ts @@ -13,14 +13,14 @@ const props: TdStepperProps = { }, /** 禁用全部操作 */ disabled: { - type: Boolean, - value: false, + type: null, + value: undefined, }, /** 组件类名,分别用于表示组件外层元素、输入框、右侧递增号、左侧递减号等元素类名 */ externalClasses: { type: Array, }, - /** 输入框宽度 */ + /** 输入框宽度,默认单位 `px` */ inputWidth: { type: Number, }, @@ -34,6 +34,11 @@ const props: TdStepperProps = { type: Number, value: 0, }, + /** 组件尺寸 */ + size: { + type: String, + value: 'medium', + }, /** 步长 */ step: { type: Number, diff --git a/packages/products/tdesign-miniprogram/src/stepper/type.ts b/packages/products/tdesign-miniprogram/src/stepper/type.ts index d746ee846..f6e0fb15a 100644 --- a/packages/products/tdesign-miniprogram/src/stepper/type.ts +++ b/packages/products/tdesign-miniprogram/src/stepper/type.ts @@ -4,6 +4,8 @@ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC * */ +import { SizeEnum } from '../common/common'; + export interface TdStepperProps { /** * 禁用输入框 @@ -15,7 +17,6 @@ export interface TdStepperProps { }; /** * 禁用全部操作 - * @default false */ disabled?: { type: BooleanConstructor; @@ -29,7 +30,7 @@ export interface TdStepperProps { value?: ['t-class', 't-class-input', 't-class-add', 't-class-minus']; }; /** - * 输入框宽度 + * 输入框宽度,默认单位 `px` */ inputWidth?: { type: NumberConstructor; @@ -51,6 +52,14 @@ export interface TdStepperProps { type: NumberConstructor; value?: number; }; + /** + * 组件尺寸 + * @default medium + */ + size?: { + type: StringConstructor; + value?: SizeEnum; + }; /** * 步长 * @default 1 @@ -73,7 +82,7 @@ export interface TdStepperProps { */ theme?: { type: StringConstructor; - value?: 'normal' | 'grey'; + value?: 'normal' | 'filled' | 'outline'; }; /** * 值 diff --git a/packages/products/tdesign-mobile-vue/src/button/button.en-US.md b/packages/products/tdesign-mobile-vue/src/button/button.en-US.md index 3ff6781cc..1da654ee8 100644 --- a/packages/products/tdesign-mobile-vue/src/button/button.en-US.md +++ b/packages/products/tdesign-mobile-vue/src/button/button.en-US.md @@ -8,7 +8,7 @@ name | type | default | description | required -- | -- | -- | -- | -- block | Boolean | false | make button to be a block-level element | N content | String / Slot / Function | - | button's children elements。Typescript:`string \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N -disabled | Boolean | false | disable the button, make it can not be clicked | N +disabled | Boolean | undefined | 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 @@ -18,7 +18,7 @@ size | String | medium | a button has four size。options: extra-small/small/med 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/packages/products/tdesign-mobile-vue/src/button/button.md b/packages/products/tdesign-mobile-vue/src/button/button.md index f6ee911f8..389254aa0 100644 --- a/packages/products/tdesign-mobile-vue/src/button/button.md +++ b/packages/products/tdesign-mobile-vue/src/button/button.md @@ -8,17 +8,17 @@ -- | -- | -- | -- | -- block | Boolean | false | 是否为块级元素 | N content | String / Slot / Function | - | 按钮内容。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N -disabled | Boolean | false | 禁用状态 | N +disabled | Boolean | undefined | 禁用状态。优先级:Button.disabled > Form.disabled | 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 +loadingProps | Object | - | 透传 Loading 组件全部属性。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 | 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/packages/products/tdesign-mobile-vue/src/button/props.ts b/packages/products/tdesign-mobile-vue/src/button/props.ts index 508fc67d6..c2dfca545 100644 --- a/packages/products/tdesign-mobile-vue/src/button/props.ts +++ b/packages/products/tdesign-mobile-vue/src/button/props.ts @@ -14,8 +14,11 @@ export default { content: { type: [String, Function] as PropType, }, - /** 禁用状态 */ - disabled: Boolean, + /** 禁用状态。优先级:Button.disabled > Form.disabled */ + disabled: { + type: Boolean, + default: undefined, + }, /** 是否为幽灵按钮(镂空按钮) */ ghost: Boolean, /** 按钮内部图标,可完全自定义 */ @@ -24,6 +27,10 @@ export default { }, /** 是否显示为加载状态 */ loading: Boolean, + /** 透传 Loading 组件全部属性 */ + loadingProps: { + type: Object as PropType, + }, /** 按钮形状,有 4 种:长方形、正方形、圆角长方形、圆形 */ shape: { type: String as PropType, diff --git a/packages/products/tdesign-mobile-vue/src/button/type.ts b/packages/products/tdesign-mobile-vue/src/button/type.ts index 9606f0624..ee904f2ad 100644 --- a/packages/products/tdesign-mobile-vue/src/button/type.ts +++ b/packages/products/tdesign-mobile-vue/src/button/type.ts @@ -4,7 +4,8 @@ * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC * */ -import { TNode, SizeEnum } from '../common'; +import { LoadingProps } from '../loading'; +import { TNode } from '../common'; export interface TdButtonProps { /** @@ -17,8 +18,7 @@ export interface TdButtonProps { */ content?: string | TNode; /** - * 禁用状态 - * @default false + * 禁用状态。优先级:Button.disabled > Form.disabled */ disabled?: boolean; /** @@ -35,6 +35,10 @@ export interface TdButtonProps { * @default false */ loading?: boolean; + /** + * 透传 Loading 组件全部属性 + */ + loadingProps?: LoadingProps; /** * 按钮形状,有 4 种:长方形、正方形、圆角长方形、圆形 * @default rectangle @@ -44,7 +48,7 @@ export interface TdButtonProps { * 组件尺寸 * @default medium */ - size?: SizeEnum; + size?: 'extra-small' | 'small' | 'medium' | 'large'; /** * 右侧内容,可用于定义右侧图标 */ diff --git a/packages/products/tdesign-mobile-vue/src/cell/cell-group-props.ts b/packages/products/tdesign-mobile-vue/src/cell/cell-group-props.ts new file mode 100644 index 000000000..d20c1a8b8 --- /dev/null +++ b/packages/products/tdesign-mobile-vue/src/cell/cell-group-props.ts @@ -0,0 +1,27 @@ +/* eslint-disable */ + +/** + * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC + * */ + +import { TdCellGroupProps } from '../cell/type'; +import { PropType } from 'vue'; + +export default { + /** 是否显示组边框 */ + bordered: Boolean, + /** 单元格组风格 */ + theme: { + type: String as PropType, + default: 'default' as TdCellGroupProps['theme'], + validator(val: TdCellGroupProps['theme']): boolean { + if (!val) return true; + return ['default', 'card'].includes(val); + }, + }, + /** 单元格组标题 */ + title: { + type: String, + default: '', + }, +}; diff --git a/packages/products/tdesign-mobile-vue/src/cell/cell.md b/packages/products/tdesign-mobile-vue/src/cell/cell.md index cb4b11f4b..bde6b2a93 100644 --- a/packages/products/tdesign-mobile-vue/src/cell/cell.md +++ b/packages/products/tdesign-mobile-vue/src/cell/cell.md @@ -31,5 +31,5 @@ click | `(context: { e: MouseEvent })` | 右侧内容。TS 类型:`string \| T 名称 | 类型 | 默认值 | 描述 | 必传 -- | -- | -- | -- | -- bordered | Boolean | false | 是否显示组边框 | N -theme | String | default | `0.15.0`。单元格风格。可选项:default/card | N +theme | String | default | `0.15.0`。单元格组风格。可选项:default/card | N title | String | - | 单元格组标题 | N diff --git a/packages/products/tdesign-mobile-vue/src/cell/props.ts b/packages/products/tdesign-mobile-vue/src/cell/props.ts new file mode 100644 index 000000000..d023a2290 --- /dev/null +++ b/packages/products/tdesign-mobile-vue/src/cell/props.ts @@ -0,0 +1,57 @@ +/* eslint-disable */ + +/** + * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC + * */ + +import { TdCellProps } from './type'; +import { PropType } from 'vue'; + +export default { + /** 内容的对齐方式,默认居中对齐 */ + align: { + type: String as PropType, + default: 'middle' as TdCellProps['align'], + validator(val: TdCellProps['align']): boolean { + if (!val) return true; + return ['top', 'middle', 'bottom'].includes(val); + }, + }, + /** 是否显示右侧箭头 */ + arrow: Boolean, + /** 是否显示下边框 */ + bordered: { + type: Boolean, + default: true, + }, + /** 下方内容描述 */ + description: { + type: [String, Function] as PropType, + }, + /** 是否开启点击反馈 */ + hover: Boolean, + /** 主图 */ + image: { + type: [String, Function] as PropType, + }, + /** 左侧图标,出现在单元格标题的左侧 */ + leftIcon: { + type: Function as PropType, + }, + /** 和标题同行的说明文字 */ + note: { + type: [String, Function] as PropType, + }, + /** 是否显示表单必填星号 */ + required: Boolean, + /** 最右侧图标 */ + rightIcon: { + type: Function as PropType, + }, + /** 标题 */ + title: { + type: [String, Function] as PropType, + }, + /** 右侧内容 */ + onClick: Function as PropType, +}; diff --git a/packages/products/tdesign-mobile-vue/src/cell/type.ts b/packages/products/tdesign-mobile-vue/src/cell/type.ts new file mode 100644 index 000000000..334a60464 --- /dev/null +++ b/packages/products/tdesign-mobile-vue/src/cell/type.ts @@ -0,0 +1,80 @@ +/* eslint-disable */ + +/** + * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC + * */ + +import { TNode } from '../common'; + +export interface TdCellProps { + /** + * 内容的对齐方式,默认居中对齐 + * @default middle + */ + align?: 'top' | 'middle' | 'bottom'; + /** + * 是否显示右侧箭头 + * @default false + */ + arrow?: boolean; + /** + * 是否显示下边框 + * @default true + */ + bordered?: boolean; + /** + * 下方内容描述 + */ + description?: string | TNode; + /** + * 是否开启点击反馈 + */ + hover?: boolean; + /** + * 主图 + */ + image?: string | TNode; + /** + * 左侧图标,出现在单元格标题的左侧 + */ + leftIcon?: TNode; + /** + * 和标题同行的说明文字 + */ + note?: string | TNode; + /** + * 是否显示表单必填星号 + * @default false + */ + required?: boolean; + /** + * 最右侧图标 + */ + rightIcon?: TNode; + /** + * 标题 + */ + title?: string | TNode; + /** + * 右侧内容 + */ + onClick?: (context: { e: MouseEvent }) => void; +} + +export interface TdCellGroupProps { + /** + * 是否显示组边框 + * @default false + */ + bordered?: boolean; + /** + * 单元格组风格 + * @default default + */ + theme?: 'default' | 'card'; + /** + * 单元格组标题 + * @default '' + */ + title?: string; +} diff --git a/packages/products/tdesign-mobile-vue/src/checkbox/checkbox-group-props.ts b/packages/products/tdesign-mobile-vue/src/checkbox/checkbox-group-props.ts new file mode 100644 index 000000000..a5362a203 --- /dev/null +++ b/packages/products/tdesign-mobile-vue/src/checkbox/checkbox-group-props.ts @@ -0,0 +1,46 @@ +/* eslint-disable */ + +/** + * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC + * */ + +import { TdCheckboxGroupProps } from '../checkbox/type'; +import { PropType } from 'vue'; + +export default { + /** 是否禁用组件。优先级:Form.disabled < CheckboxGroup.disabled < Checkbox.disabled */ + disabled: { + type: Boolean, + default: undefined, + }, + /** 支持最多选中的数量 */ + max: { + type: Number, + default: undefined, + }, + /** 统一设置内部复选框 HTML 属性 */ + name: { + type: String, + default: '', + }, + /** 以配置形式设置子元素。示例1:`['北京', '上海']` ,示例2: `[{ label: '全选', checkAll: true }, { label: '上海', value: 'shanghai' }]`。checkAll 值为 true 表示当前选项为「全选选项」 */ + options: { + type: Array as PropType, + }, + /** 选中值 */ + value: { + type: Array as PropType, + default: undefined, + }, + modelValue: { + type: Array as PropType, + default: undefined, + }, + /** 选中值,非受控属性 */ + defaultValue: { + type: Array as PropType, + default: (): TdCheckboxGroupProps['defaultValue'] => [], + }, + /** 值变化时触发。`context.current` 表示当前变化的数据项,如果是全选则为空;`context.type` 表示引起选中数据变化的是选中或是取消选中,`context.option` 表示当前变化的数据项 */ + onChange: Function as PropType, +}; diff --git a/packages/products/tdesign-mobile-vue/src/checkbox/checkbox.en-US.md b/packages/products/tdesign-mobile-vue/src/checkbox/checkbox.en-US.md index a90ee22d8..f278982e8 100644 --- a/packages/products/tdesign-mobile-vue/src/checkbox/checkbox.en-US.md +++ b/packages/products/tdesign-mobile-vue/src/checkbox/checkbox.en-US.md @@ -36,7 +36,7 @@ change | `(checked: boolean, context: { e: Event })` | \- name | type | default | description | required -- | -- | -- | -- | -- -disabled | Boolean | - | \- | N +disabled | Boolean | undefined | \- | 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 diff --git a/packages/products/tdesign-mobile-vue/src/checkbox/checkbox.md b/packages/products/tdesign-mobile-vue/src/checkbox/checkbox.md index 3093c38eb..d09821de6 100644 --- a/packages/products/tdesign-mobile-vue/src/checkbox/checkbox.md +++ b/packages/products/tdesign-mobile-vue/src/checkbox/checkbox.md @@ -13,7 +13,7 @@ defaultChecked | Boolean | false | 是否选中。非受控属性 | N content | String / Slot / Function | - | 多选框内容。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N contentDisabled | Boolean | - | 是否禁用组件内容(content)触发选中 | N default | String / Slot / Function | - | 多选框内容,同 label。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N -disabled | Boolean | undefined | 是否禁用组件。如果父组件存在 CheckboxGroup,默认值由 CheckboxGroup.disabled 控制。Checkbox.disabled 优先级高于 CheckboxGroup.disabled | N +disabled | Boolean | undefined | 是否禁用组件。如果父组件存在 CheckboxGroup,默认值由 CheckboxGroup.disabled 控制。优先级:Checkbox.disabled > CheckboxGroup.disabled > Form.disabled | N icon | String / Boolean / Array | 'circle' | 自定义选中图标和非选中图标。使用 Array 时表示:[选中态图标,非选中态图标]。使用 String 时,值为 circle 表示填充圆形图标、值为 line 表示描边型图标、值为 rectangle 表示填充矩形图标。。TS 类型:`'circle' \| 'line' \| 'rectangle' \| boolean \| Array`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N indeterminate | Boolean | false | 是否为半选 | N label | String / Slot / Function | - | 主文案。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N @@ -36,7 +36,7 @@ change | `(checked: boolean, context: { e: Event })` | 值变化时触发 名称 | 类型 | 默认值 | 描述 | 必传 -- | -- | -- | -- | -- -disabled | Boolean | - | 是否禁用组件,默认为 false。CheckboxGroup.disabled 优先级低于 Checkbox.disabled | N +disabled | Boolean | undefined | 是否禁用组件。优先级:Form.disabled < 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 diff --git a/packages/products/tdesign-mobile-vue/src/checkbox/props.ts b/packages/products/tdesign-mobile-vue/src/checkbox/props.ts new file mode 100644 index 000000000..8386954ea --- /dev/null +++ b/packages/products/tdesign-mobile-vue/src/checkbox/props.ts @@ -0,0 +1,87 @@ +/* eslint-disable */ + +/** + * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC + * */ + +import { TdCheckboxProps } from './type'; +import { PropType } from 'vue'; + +export default { + /** 是否为块级元素 */ + block: { + type: Boolean, + default: true, + }, + /** 用于标识是否为「全选选项」。单独使用无效,需在 CheckboxGroup 中使用 */ + checkAll: Boolean, + /** 是否选中 */ + checked: { + type: Boolean, + default: undefined, + }, + modelValue: { + type: Boolean, + default: undefined, + }, + /** 是否选中,非受控属性 */ + defaultChecked: Boolean, + /** 多选框内容 */ + content: { + type: [String, Function] as PropType, + }, + /** 是否禁用组件内容(content)触发选中 */ + contentDisabled: Boolean, + /** 多选框内容,同 label */ + default: { + type: [String, Function] as PropType, + }, + /** 是否禁用组件。如果父组件存在 CheckboxGroup,默认值由 CheckboxGroup.disabled 控制。优先级:Checkbox.disabled > CheckboxGroup.disabled > Form.disabled */ + disabled: { + type: Boolean, + default: undefined, + }, + /** 自定义选中图标和非选中图标。使用 Array 时表示:[选中态图标,非选中态图标]。使用 String 时,值为 circle 表示填充圆形图标、值为 line 表示描边型图标、值为 rectangle 表示填充矩形图标。 */ + icon: { + type: [String, Boolean, Array] as PropType, + default: 'circle', + }, + /** 是否为半选 */ + indeterminate: Boolean, + /** 主文案 */ + label: { + type: [String, Function] as PropType, + }, + /** 内容最大行数限制 */ + maxContentRow: { + type: Number, + default: 5, + }, + /** 主文案最大行数限制 */ + maxLabelRow: { + type: Number, + default: 3, + }, + /** HTML 元素原生属性 */ + name: { + type: String, + default: '', + }, + /** 多选框和内容相对位置 */ + placement: { + type: String as PropType, + default: 'left' as TdCheckboxProps['placement'], + validator(val: TdCheckboxProps['placement']): boolean { + if (!val) return true; + return ['left', 'right'].includes(val); + }, + }, + /** 【暂不支持】只读状态 */ + readonly: Boolean, + /** 多选框的值 */ + value: { + type: [String, Number, Boolean] as PropType, + }, + /** 值变化时触发 */ + onChange: Function as PropType, +}; diff --git a/packages/products/tdesign-mobile-vue/src/checkbox/type.ts b/packages/products/tdesign-mobile-vue/src/checkbox/type.ts new file mode 100644 index 000000000..383c901be --- /dev/null +++ b/packages/products/tdesign-mobile-vue/src/checkbox/type.ts @@ -0,0 +1,152 @@ +/* eslint-disable */ + +/** + * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC + * */ + +import { TNode } from '../common'; + +export interface TdCheckboxProps { + /** + * 是否为块级元素 + * @default true + */ + block?: boolean; + /** + * 用于标识是否为「全选选项」。单独使用无效,需在 CheckboxGroup 中使用 + * @default false + */ + checkAll?: boolean; + /** + * 是否选中 + * @default false + */ + checked?: boolean; + /** + * 是否选中,非受控属性 + * @default false + */ + defaultChecked?: boolean; + /** + * 是否选中 + * @default false + */ + modelValue?: boolean; + /** + * 多选框内容 + */ + content?: string | TNode; + /** + * 是否禁用组件内容(content)触发选中 + */ + contentDisabled?: boolean; + /** + * 多选框内容,同 label + */ + default?: string | TNode; + /** + * 是否禁用组件。如果父组件存在 CheckboxGroup,默认值由 CheckboxGroup.disabled 控制。优先级:Checkbox.disabled > CheckboxGroup.disabled > Form.disabled + */ + disabled?: boolean; + /** + * 自定义选中图标和非选中图标。使用 Array 时表示:[选中态图标,非选中态图标]。使用 String 时,值为 circle 表示填充圆形图标、值为 line 表示描边型图标、值为 rectangle 表示填充矩形图标。 + * @default 'circle' + */ + icon?: 'circle' | 'line' | 'rectangle' | boolean | Array; + /** + * 是否为半选 + * @default false + */ + indeterminate?: boolean; + /** + * 主文案 + */ + label?: string | TNode; + /** + * 内容最大行数限制 + * @default 5 + */ + maxContentRow?: number; + /** + * 主文案最大行数限制 + * @default 3 + */ + maxLabelRow?: number; + /** + * HTML 元素原生属性 + * @default '' + */ + name?: string; + /** + * 多选框和内容相对位置 + * @default left + */ + placement?: 'left' | 'right'; + /** + * 【暂不支持】只读状态 + * @default false + */ + readonly?: boolean; + /** + * 多选框的值 + */ + value?: string | number | boolean; + /** + * 值变化时触发 + */ + onChange?: (checked: boolean, context: { e: Event }) => void; +} + +export interface TdCheckboxGroupProps { + /** + * 是否禁用组件。优先级:Form.disabled < CheckboxGroup.disabled < Checkbox.disabled + */ + disabled?: boolean; + /** + * 支持最多选中的数量 + */ + max?: number; + /** + * 统一设置内部复选框 HTML 属性 + * @default '' + */ + name?: string; + /** + * 以配置形式设置子元素。示例1:`['北京', '上海']` ,示例2: `[{ label: '全选', checkAll: true }, { label: '上海', value: 'shanghai' }]`。checkAll 值为 true 表示当前选项为「全选选项」 + */ + options?: Array; + /** + * 选中值 + * @default [] + */ + value?: T; + /** + * 选中值,非受控属性 + * @default [] + */ + defaultValue?: T; + /** + * 选中值 + * @default [] + */ + modelValue?: T; + /** + * 值变化时触发。`context.current` 表示当前变化的数据项,如果是全选则为空;`context.type` 表示引起选中数据变化的是选中或是取消选中,`context.option` 表示当前变化的数据项 + */ + onChange?: (value: T, context: CheckboxGroupChangeContext) => void; +} + +export type CheckboxOption = string | number | CheckboxOptionObj; + +export interface CheckboxOptionObj extends TdCheckboxProps { + text?: string; +} + +export type CheckboxGroupValue = Array; + +export interface CheckboxGroupChangeContext { + e: Event; + current: string | number; + option: CheckboxOption | TdCheckboxProps; + type: 'check' | 'uncheck'; +} diff --git a/packages/products/tdesign-mobile-vue/src/radio/props.ts b/packages/products/tdesign-mobile-vue/src/radio/props.ts new file mode 100644 index 000000000..c8bbda89b --- /dev/null +++ b/packages/products/tdesign-mobile-vue/src/radio/props.ts @@ -0,0 +1,89 @@ +/* eslint-disable */ + +/** + * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC + * */ + +import { TdRadioProps } from './type'; +import { PropType } from 'vue'; + +export default { + /** 是否允许取消选中 */ + allowUncheck: Boolean, + /** 是否为块级元素 */ + block: { + type: Boolean, + default: true, + }, + /** 是否开启无边框模式 */ + borderless: { + type: Boolean, + default: undefined, + }, + /** 是否选中 */ + checked: { + type: Boolean, + default: undefined, + }, + modelValue: { + type: Boolean, + default: undefined, + }, + /** 是否选中,非受控属性 */ + defaultChecked: Boolean, + /** 单选内容 */ + content: { + type: [String, Function] as PropType, + }, + /** 是否禁用组件内容(content)触发选中 */ + contentDisabled: Boolean, + /** 单选按钮内容,同 label */ + default: { + type: [String, Function] as PropType, + }, + /** 是否为禁用态。如果存在父组件 RadioGroup,默认值由 RadioGroup.disabled 控制。优先级:Radio.disabled > RadioGroup.disabled > Form.disabled */ + disabled: { + type: Boolean, + default: undefined, + }, + /** 自定义选中图标和非选中图标。示例:[选中态图标地址,非选中态图标地址]。使用 String 时,值为 circle 表示填充型图标、值为 line 表示描边型图标、值为 dot 表示圆点图标、值为 'none' 则表示没有图标 */ + icon: { + type: [String, Array] as PropType, + default: 'circle', + }, + /** 主文案 */ + label: { + type: [String, Function] as PropType, + }, + /** 内容最大行数限制 */ + maxContentRow: { + type: Number, + default: 5, + }, + /** 主文案最大行数限制 */ + maxLabelRow: { + type: Number, + default: 3, + }, + /** HTML 元素原生属性 */ + name: { + type: String, + default: '', + }, + /** 复选框和内容相对位置 */ + placement: { + type: String as PropType, + default: 'left' as TdRadioProps['placement'], + validator(val: TdRadioProps['placement']): boolean { + if (!val) return true; + return ['left', 'right'].includes(val); + }, + }, + /** 单选按钮的值 */ + value: { + type: [String, Number, Boolean] as PropType, + default: undefined, + }, + /** 选中状态变化时触发 */ + onChange: Function as PropType, +}; diff --git a/packages/products/tdesign-mobile-vue/src/radio/radio-group-props.ts b/packages/products/tdesign-mobile-vue/src/radio/radio-group-props.ts new file mode 100644 index 000000000..c1f66ff69 --- /dev/null +++ b/packages/products/tdesign-mobile-vue/src/radio/radio-group-props.ts @@ -0,0 +1,62 @@ +/* eslint-disable */ + +/** + * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC + * */ + +import { TdRadioGroupProps } from '../radio/type'; +import { PropType } from 'vue'; + +export default { + /** 是否允许取消选中 */ + allowUncheck: Boolean, + /** 是否开启无边框模式;优先级低于 Radio */ + borderless: Boolean, + /** 是否禁用全部子单选框。优先级:Radio.disabled > RadioGroup.disabled > Form.disabled */ + disabled: { + type: Boolean, + default: undefined, + }, + /** 自定义选中图标和非选中图标。示例:[选中态图标地址,非选中态图标地址]。使用 String 时,值为 circle 表示填充型图标、值为 line 表示描边型图标、值为 dot 表示圆点图标 */ + icon: { + type: [String, Array] as PropType, + default: 'circle', + }, + /** 用来定义 value / label 在 `options` 中对应的字段别名 */ + keys: { + type: Object as PropType, + }, + /** HTML 元素原生属性 */ + name: { + type: String, + default: '', + }, + /** 单选组件按钮形式。RadioOption 数据类型为 string 或 number 时,表示 label 和 value 值相同 */ + options: { + type: Array as PropType, + }, + /** 复选框和内容相对位置 */ + placement: { + type: String as PropType, + default: 'left' as TdRadioGroupProps['placement'], + validator(val: TdRadioGroupProps['placement']): boolean { + if (!val) return true; + return ['left', 'right'].includes(val); + }, + }, + /** 选中的值 */ + value: { + type: [String, Number, Boolean] as PropType, + default: undefined, + }, + modelValue: { + type: [String, Number, Boolean] as PropType, + default: undefined, + }, + /** 选中的值,非受控属性 */ + defaultValue: { + type: [String, Number, Boolean] as PropType, + }, + /** 选中值发生变化时触发 */ + onChange: Function as PropType, +}; diff --git a/packages/products/tdesign-mobile-vue/src/radio/radio.en-US.md b/packages/products/tdesign-mobile-vue/src/radio/radio.en-US.md index e14e5b579..0174ecd9c 100644 --- a/packages/products/tdesign-mobile-vue/src/radio/radio.en-US.md +++ b/packages/products/tdesign-mobile-vue/src/radio/radio.en-US.md @@ -37,7 +37,7 @@ name | type | default | description | required -- | -- | -- | -- | -- allowUncheck | Boolean | false | \- | N borderless | Boolean | false | \- | N -disabled | Boolean | - | \- | N +disabled | Boolean | undefined | \- | N icon | String / Array | 'circle' | Typescript:`'circle' \| 'line' \| 'dot' \| Array`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N keys | Object | - | Typescript:`KeysType`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N name | String | - | \- | N diff --git a/packages/products/tdesign-mobile-vue/src/radio/radio.md b/packages/products/tdesign-mobile-vue/src/radio/radio.md index 3635ff1c9..198f9746a 100644 --- a/packages/products/tdesign-mobile-vue/src/radio/radio.md +++ b/packages/products/tdesign-mobile-vue/src/radio/radio.md @@ -14,7 +14,7 @@ defaultChecked | Boolean | false | 是否选中。非受控属性 | N content | String / Slot / Function | - | 单选内容。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N contentDisabled | Boolean | - | 是否禁用组件内容(content)触发选中 | N default | String / Slot / Function | - | 单选按钮内容,同 label。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N -disabled | Boolean | undefined | 是否为禁用态。如果存在父组件 RadioGroup,默认值由 RadioGroup.disabled 控制。Radio.disabled 优先级高于 RadioGroup.disabled | N +disabled | Boolean | undefined | 是否为禁用态。如果存在父组件 RadioGroup,默认值由 RadioGroup.disabled 控制。优先级:Radio.disabled > RadioGroup.disabled > Form.disabled | N icon | String / Array | 'circle' | 自定义选中图标和非选中图标。示例:[选中态图标地址,非选中态图标地址]。使用 String 时,值为 circle 表示填充型图标、值为 line 表示描边型图标、值为 dot 表示圆点图标、值为 'none' 则表示没有图标。TS 类型:`'circle' \| 'line' \| 'dot' \| 'none' \|Array`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N label | String / Slot / Function | - | 主文案。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N maxContentRow | Number | 5 | 内容最大行数限制 | N @@ -37,7 +37,7 @@ change | `(checked: boolean, context: { e: Event })` | 选中状态变化时触 -- | -- | -- | -- | -- allowUncheck | Boolean | false | 是否允许取消选中 | N borderless | Boolean | false | 是否开启无边框模式;优先级低于 Radio | N -disabled | Boolean | - | 是否禁用全部子单选框。默认为 false。RadioGroup.disabled 优先级低于 Radio.disabled | N +disabled | Boolean | undefined | 是否禁用全部子单选框。优先级:Radio.disabled > RadioGroup.disabled > Form.disabled | N icon | String / Array | 'circle' | 自定义选中图标和非选中图标。示例:[选中态图标地址,非选中态图标地址]。使用 String 时,值为 circle 表示填充型图标、值为 line 表示描边型图标、值为 dot 表示圆点图标。TS 类型:`'circle' \| 'line' \| 'dot' \| Array`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N keys | Object | - | 用来定义 value / label 在 `options` 中对应的字段别名。TS 类型:`KeysType`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N name | String | - | HTML 元素原生属性 | N diff --git a/packages/products/tdesign-mobile-vue/src/radio/type.ts b/packages/products/tdesign-mobile-vue/src/radio/type.ts new file mode 100644 index 000000000..252f0447a --- /dev/null +++ b/packages/products/tdesign-mobile-vue/src/radio/type.ts @@ -0,0 +1,158 @@ +/* eslint-disable */ + +/** + * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC + * */ + +import { TNode, KeysType } from '../common'; + +export interface TdRadioProps { + /** + * 是否允许取消选中 + * @default false + */ + allowUncheck?: boolean; + /** + * 是否为块级元素 + * @default true + */ + block?: boolean; + /** + * 是否开启无边框模式 + */ + borderless?: boolean; + /** + * 是否选中 + * @default false + */ + checked?: boolean; + /** + * 是否选中,非受控属性 + * @default false + */ + defaultChecked?: boolean; + /** + * 是否选中 + * @default false + */ + modelValue?: boolean; + /** + * 单选内容 + */ + content?: string | TNode; + /** + * 是否禁用组件内容(content)触发选中 + */ + contentDisabled?: boolean; + /** + * 单选按钮内容,同 label + */ + default?: string | TNode; + /** + * 是否为禁用态。如果存在父组件 RadioGroup,默认值由 RadioGroup.disabled 控制。优先级:Radio.disabled > RadioGroup.disabled > Form.disabled + */ + disabled?: boolean; + /** + * 自定义选中图标和非选中图标。示例:[选中态图标地址,非选中态图标地址]。使用 String 时,值为 circle 表示填充型图标、值为 line 表示描边型图标、值为 dot 表示圆点图标、值为 'none' 则表示没有图标 + * @default 'circle' + */ + icon?: 'circle' | 'line' | 'dot' | 'none' | Array; + /** + * 主文案 + */ + label?: string | TNode; + /** + * 内容最大行数限制 + * @default 5 + */ + maxContentRow?: number; + /** + * 主文案最大行数限制 + * @default 3 + */ + maxLabelRow?: number; + /** + * HTML 元素原生属性 + * @default '' + */ + name?: string; + /** + * 复选框和内容相对位置 + * @default left + */ + placement?: 'left' | 'right'; + /** + * 单选按钮的值 + */ + value?: string | number | boolean; + /** + * 选中状态变化时触发 + */ + onChange?: (checked: boolean, context: { e: Event }) => void; +} + +export interface TdRadioGroupProps { + /** + * 是否允许取消选中 + * @default false + */ + allowUncheck?: boolean; + /** + * 是否开启无边框模式;优先级低于 Radio + * @default false + */ + borderless?: boolean; + /** + * 是否禁用全部子单选框。优先级:Radio.disabled > RadioGroup.disabled > Form.disabled + */ + disabled?: boolean; + /** + * 自定义选中图标和非选中图标。示例:[选中态图标地址,非选中态图标地址]。使用 String 时,值为 circle 表示填充型图标、值为 line 表示描边型图标、值为 dot 表示圆点图标 + * @default 'circle' + */ + icon?: 'circle' | 'line' | 'dot' | Array; + /** + * 用来定义 value / label 在 `options` 中对应的字段别名 + */ + keys?: KeysType; + /** + * HTML 元素原生属性 + * @default '' + */ + name?: string; + /** + * 单选组件按钮形式。RadioOption 数据类型为 string 或 number 时,表示 label 和 value 值相同 + */ + options?: Array; + /** + * 复选框和内容相对位置 + * @default left + */ + placement?: 'left' | 'right'; + /** + * 选中的值 + */ + value?: T; + /** + * 选中的值,非受控属性 + */ + defaultValue?: T; + /** + * 选中的值 + */ + modelValue?: T; + /** + * 选中值发生变化时触发 + */ + onChange?: (value: T, context: { e: Event }) => void; +} + +export type RadioOption = string | number | RadioOptionObj; + +export interface RadioOptionObj { + label?: string | TNode; + value?: string | number | boolean; + disabled?: boolean; +} + +export type RadioValue = string | number | boolean; diff --git a/packages/products/tdesign-mobile-vue/src/rate/props.ts b/packages/products/tdesign-mobile-vue/src/rate/props.ts new file mode 100644 index 000000000..a280bbdbe --- /dev/null +++ b/packages/products/tdesign-mobile-vue/src/rate/props.ts @@ -0,0 +1,65 @@ +/* eslint-disable */ + +/** + * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC + * */ + +import { TdRateProps } from './type'; +import { PropType } from 'vue'; + +export default { + /** 是否允许半选 */ + allowHalf: Boolean, + /** 评分图标的颜色,样式中默认为 #ED7B2F。一个值表示设置选中高亮的五角星颜色,示例:[选中颜色]。数组则表示分别设置 选中高亮的五角星颜色 和 未选中暗灰的五角星颜色,[选中颜色,未选中颜色]。示例:['#ED7B2F', '#E3E6EB'] */ + color: { + type: [String, Array] as PropType, + default: '#ED7B2F', + }, + /** 评分的数量 */ + count: { + type: Number, + default: 5, + }, + /** 是否禁用评分 */ + disabled: { + type: Boolean, + default: undefined, + }, + /** 评分图标的间距 */ + gap: { + type: Number, + default: 8, + }, + /** 自定义评分图标,[选中图标,未选中图标] */ + icon: { + type: [Array, Function] as PropType, + }, + /** 是否显示对应的辅助文字 */ + showText: Boolean, + /** 评分图标的大小 */ + size: { + type: String, + default: '24px', + }, + /** 评分等级对应的辅助文字。组件内置默认值为:['极差', '失望', '一般', '满意', '惊喜']。自定义值示例:['1分', '2分', '3分', '4分', '5分'] */ + texts: { + type: Array as PropType, + default: (): TdRateProps['texts'] => [], + }, + /** 选择评分的值 */ + value: { + type: Number, + default: undefined, + }, + modelValue: { + type: Number, + default: undefined, + }, + /** 选择评分的值,非受控属性 */ + defaultValue: { + type: Number, + default: 0, + }, + /** 评分数改变时触发 */ + onChange: Function as PropType, +}; diff --git a/packages/products/tdesign-mobile-vue/src/rate/rate.en-US.md b/packages/products/tdesign-mobile-vue/src/rate/rate.en-US.md index 216fc5a33..9e60c2632 100644 --- a/packages/products/tdesign-mobile-vue/src/rate/rate.en-US.md +++ b/packages/products/tdesign-mobile-vue/src/rate/rate.en-US.md @@ -9,7 +9,7 @@ name | type | default | description | required allowHalf | Boolean | false | \- | N color | String / Array | '#ED7B2F' | Typescript:`string \| Array` | N count | Number | 5 | \- | N -disabled | Boolean | - | \- | N +disabled | Boolean | undefined | \- | 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 showText | Boolean | false | \- | N diff --git a/packages/products/tdesign-mobile-vue/src/rate/rate.md b/packages/products/tdesign-mobile-vue/src/rate/rate.md index 31a43c494..0d4e901dc 100644 --- a/packages/products/tdesign-mobile-vue/src/rate/rate.md +++ b/packages/products/tdesign-mobile-vue/src/rate/rate.md @@ -9,7 +9,7 @@ allowHalf | Boolean | false | 是否允许半选 | N color | String / Array | '#ED7B2F' | 评分图标的颜色,样式中默认为 #ED7B2F。一个值表示设置选中高亮的五角星颜色,示例:[选中颜色]。数组则表示分别设置 选中高亮的五角星颜色 和 未选中暗灰的五角星颜色,[选中颜色,未选中颜色]。示例:['#ED7B2F', '#E3E6EB']。TS 类型:`string \| Array` | N count | Number | 5 | 评分的数量 | N -disabled | Boolean | - | 是否禁用评分 | N +disabled | Boolean | undefined | 是否禁用评分 | N gap | Number | 8 | 评分图标的间距 | N icon | Array / Slot / Function | - | 自定义评分图标,[选中图标,未选中图标]。TS 类型:`Array`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N showText | Boolean | false | 是否显示对应的辅助文字 | N diff --git a/packages/products/tdesign-mobile-vue/src/rate/type.ts b/packages/products/tdesign-mobile-vue/src/rate/type.ts new file mode 100644 index 000000000..2516b819c --- /dev/null +++ b/packages/products/tdesign-mobile-vue/src/rate/type.ts @@ -0,0 +1,72 @@ +/* eslint-disable */ + +/** + * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC + * */ + +import { TNode } from '../common'; + +export interface TdRateProps { + /** + * 是否允许半选 + * @default false + */ + allowHalf?: boolean; + /** + * 评分图标的颜色,样式中默认为 #ED7B2F。一个值表示设置选中高亮的五角星颜色,示例:[选中颜色]。数组则表示分别设置 选中高亮的五角星颜色 和 未选中暗灰的五角星颜色,[选中颜色,未选中颜色]。示例:['#ED7B2F', '#E3E6EB'] + * @default '#ED7B2F' + */ + color?: string | Array; + /** + * 评分的数量 + * @default 5 + */ + count?: number; + /** + * 是否禁用评分 + */ + disabled?: boolean; + /** + * 评分图标的间距 + * @default 8 + */ + gap?: number; + /** + * 自定义评分图标,[选中图标,未选中图标] + */ + icon?: Array; + /** + * 是否显示对应的辅助文字 + * @default false + */ + showText?: boolean; + /** + * 评分图标的大小 + * @default 24px + */ + size?: string; + /** + * 评分等级对应的辅助文字。组件内置默认值为:['极差', '失望', '一般', '满意', '惊喜']。自定义值示例:['1分', '2分', '3分', '4分', '5分'] + * @default [] + */ + texts?: Array; + /** + * 选择评分的值 + * @default 0 + */ + value?: number; + /** + * 选择评分的值,非受控属性 + * @default 0 + */ + defaultValue?: number; + /** + * 选择评分的值 + * @default 0 + */ + modelValue?: number; + /** + * 评分数改变时触发 + */ + onChange?: (value: number) => void; +} diff --git a/packages/products/tdesign-mobile-vue/src/slider/props.ts b/packages/products/tdesign-mobile-vue/src/slider/props.ts new file mode 100644 index 000000000..b052101e4 --- /dev/null +++ b/packages/products/tdesign-mobile-vue/src/slider/props.ts @@ -0,0 +1,69 @@ +/* eslint-disable */ + +/** + * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC + * */ + +import { TdSliderProps } from './type'; +import { PropType } from 'vue'; + +export default { + /** 是否禁用组件 */ + disabled: { + type: Boolean, + default: undefined, + }, + /** 滑块当前值文本。
值为 true 显示默认文案;值为 false 不显示滑块当前值文本;
值为 `${value}%` 则表示组件会根据占位符渲染文案;
值类型为函数时,参数 `value` 标识滑块值,参数 `position=start` 表示范围滑块的起始值,参数 `position=end` 表示范围滑块的终点值 */ + label: { + type: [String, Boolean, Function] as PropType, + default: false, + }, + /** 刻度标记,示例:[0, 10, 40, 200] 或者 `{ 10: (val) => val + '%', 50: (h) => }` */ + marks: { + type: [Object, Array] as PropType, + }, + /** 滑块范围最大值 */ + max: { + type: Number, + default: 100, + }, + /** 滑块范围最小值 */ + min: { + type: Number, + default: 0, + }, + /** 双游标滑块 */ + range: Boolean, + /** 是否边界值 */ + showExtremeValue: Boolean, + /** 步长 */ + step: { + type: Number, + default: 1, + }, + /** 滑块风格 */ + theme: { + type: String as PropType, + default: 'default' as TdSliderProps['theme'], + validator(val: TdSliderProps['theme']): boolean { + if (!val) return true; + return ['default', 'capsule'].includes(val); + }, + }, + /** 滑块值 */ + value: { + type: [Number, Array] as PropType, + default: undefined, + }, + modelValue: { + type: [Number, Array] as PropType, + default: undefined, + }, + /** 滑块值,非受控属性 */ + defaultValue: { + type: [Number, Array] as PropType, + default: 0, + }, + /** 滑块值变化时触发 */ + onChange: Function as PropType, +}; diff --git a/packages/products/tdesign-mobile-vue/src/slider/slider.en-US.md b/packages/products/tdesign-mobile-vue/src/slider/slider.en-US.md index aad5c8824..496c7dba0 100644 --- a/packages/products/tdesign-mobile-vue/src/slider/slider.en-US.md +++ b/packages/products/tdesign-mobile-vue/src/slider/slider.en-US.md @@ -6,7 +6,7 @@ name | type | default | description | required -- | -- | -- | -- | -- -disabled | Boolean | false | \- | N +disabled | Boolean | undefined | \- | N label | String / Boolean / Slot / Function | false | Typescript:`string \| boolean \| TNode<{ value: SliderValue; position?: 'start' \| 'end' }>`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N marks | Object / Array | - | Typescript:`Array \| SliderMarks` `interface SliderMarks { [mark: number]: string \| TNode<{ value: number }> }`。[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/slider/type.ts) | N max | Number | 100 | \- | N diff --git a/packages/products/tdesign-mobile-vue/src/slider/slider.md b/packages/products/tdesign-mobile-vue/src/slider/slider.md index ff39ef960..e9e692ac9 100644 --- a/packages/products/tdesign-mobile-vue/src/slider/slider.md +++ b/packages/products/tdesign-mobile-vue/src/slider/slider.md @@ -6,7 +6,7 @@ 名称 | 类型 | 默认值 | 描述 | 必传 -- | -- | -- | -- | -- -disabled | Boolean | false | 是否禁用组件 | N +disabled | Boolean | undefined | 是否禁用组件 | N label | String / Boolean / Slot / Function | false | 滑块当前值文本。
值为 true 显示默认文案;值为 false 不显示滑块当前值文本;
值为 `${value}%` 则表示组件会根据占位符渲染文案;
值类型为函数时,参数 `value` 标识滑块值,参数 `position=start` 表示范围滑块的起始值,参数 `position=end` 表示范围滑块的终点值。TS 类型:`string \| boolean \| TNode<{ value: SliderValue; position?: 'start' \| 'end' }>`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N marks | Object / Array | - | 刻度标记,示例:[0, 10, 40, 200] 或者 `{ 10: (val) => val + '%', 50: (h) => }`。TS 类型:`Array \| SliderMarks` `interface SliderMarks { [mark: number]: string \| TNode<{ value: number }> }`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts)。[详细类型定义](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/slider/type.ts) | N max | Number | 100 | 滑块范围最大值 | N diff --git a/packages/products/tdesign-mobile-vue/src/slider/type.ts b/packages/products/tdesign-mobile-vue/src/slider/type.ts new file mode 100644 index 000000000..60b8bcf7d --- /dev/null +++ b/packages/products/tdesign-mobile-vue/src/slider/type.ts @@ -0,0 +1,78 @@ +/* eslint-disable */ + +/** + * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC + * */ + +import { TNode } from '../common'; + +export interface TdSliderProps { + /** + * 是否禁用组件 + */ + disabled?: boolean; + /** + * 滑块当前值文本。
值为 true 显示默认文案;值为 false 不显示滑块当前值文本;
值为 `${value}%` 则表示组件会根据占位符渲染文案;
值类型为函数时,参数 `value` 标识滑块值,参数 `position=start` 表示范围滑块的起始值,参数 `position=end` 表示范围滑块的终点值 + * @default false + */ + label?: string | boolean | TNode<{ value: SliderValue; position?: 'start' | 'end' }>; + /** + * 刻度标记,示例:[0, 10, 40, 200] 或者 `{ 10: (val) => val + '%', 50: (h) => }` + */ + marks?: Array | SliderMarks; + /** + * 滑块范围最大值 + * @default 100 + */ + max?: number; + /** + * 滑块范围最小值 + * @default 0 + */ + min?: number; + /** + * 双游标滑块 + * @default false + */ + range?: boolean; + /** + * 是否边界值 + * @default false + */ + showExtremeValue?: boolean; + /** + * 步长 + * @default 1 + */ + step?: number; + /** + * 滑块风格 + * @default default + */ + theme?: 'default' | 'capsule'; + /** + * 滑块值 + * @default 0 + */ + value?: SliderValue; + /** + * 滑块值,非受控属性 + * @default 0 + */ + defaultValue?: SliderValue; + /** + * 滑块值 + * @default 0 + */ + modelValue?: SliderValue; + /** + * 滑块值变化时触发 + */ + onChange?: (value: SliderValue) => void; +} + +export interface SliderMarks { + [mark: number]: string | TNode<{ value: number }>; +} + +export type SliderValue = number | Array; diff --git a/packages/products/tdesign-mobile-vue/src/stepper/props.ts b/packages/products/tdesign-mobile-vue/src/stepper/props.ts new file mode 100644 index 000000000..0a212cf89 --- /dev/null +++ b/packages/products/tdesign-mobile-vue/src/stepper/props.ts @@ -0,0 +1,82 @@ +/* eslint-disable */ + +/** + * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC + * */ + +import { TdStepperProps } from './type'; +import { PropType } from 'vue'; + +export default { + /** 禁用输入框 */ + disableInput: Boolean, + /** 禁用全部操作 */ + disabled: { + type: Boolean, + default: undefined, + }, + /** 输入框宽度 */ + inputWidth: { + type: Number, + }, + /** 是否整型 */ + integer: { + type: Boolean, + default: true, + }, + /** 最大值 */ + max: { + type: Number, + default: 100, + }, + /** 最小值 */ + min: { + type: Number, + default: 0, + }, + /** 组件尺寸 */ + size: { + type: String as PropType, + default: 'medium' as TdStepperProps['size'], + validator(val: TdStepperProps['size']): boolean { + if (!val) return true; + return ['small', 'medium', 'large'].includes(val); + }, + }, + /** 步长 */ + step: { + type: Number, + default: 1, + }, + /** 组件风格 */ + theme: { + type: String as PropType, + default: 'normal' as TdStepperProps['theme'], + validator(val: TdStepperProps['theme']): boolean { + if (!val) return true; + return ['normal', 'filled', 'outline'].includes(val); + }, + }, + /** 值 */ + value: { + type: [String, Number] as PropType, + default: undefined, + }, + modelValue: { + type: [String, Number] as PropType, + default: undefined, + }, + /** 值,非受控属性 */ + defaultValue: { + type: [String, Number] as PropType, + default: 0, + }, + /** 输入框失去焦点时触发 */ + onBlur: Function as PropType, + /** 数值发生变更时触发 */ + onChange: Function as PropType, + /** 输入框聚焦时触发 */ + onFocus: Function as PropType, + /** 数值超出限制时触发 */ + onOverlimit: Function as PropType, +}; diff --git a/packages/products/tdesign-mobile-vue/src/stepper/stepper.en-US.md b/packages/products/tdesign-mobile-vue/src/stepper/stepper.en-US.md index 5d5d6e039..51ddb0d87 100644 --- a/packages/products/tdesign-mobile-vue/src/stepper/stepper.en-US.md +++ b/packages/products/tdesign-mobile-vue/src/stepper/stepper.en-US.md @@ -7,7 +7,7 @@ name | type | default | description | required -- | -- | -- | -- | -- disableInput | Boolean | false | \- | N -disabled | Boolean | false | \- | N +disabled | Boolean | undefined | \- | N inputWidth | Number | - | \- | N integer | Boolean | true | \- | N max | Number | 100 | \- | N diff --git a/packages/products/tdesign-mobile-vue/src/stepper/stepper.md b/packages/products/tdesign-mobile-vue/src/stepper/stepper.md index 752aa5bfa..a66a79c6d 100644 --- a/packages/products/tdesign-mobile-vue/src/stepper/stepper.md +++ b/packages/products/tdesign-mobile-vue/src/stepper/stepper.md @@ -7,9 +7,9 @@ 名称 | 类型 | 默认值 | 描述 | 必传 -- | -- | -- | -- | -- disableInput | Boolean | false | 禁用输入框 | N -disabled | Boolean | false | 禁用全部操作 | N +disabled | Boolean | undefined | 禁用全部操作 | N inputWidth | Number | - | 输入框宽度 | N -integer | Boolean | true | 是否整形 | N +integer | Boolean | true | 是否整型 | N max | Number | 100 | 最大值 | N min | Number | 0 | 最小值 | N size | String | medium | 组件尺寸。可选项:small/medium/large。TS 类型:`SizeEnum`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N diff --git a/packages/products/tdesign-mobile-vue/src/stepper/type.ts b/packages/products/tdesign-mobile-vue/src/stepper/type.ts new file mode 100644 index 000000000..3fb68698c --- /dev/null +++ b/packages/products/tdesign-mobile-vue/src/stepper/type.ts @@ -0,0 +1,84 @@ +/* eslint-disable */ + +/** + * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC + * */ + +import { SizeEnum } from '../common'; + +export interface TdStepperProps { + /** + * 禁用输入框 + * @default false + */ + disableInput?: boolean; + /** + * 禁用全部操作 + */ + disabled?: boolean; + /** + * 输入框宽度 + */ + inputWidth?: number; + /** + * 是否整型 + * @default true + */ + integer?: boolean; + /** + * 最大值 + * @default 100 + */ + max?: number; + /** + * 最小值 + * @default 0 + */ + min?: number; + /** + * 组件尺寸 + * @default medium + */ + size?: SizeEnum; + /** + * 步长 + * @default 1 + */ + step?: number; + /** + * 组件风格 + * @default normal + */ + theme?: 'normal' | 'filled' | 'outline'; + /** + * 值 + * @default 0 + */ + value?: string | number; + /** + * 值,非受控属性 + * @default 0 + */ + defaultValue?: string | number; + /** + * 值 + * @default 0 + */ + modelValue?: string | number; + /** + * 输入框失去焦点时触发 + */ + onBlur?: (value: string | number) => void; + /** + * 数值发生变更时触发 + */ + onChange?: (value: string | number) => void; + /** + * 输入框聚焦时触发 + */ + onFocus?: (value: string | number) => void; + /** + * 数值超出限制时触发 + */ + onOverlimit?: (type: 'minus' | 'plus') => void; +} diff --git a/packages/products/tdesign-mobile-vue/src/switch/props.ts b/packages/products/tdesign-mobile-vue/src/switch/props.ts index 17b72e007..f43717695 100644 --- a/packages/products/tdesign-mobile-vue/src/switch/props.ts +++ b/packages/products/tdesign-mobile-vue/src/switch/props.ts @@ -12,8 +12,11 @@ export default { customValue: { type: Array as PropType, }, - /** 是否禁用组件 */ - disabled: Boolean, + /** 是否禁用组件。优先级:Switch.disabled > Form.disabled */ + disabled: { + type: Boolean, + default: undefined, + }, /** 开关的图标;[打开时的图标,关闭时的图标] */ icon: { type: Array as PropType, diff --git a/packages/products/tdesign-mobile-vue/src/switch/switch.en-US.md b/packages/products/tdesign-mobile-vue/src/switch/switch.en-US.md index 681d073d0..bbf305c8d 100644 --- a/packages/products/tdesign-mobile-vue/src/switch/switch.en-US.md +++ b/packages/products/tdesign-mobile-vue/src/switch/switch.en-US.md @@ -7,7 +7,7 @@ name | type | default | description | required -- | -- | -- | -- | -- customValue | Array | - | Typescript:`Array` | N -disabled | Boolean | - | \- | N +disabled | Boolean | undefined | \- | N icon | Array | [] | Typescript:`TNode[]`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N label | Array | [] | Typescript:`string[]` | N loading | Boolean | false | \- | N diff --git a/packages/products/tdesign-mobile-vue/src/switch/switch.md b/packages/products/tdesign-mobile-vue/src/switch/switch.md index dd2a7bea1..f085ef03e 100644 --- a/packages/products/tdesign-mobile-vue/src/switch/switch.md +++ b/packages/products/tdesign-mobile-vue/src/switch/switch.md @@ -7,7 +7,7 @@ 名称 | 类型 | 默认值 | 描述 | 必传 -- | -- | -- | -- | -- customValue | Array | - | 用于自定义开关的值,[打开时的值,关闭时的值]。默认为 [true, false]。示例:[1, 0]、['open', 'close']。TS 类型:`Array` | N -disabled | Boolean | - | 是否禁用组件 | N +disabled | Boolean | undefined | 是否禁用组件。优先级:Switch.disabled > Form.disabled | N icon | Array | [] | 开关的图标;[打开时的图标,关闭时的图标]。TS 类型:`TNode[]`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N label | Array | [] | 开关的标签;[打开时的标签,关闭时的标签]。TS 类型:`string[]` | N loading | Boolean | false | 是否处于加载中状态 | N diff --git a/packages/products/tdesign-mobile-vue/src/switch/type.ts b/packages/products/tdesign-mobile-vue/src/switch/type.ts index 4018195f2..173ea99d5 100644 --- a/packages/products/tdesign-mobile-vue/src/switch/type.ts +++ b/packages/products/tdesign-mobile-vue/src/switch/type.ts @@ -12,7 +12,7 @@ export interface TdSwitchProps { */ customValue?: Array; /** - * 是否禁用组件 + * 是否禁用组件。优先级:Switch.disabled > Form.disabled */ disabled?: boolean; /** diff --git a/packages/products/tdesign-mobile-vue/src/textarea/props.ts b/packages/products/tdesign-mobile-vue/src/textarea/props.ts new file mode 100644 index 000000000..ef5b90547 --- /dev/null +++ b/packages/products/tdesign-mobile-vue/src/textarea/props.ts @@ -0,0 +1,78 @@ +/* eslint-disable */ + +/** + * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC + * */ + +import { TdTextareaProps } from './type'; +import { PropType } from 'vue'; + +export default { + /** 超出maxlength或maxcharacter之后是否还允许输入 */ + allowInputOverMax: Boolean, + /** 自动聚焦,拉起键盘 */ + autofocus: Boolean, + /** 是否自动增高,值为 autosize 时,style.height 不生效 */ + autosize: Boolean, + /** 是否显示外边框 */ + bordered: Boolean, + /** 是否禁用文本框 */ + disabled: { + type: Boolean, + default: undefined, + }, + /** 显示文本计数器,如 0/140。当 `maxlength < 0 && maxcharacter < 0` 成立时, indicator无效 */ + indicator: Boolean, + /** 左侧文本 */ + label: { + type: [String, Function] as PropType, + }, + /** 标题输入框布局方式 */ + layout: { + type: String as PropType, + default: 'horizontal' as TdTextareaProps['layout'], + validator(val: TdTextareaProps['layout']): boolean { + if (!val) return true; + return ['vertical', 'horizontal'].includes(val); + }, + }, + /** 用户最多可以输入的字符个数,一个中文汉字表示两个字符长度 */ + maxcharacter: { + type: Number, + }, + /** 用户最多可以输入的字符个数 */ + maxlength: { + type: Number, + }, + /** 名称,HTML 元素原生属性 */ + name: { + type: String, + default: '', + }, + /** 占位符 */ + placeholder: { + type: String, + default: undefined, + }, + /** 只读状态 */ + readonly: Boolean, + /** 文本框值 */ + value: { + type: [String, Number] as PropType, + default: undefined, + }, + modelValue: { + type: [String, Number] as PropType, + default: undefined, + }, + /** 文本框值,非受控属性 */ + defaultValue: { + type: [String, Number] as PropType, + }, + /** 失去焦点时触发 */ + onBlur: Function as PropType, + /** 输入内容变化时触发 */ + onChange: Function as PropType, + /** 获得焦点时触发 */ + onFocus: Function as PropType, +}; diff --git a/packages/products/tdesign-mobile-vue/src/textarea/textarea.en-US.md b/packages/products/tdesign-mobile-vue/src/textarea/textarea.en-US.md index a9ae1545f..74918244f 100644 --- a/packages/products/tdesign-mobile-vue/src/textarea/textarea.en-US.md +++ b/packages/products/tdesign-mobile-vue/src/textarea/textarea.en-US.md @@ -10,7 +10,7 @@ allowInputOverMax | Boolean | false | \- | N autofocus | Boolean | false | \- | N autosize | Boolean | false | \- | N bordered | Boolean | false | \- | N -disabled | Boolean | false | \- | N +disabled | Boolean | undefined | \- | 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 | options: vertical/horizontal | N @@ -19,8 +19,8 @@ maxlength | Number | - | \- | N name | String | - | \- | N placeholder | String | undefined | \- | N readonly | Boolean | false | \- | N -value | String / Number | - | `v-model` and `v-model:value` is supported。Typescript:`TextareaValue` `type TextareaValue = string`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/textarea/type.ts) | N -defaultValue | String / Number | - | uncontrolled property。Typescript:`TextareaValue` `type TextareaValue = string`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/textarea/type.ts) | N +value | String / Number | - | `v-model` and `v-model:value` is supported。Typescript:`TextareaValue` `type TextareaValue = string \| number`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/textarea/type.ts) | N +defaultValue | String / Number | - | uncontrolled property。Typescript:`TextareaValue` `type TextareaValue = string \| number`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/textarea/type.ts) | N onBlur | Function | | Typescript:`(value: TextareaValue, context: { e: FocusEvent }) => void`
| N onChange | Function | | Typescript:`(value: TextareaValue, context?: { e?: InputEvent }) => void`
| N onFocus | Function | | Typescript:`(value: TextareaValue, context : { e: FocusEvent }) => void`
| N diff --git a/packages/products/tdesign-mobile-vue/src/textarea/textarea.md b/packages/products/tdesign-mobile-vue/src/textarea/textarea.md index 4e6d87eba..43262c72f 100644 --- a/packages/products/tdesign-mobile-vue/src/textarea/textarea.md +++ b/packages/products/tdesign-mobile-vue/src/textarea/textarea.md @@ -10,7 +10,7 @@ allowInputOverMax | Boolean | false | 超出maxlength或maxcharacter之后是否 autofocus | Boolean | false | 自动聚焦,拉起键盘 | N autosize | Boolean | false | 是否自动增高,值为 autosize 时,style.height 不生效 | N bordered | Boolean | false | 是否显示外边框 | N -disabled | Boolean | false | 是否禁用文本框 | N +disabled | Boolean | undefined | 是否禁用文本框 | 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 @@ -19,8 +19,8 @@ maxlength | Number | - | 用户最多可以输入的字符个数 | N name | String | - | 名称,HTML 元素原生属性 | N placeholder | String | undefined | 占位符 | N readonly | Boolean | false | 只读状态 | N -value | String / Number | - | 文本框值。支持语法糖 `v-model` 或 `v-model:value`。TS 类型:`TextareaValue` `type TextareaValue = string`。[详细类型定义](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/textarea/type.ts) | N -defaultValue | String / Number | - | 文本框值。非受控属性。TS 类型:`TextareaValue` `type TextareaValue = string`。[详细类型定义](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/textarea/type.ts) | N +value | String / Number | - | 文本框值。支持语法糖 `v-model` 或 `v-model:value`。TS 类型:`TextareaValue` `type TextareaValue = string \| number`。[详细类型定义](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/textarea/type.ts) | N +defaultValue | String / Number | - | 文本框值。非受控属性。TS 类型:`TextareaValue` `type TextareaValue = string \| number`。[详细类型定义](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/textarea/type.ts) | N onBlur | Function | | TS 类型:`(value: TextareaValue, context: { e: FocusEvent }) => void`
失去焦点时触发 | N onChange | Function | | TS 类型:`(value: TextareaValue, context?: { e?: InputEvent }) => void`
输入内容变化时触发 | N onFocus | Function | | TS 类型:`(value: TextareaValue, context : { e: FocusEvent }) => void`
获得焦点时触发 | N diff --git a/packages/products/tdesign-mobile-vue/src/textarea/type.ts b/packages/products/tdesign-mobile-vue/src/textarea/type.ts new file mode 100644 index 000000000..24523dd42 --- /dev/null +++ b/packages/products/tdesign-mobile-vue/src/textarea/type.ts @@ -0,0 +1,96 @@ +/* eslint-disable */ + +/** + * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC + * */ + +import { TNode } from '../common'; + +export interface TdTextareaProps { + /** + * 超出maxlength或maxcharacter之后是否还允许输入 + * @default false + */ + allowInputOverMax?: boolean; + /** + * 自动聚焦,拉起键盘 + * @default false + */ + autofocus?: boolean; + /** + * 是否自动增高,值为 autosize 时,style.height 不生效 + * @default false + */ + autosize?: boolean; + /** + * 是否显示外边框 + * @default false + */ + bordered?: boolean; + /** + * 是否禁用文本框 + */ + disabled?: boolean; + /** + * 显示文本计数器,如 0/140。当 `maxlength < 0 && maxcharacter < 0` 成立时, indicator无效 + * @default false + */ + indicator?: boolean; + /** + * 左侧文本 + */ + label?: string | TNode; + /** + * 标题输入框布局方式 + * @default horizontal + */ + layout?: 'vertical' | 'horizontal'; + /** + * 用户最多可以输入的字符个数,一个中文汉字表示两个字符长度 + */ + maxcharacter?: number; + /** + * 用户最多可以输入的字符个数 + */ + maxlength?: number; + /** + * 名称,HTML 元素原生属性 + * @default '' + */ + name?: string; + /** + * 占位符 + */ + placeholder?: string; + /** + * 只读状态 + * @default false + */ + readonly?: boolean; + /** + * 文本框值 + */ + value?: TextareaValue; + /** + * 文本框值,非受控属性 + */ + defaultValue?: TextareaValue; + /** + * 文本框值 + */ + modelValue?: TextareaValue; + /** + * 失去焦点时触发 + */ + onBlur?: (value: TextareaValue, context: { e: FocusEvent }) => void; + /** + * 输入内容变化时触发 + */ + onChange?: (value: TextareaValue, context?: { e?: InputEvent }) => void; + /** + * 获得焦点时触发 + */ + onFocus?: (value: TextareaValue, context: { e: FocusEvent }) => void; +} + +export type TextareaValue = string | number; diff --git a/packages/products/tdesign-react/src/rate/defaultProps.ts b/packages/products/tdesign-react/src/rate/defaultProps.ts index b1964c010..80b99cf60 100644 --- a/packages/products/tdesign-react/src/rate/defaultProps.ts +++ b/packages/products/tdesign-react/src/rate/defaultProps.ts @@ -8,7 +8,7 @@ export const rateDefaultProps: TdRateProps = { allowHalf: false, color: '#ED7B2F', count: 5, - disabled: false, + disabled: undefined, gap: 4, showText: false, size: '24px', diff --git a/packages/products/tdesign-react/src/rate/rate.en-US.md b/packages/products/tdesign-react/src/rate/rate.en-US.md index 3db8e1bbf..f783b4fd9 100644 --- a/packages/products/tdesign-react/src/rate/rate.en-US.md +++ b/packages/products/tdesign-react/src/rate/rate.en-US.md @@ -1,16 +1,17 @@ :: BASE_DOC :: ## API + ### Rate Props name | type | default | description | required -- | -- | -- | -- | -- -className | String | - | 类名 | N -style | Object | - | 样式,TS 类型:`React.CSSProperties` | N +className | String | - | className of component | N +style | Object | - | CSS(Cascading Style Sheets),Typescript:`React.CSSProperties` | N allowHalf | Boolean | false | \- | N -color | String / Array | '#ED7B2F' | Typescript:`string | Array` | N +color | String / Array | '#ED7B2F' | Typescript:`string \| Array` | N count | Number | 5 | \- | N -disabled | Boolean | false | \- | N +disabled | Boolean | undefined | \- | N gap | Number | 4 | \- | N icon | TElement | - | Typescript:`TNode`。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N showText | Boolean | false | \- | N @@ -18,4 +19,4 @@ size | String | 24px | \- | N texts | Array | [] | Typescript:`Array` | N value | Number | 0 | \- | N defaultValue | Number | 0 | uncontrolled property | N -onChange | Function | | TS 类型:`(value: number) => void`
| N +onChange | Function | | Typescript:`(value: number) => void`
| N diff --git a/packages/products/tdesign-react/src/rate/rate.md b/packages/products/tdesign-react/src/rate/rate.md index 0f93b58d6..532e1aede 100644 --- a/packages/products/tdesign-react/src/rate/rate.md +++ b/packages/products/tdesign-react/src/rate/rate.md @@ -1,20 +1,21 @@ :: BASE_DOC :: ## API + ### Rate Props -名称 | 类型 | 默认值 | 说明 | 必传 +名称 | 类型 | 默认值 | 描述 | 必传 -- | -- | -- | -- | -- className | String | - | 类名 | N style | Object | - | 样式,TS 类型:`React.CSSProperties` | N allowHalf | Boolean | false | 是否允许半选 | N -color | String / Array | '#ED7B2F' | 评分图标的颜色,样式中默认为 #ED7B2F。一个值表示设置选中高亮的五角星颜色,示例:[选中颜色]。数组则表示分别设置 选中高亮的五角星颜色 和 未选中暗灰的五角星颜色,[选中颜色,未选中颜色]。示例:['#ED7B2F', '#E3E6EB']。TS 类型:`string | Array` | N +color | String / Array | '#ED7B2F' | 评分图标的颜色,样式中默认为 #ED7B2F。一个值表示设置选中高亮的五角星颜色,示例:[选中颜色]。数组则表示分别设置 选中高亮的五角星颜色 和 未选中暗灰的五角星颜色,[选中颜色,未选中颜色]。示例:['#ED7B2F', '#E3E6EB']。TS 类型:`string \| Array` | N count | Number | 5 | 评分的数量 | N -disabled | Boolean | false | 是否禁用评分 | N +disabled | Boolean | undefined | 是否禁用评分 | N gap | Number | 4 | 评分图标的间距 | N icon | TElement | - | 自定义评分图标。TS 类型:`TNode`。[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N showText | Boolean | false | 是否显示对应的辅助文字 | N -size | String | 24px | 评分图标的大小,示例:`20px` | N +size | String | 24px | 评分图标的大小 | N texts | Array | [] | 评分等级对应的辅助文字。组件内置默认值为:['极差', '失望', '一般', '满意', '惊喜']。自定义值示例:['1分', '2分', '3分', '4分', '5分']。TS 类型:`Array` | N value | Number | 0 | 选择评分的值 | N defaultValue | Number | 0 | 选择评分的值。非受控属性 | N diff --git a/packages/products/tdesign-react/src/rate/type.ts b/packages/products/tdesign-react/src/rate/type.ts index 208949e12..d7e7410d7 100644 --- a/packages/products/tdesign-react/src/rate/type.ts +++ b/packages/products/tdesign-react/src/rate/type.ts @@ -24,7 +24,6 @@ export interface TdRateProps { count?: number; /** * 是否禁用评分 - * @default false */ disabled?: boolean; /** @@ -42,7 +41,7 @@ export interface TdRateProps { */ showText?: boolean; /** - * 评分图标的大小,示例:`20px` + * 评分图标的大小 * @default 24px */ size?: string; diff --git a/packages/products/tdesign-react/src/slider/defaultProps.ts b/packages/products/tdesign-react/src/slider/defaultProps.ts index 4837d1f04..d5b481716 100644 --- a/packages/products/tdesign-react/src/slider/defaultProps.ts +++ b/packages/products/tdesign-react/src/slider/defaultProps.ts @@ -5,7 +5,7 @@ import { TdSliderProps } from './type'; export const sliderDefaultProps: TdSliderProps = { - disabled: false, + disabled: undefined, inputNumberProps: false, label: true, layout: 'horizontal', diff --git a/packages/products/tdesign-react/src/slider/slider.en-US.md b/packages/products/tdesign-react/src/slider/slider.en-US.md index 6b3a1fa1a..cc45b3ac6 100644 --- a/packages/products/tdesign-react/src/slider/slider.en-US.md +++ b/packages/products/tdesign-react/src/slider/slider.en-US.md @@ -1,13 +1,14 @@ :: BASE_DOC :: ## API + ### Slider Props name | type | default | description | required -- | -- | -- | -- | -- -className | String | - | 类名 | N -style | Object | - | 样式,Typescript:`React.CSSProperties` | N -disabled | Boolean | false | \- | N +className | String | - | className of component | N +style | Object | - | CSS(Cascading Style Sheets),Typescript:`React.CSSProperties` | N +disabled | Boolean | undefined | \- | N inputNumberProps | Boolean / Object | false | Typescript:`boolean \| InputNumberProps`,[InputNumber API Documents](./input-number?tab=api)。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/src/slider/type.ts) | N label | TNode | true | Typescript:`string \| boolean \| TNode<{ value: SliderValue; position?: 'start' \| 'end' }>`。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N layout | String | horizontal | options: vertical/horizontal | N diff --git a/packages/products/tdesign-react/src/slider/slider.md b/packages/products/tdesign-react/src/slider/slider.md index abc9422fd..772d801b0 100644 --- a/packages/products/tdesign-react/src/slider/slider.md +++ b/packages/products/tdesign-react/src/slider/slider.md @@ -1,13 +1,14 @@ :: BASE_DOC :: ## API + ### Slider Props -名称 | 类型 | 默认值 | 说明 | 必传 +名称 | 类型 | 默认值 | 描述 | 必传 -- | -- | -- | -- | -- className | String | - | 类名 | N style | Object | - | 样式,TS 类型:`React.CSSProperties` | N -disabled | Boolean | false | 是否禁用组件 | N +disabled | Boolean | undefined | 是否禁用组件 | N inputNumberProps | Boolean / Object | false | 用于控制数字输入框组件,值为 false 表示不显示数字输入框;值为 true 表示呈现默认数字输入框;值类型为 Object 表示透传属性到数字输入框组件。TS 类型:`boolean \| InputNumberProps`,[InputNumber API Documents](./input-number?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/slider/type.ts) | N label | TNode | true | 滑块当前值文本。
值为 true 显示默认文案;值为 false 不显示滑块当前值文本;
值为 `${value}%` 则表示组件会根据占位符渲染文案;
值类型为函数时,参数 `value` 标识滑块值,参数 `position=start` 表示范围滑块的起始值,参数 `position=end` 表示范围滑块的终点值。TS 类型:`string \| boolean \| TNode<{ value: SliderValue; position?: 'start' \| 'end' }>`。[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N layout | String | horizontal | 滑块布局方向。可选项:vertical/horizontal | N diff --git a/packages/products/tdesign-react/src/slider/type.ts b/packages/products/tdesign-react/src/slider/type.ts index 47c92e8b4..a3029d9cc 100644 --- a/packages/products/tdesign-react/src/slider/type.ts +++ b/packages/products/tdesign-react/src/slider/type.ts @@ -11,7 +11,6 @@ import { TNode } from '../common'; export interface TdSliderProps { /** * 是否禁用组件 - * @default false */ disabled?: boolean; /** diff --git a/packages/products/tdesign-vue-next/src/rate/props.ts b/packages/products/tdesign-vue-next/src/rate/props.ts index e8f7cc311..b213f90dd 100644 --- a/packages/products/tdesign-vue-next/src/rate/props.ts +++ b/packages/products/tdesign-vue-next/src/rate/props.ts @@ -13,7 +13,7 @@ export default { /** 评分图标的颜色,样式中默认为 #ED7B2F。一个值表示设置选中高亮的五角星颜色,示例:[选中颜色]。数组则表示分别设置 选中高亮的五角星颜色 和 未选中暗灰的五角星颜色,[选中颜色,未选中颜色]。示例:['#ED7B2F', '#E3E6EB'] */ color: { type: [String, Array] as PropType, - default: '#ED7B2F', + default: '#ED7B2F' as TdRateProps['color'], }, /** 评分的数量 */ count: { @@ -21,7 +21,10 @@ export default { default: 5, }, /** 是否禁用评分 */ - disabled: Boolean, + disabled: { + type: Boolean, + default: undefined, + }, /** 评分图标的间距 */ gap: { type: Number, @@ -33,7 +36,7 @@ export default { }, /** 是否显示对应的辅助文字 */ showText: Boolean, - /** 评分图标的大小,示例:`20px` */ + /** 评分图标的大小 */ size: { type: String, default: '24px', diff --git a/packages/products/tdesign-vue-next/src/rate/rate.en-US.md b/packages/products/tdesign-vue-next/src/rate/rate.en-US.md index f6099b2fd..6b29cea12 100644 --- a/packages/products/tdesign-vue-next/src/rate/rate.en-US.md +++ b/packages/products/tdesign-vue-next/src/rate/rate.en-US.md @@ -7,9 +7,9 @@ name | type | default | description | required -- | -- | -- | -- | -- allowHalf | Boolean | false | \- | N -color | String / Array | '#ED7B2F' | Typescript:`string | Array` | N +color | String / Array | '#ED7B2F' | Typescript:`string \| Array` | N count | Number | 5 | \- | N -disabled | Boolean | - | \- | N +disabled | Boolean | undefined | \- | N gap | Number | 4 | \- | N icon | Slot / Function | - | Typescript:`TNode`。[see more ts definition](https://github.com/Tencent/tdesign-vue-next/blob/develop/src/common.ts) | N showText | Boolean | false | \- | N diff --git a/packages/products/tdesign-vue-next/src/rate/rate.md b/packages/products/tdesign-vue-next/src/rate/rate.md index 10ff38cb6..c747a7b28 100644 --- a/packages/products/tdesign-vue-next/src/rate/rate.md +++ b/packages/products/tdesign-vue-next/src/rate/rate.md @@ -4,16 +4,16 @@ ### Rate Props -名称 | 类型 | 默认值 | 说明 | 必传 +名称 | 类型 | 默认值 | 描述 | 必传 -- | -- | -- | -- | -- allowHalf | Boolean | false | 是否允许半选 | N -color | String / Array | '#ED7B2F' | 评分图标的颜色,样式中默认为 #ED7B2F。一个值表示设置选中高亮的五角星颜色,示例:[选中颜色]。数组则表示分别设置 选中高亮的五角星颜色 和 未选中暗灰的五角星颜色,[选中颜色,未选中颜色]。示例:['#ED7B2F', '#E3E6EB']。TS 类型:`string | Array` | N +color | String / Array | '#ED7B2F' | 评分图标的颜色,样式中默认为 #ED7B2F。一个值表示设置选中高亮的五角星颜色,示例:[选中颜色]。数组则表示分别设置 选中高亮的五角星颜色 和 未选中暗灰的五角星颜色,[选中颜色,未选中颜色]。示例:['#ED7B2F', '#E3E6EB']。TS 类型:`string \| Array` | N count | Number | 5 | 评分的数量 | N -disabled | Boolean | - | 是否禁用评分 | N +disabled | Boolean | undefined | 是否禁用评分 | N gap | Number | 4 | 评分图标的间距 | N icon | Slot / Function | - | 自定义评分图标。TS 类型:`TNode`。[通用类型定义](https://github.com/Tencent/tdesign-vue-next/blob/develop/src/common.ts) | N showText | Boolean | false | 是否显示对应的辅助文字 | N -size | String | 24px | 评分图标的大小,示例:`20px` | N +size | String | 24px | 评分图标的大小 | N texts | Array | [] | 评分等级对应的辅助文字。组件内置默认值为:['极差', '失望', '一般', '满意', '惊喜']。自定义值示例:['1分', '2分', '3分', '4分', '5分']。TS 类型:`Array` | N value | Number | 0 | 选择评分的值。支持语法糖 `v-model` 或 `v-model:value` | N defaultValue | Number | 0 | 选择评分的值。非受控属性 | N diff --git a/packages/products/tdesign-vue-next/src/rate/type.ts b/packages/products/tdesign-vue-next/src/rate/type.ts index d9b4a2e3a..fdb94ef8f 100644 --- a/packages/products/tdesign-vue-next/src/rate/type.ts +++ b/packages/products/tdesign-vue-next/src/rate/type.ts @@ -24,7 +24,6 @@ export interface TdRateProps { count?: number; /** * 是否禁用评分 - * @default false */ disabled?: boolean; /** @@ -42,7 +41,7 @@ export interface TdRateProps { */ showText?: boolean; /** - * 评分图标的大小,示例:`20px` + * 评分图标的大小 * @default 24px */ size?: string; diff --git a/packages/products/tdesign-vue-next/src/slider/props.ts b/packages/products/tdesign-vue-next/src/slider/props.ts index 56d60dd77..d52eee73a 100644 --- a/packages/products/tdesign-vue-next/src/slider/props.ts +++ b/packages/products/tdesign-vue-next/src/slider/props.ts @@ -9,7 +9,10 @@ import { PropType } from 'vue'; export default { /** 是否禁用组件 */ - disabled: Boolean, + disabled: { + type: Boolean, + default: undefined, + }, /** 用于控制数字输入框组件,值为 false 表示不显示数字输入框;值为 true 表示呈现默认数字输入框;值类型为 Object 表示透传属性到数字输入框组件 */ inputNumberProps: { type: [Boolean, Object] as PropType, diff --git a/packages/products/tdesign-vue-next/src/slider/slider.en-US.md b/packages/products/tdesign-vue-next/src/slider/slider.en-US.md index e75bc19de..005ba54fa 100644 --- a/packages/products/tdesign-vue-next/src/slider/slider.en-US.md +++ b/packages/products/tdesign-vue-next/src/slider/slider.en-US.md @@ -1,11 +1,12 @@ :: BASE_DOC :: ## API + ### Slider Props name | type | default | description | required -- | -- | -- | -- | -- -disabled | Boolean | false | \- | N +disabled | Boolean | undefined | \- | N inputNumberProps | Boolean / Object | false | Typescript:`boolean \| InputNumberProps`,[InputNumber API Documents](./input-number?tab=api)。[see more ts definition](https://github.com/Tencent/tdesign-vue-next/tree/develop/src/slider/type.ts) | N label | String / Boolean / Slot / Function | true | Typescript:`string \| boolean \| TNode<{ value: SliderValue; position?: 'start' \| 'end' }>`。[see more ts definition](https://github.com/Tencent/tdesign-vue-next/blob/develop/src/common.ts) | N layout | String | horizontal | options: vertical/horizontal | N diff --git a/packages/products/tdesign-vue-next/src/slider/slider.md b/packages/products/tdesign-vue-next/src/slider/slider.md index f1868bc92..2280e35e8 100644 --- a/packages/products/tdesign-vue-next/src/slider/slider.md +++ b/packages/products/tdesign-vue-next/src/slider/slider.md @@ -1,11 +1,12 @@ :: BASE_DOC :: ## API + ### Slider Props -名称 | 类型 | 默认值 | 说明 | 必传 +名称 | 类型 | 默认值 | 描述 | 必传 -- | -- | -- | -- | -- -disabled | Boolean | false | 是否禁用组件 | N +disabled | Boolean | undefined | 是否禁用组件 | N inputNumberProps | Boolean / Object | false | 用于控制数字输入框组件,值为 false 表示不显示数字输入框;值为 true 表示呈现默认数字输入框;值类型为 Object 表示透传属性到数字输入框组件。TS 类型:`boolean \| InputNumberProps`,[InputNumber API Documents](./input-number?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-vue-next/tree/develop/src/slider/type.ts) | N label | String / Boolean / Slot / Function | true | 滑块当前值文本。
值为 true 显示默认文案;值为 false 不显示滑块当前值文本;
值为 `${value}%` 则表示组件会根据占位符渲染文案;
值类型为函数时,参数 `value` 标识滑块值,参数 `position=start` 表示范围滑块的起始值,参数 `position=end` 表示范围滑块的终点值。TS 类型:`string \| boolean \| TNode<{ value: SliderValue; position?: 'start' \| 'end' }>`。[通用类型定义](https://github.com/Tencent/tdesign-vue-next/blob/develop/src/common.ts) | N layout | String | horizontal | 滑块布局方向。可选项:vertical/horizontal | N diff --git a/packages/products/tdesign-vue-next/src/slider/type.ts b/packages/products/tdesign-vue-next/src/slider/type.ts index f73ec3ee4..adb94efd5 100644 --- a/packages/products/tdesign-vue-next/src/slider/type.ts +++ b/packages/products/tdesign-vue-next/src/slider/type.ts @@ -11,7 +11,6 @@ import { TNode } from '../common'; export interface TdSliderProps { /** * 是否禁用组件 - * @default false */ disabled?: boolean; /** diff --git a/packages/products/tdesign-vue/src/rate/props.ts b/packages/products/tdesign-vue/src/rate/props.ts index e4fb97280..7110402de 100644 --- a/packages/products/tdesign-vue/src/rate/props.ts +++ b/packages/products/tdesign-vue/src/rate/props.ts @@ -21,7 +21,10 @@ export default { default: 5, }, /** 是否禁用评分 */ - disabled: Boolean, + disabled: { + type: Boolean, + default: undefined, + }, /** 评分图标的间距 */ gap: { type: Number, @@ -33,7 +36,7 @@ export default { }, /** 是否显示对应的辅助文字 */ showText: Boolean, - /** 评分图标的大小,示例:`20px` */ + /** 评分图标的大小 */ size: { type: String, default: '24px', diff --git a/packages/products/tdesign-vue/src/rate/rate.en-US.md b/packages/products/tdesign-vue/src/rate/rate.en-US.md index 9971392f3..8e87cf758 100644 --- a/packages/products/tdesign-vue/src/rate/rate.en-US.md +++ b/packages/products/tdesign-vue/src/rate/rate.en-US.md @@ -9,7 +9,7 @@ name | type | default | description | required allowHalf | Boolean | false | \- | N color | String / Array | '#ED7B2F' | Typescript:`string \| Array` | N count | Number | 5 | \- | N -disabled | Boolean | - | \- | N +disabled | Boolean | undefined | \- | N gap | Number | 4 | \- | N icon | Slot / Function | - | Typescript:`TNode`。[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N showText | Boolean | false | \- | N diff --git a/packages/products/tdesign-vue/src/rate/rate.md b/packages/products/tdesign-vue/src/rate/rate.md index 747503716..89a465e9e 100644 --- a/packages/products/tdesign-vue/src/rate/rate.md +++ b/packages/products/tdesign-vue/src/rate/rate.md @@ -9,7 +9,7 @@ allowHalf | Boolean | false | 是否允许半选 | N color | String / Array | '#ED7B2F' | 评分图标的颜色,样式中默认为 #ED7B2F。一个值表示设置选中高亮的五角星颜色,示例:[选中颜色]。数组则表示分别设置 选中高亮的五角星颜色 和 未选中暗灰的五角星颜色,[选中颜色,未选中颜色]。示例:['#ED7B2F', '#E3E6EB']。TS 类型:`string \| Array` | N count | Number | 5 | 评分的数量 | N -disabled | Boolean | - | 是否禁用评分 | N +disabled | Boolean | undefined | 是否禁用评分 | N gap | Number | 4 | 评分图标的间距 | N icon | Slot / Function | - | 自定义评分图标。TS 类型:`TNode`。[通用类型定义](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N showText | Boolean | false | 是否显示对应的辅助文字 | N diff --git a/packages/products/tdesign-vue/src/rate/type.ts b/packages/products/tdesign-vue/src/rate/type.ts index 3d227af03..3a0e12aef 100644 --- a/packages/products/tdesign-vue/src/rate/type.ts +++ b/packages/products/tdesign-vue/src/rate/type.ts @@ -41,7 +41,7 @@ export interface TdRateProps { */ showText?: boolean; /** - * 评分图标的大小,示例:`20px` + * 评分图标的大小 * @default 24px */ size?: string; diff --git a/packages/products/tdesign-vue/src/slider/props.ts b/packages/products/tdesign-vue/src/slider/props.ts index e74684faf..80216f699 100644 --- a/packages/products/tdesign-vue/src/slider/props.ts +++ b/packages/products/tdesign-vue/src/slider/props.ts @@ -9,7 +9,10 @@ import { PropType } from 'vue'; export default { /** 是否禁用组件 */ - disabled: Boolean, + disabled: { + type: Boolean, + default: undefined, + }, /** 用于控制数字输入框组件,值为 false 表示不显示数字输入框;值为 true 表示呈现默认数字输入框;值类型为 Object 表示透传属性到数字输入框组件 */ inputNumberProps: { type: [Boolean, Object] as PropType, diff --git a/packages/products/tdesign-vue/src/slider/slider.en-US.md b/packages/products/tdesign-vue/src/slider/slider.en-US.md index da7038c7d..d73c83164 100644 --- a/packages/products/tdesign-vue/src/slider/slider.en-US.md +++ b/packages/products/tdesign-vue/src/slider/slider.en-US.md @@ -1,11 +1,12 @@ :: BASE_DOC :: ## API + ### Slider Props name | type | default | description | required -- | -- | -- | -- | -- -disabled | Boolean | false | \- | N +disabled | Boolean | undefined | \- | N inputNumberProps | Boolean / Object | false | Typescript:`boolean \| InputNumberProps`,[InputNumber API Documents](./input-number?tab=api)。[see more ts definition](https://github.com/Tencent/tdesign-vue/tree/develop/src/slider/type.ts) | N label | String / Boolean / Slot / Function | true | Typescript:`string \| boolean \| TNode<{ value: SliderValue; position?: 'start' \| 'end' }>`。[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N layout | String | horizontal | options: vertical/horizontal | N diff --git a/packages/products/tdesign-vue/src/slider/slider.md b/packages/products/tdesign-vue/src/slider/slider.md index d058e2698..212dd86ea 100644 --- a/packages/products/tdesign-vue/src/slider/slider.md +++ b/packages/products/tdesign-vue/src/slider/slider.md @@ -1,11 +1,12 @@ :: BASE_DOC :: ## API + ### Slider Props -名称 | 类型 | 默认值 | 说明 | 必传 +名称 | 类型 | 默认值 | 描述 | 必传 -- | -- | -- | -- | -- -disabled | Boolean | false | 是否禁用组件 | N +disabled | Boolean | undefined | 是否禁用组件 | N inputNumberProps | Boolean / Object | false | 用于控制数字输入框组件,值为 false 表示不显示数字输入框;值为 true 表示呈现默认数字输入框;值类型为 Object 表示透传属性到数字输入框组件。TS 类型:`boolean \| InputNumberProps`,[InputNumber API Documents](./input-number?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-vue/tree/develop/src/slider/type.ts) | N label | String / Boolean / Slot / Function | true | 滑块当前值文本。
值为 true 显示默认文案;值为 false 不显示滑块当前值文本;
值为 `${value}%` 则表示组件会根据占位符渲染文案;
值类型为函数时,参数 `value` 标识滑块值,参数 `position=start` 表示范围滑块的起始值,参数 `position=end` 表示范围滑块的终点值。TS 类型:`string \| boolean \| TNode<{ value: SliderValue; position?: 'start' \| 'end' }>`。[通用类型定义](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N layout | String | horizontal | 滑块布局方向。可选项:vertical/horizontal | N diff --git a/packages/products/tdesign-vue/src/slider/type.ts b/packages/products/tdesign-vue/src/slider/type.ts index 47c92e8b4..a3029d9cc 100644 --- a/packages/products/tdesign-vue/src/slider/type.ts +++ b/packages/products/tdesign-vue/src/slider/type.ts @@ -11,7 +11,6 @@ import { TNode } from '../common'; export interface TdSliderProps { /** * 是否禁用组件 - * @default false */ disabled?: boolean; /** diff --git a/packages/scripts/api.json b/packages/scripts/api.json index 80c9fdd31..e1c1126b2 100644 --- a/packages/scripts/api.json +++ b/packages/scripts/api.json @@ -14655,6 +14655,7 @@ "1", "2", "4", + "8", "16", "32", "64" @@ -14667,7 +14668,7 @@ ], "field_default_value": "", "field_enum": "", - "field_desc_zh": "透传至 Loading 组件", + "field_desc_zh": "透传 Loading 组件全部属性", "field_desc_en": null, "field_required": 0, "event_input": "", @@ -14688,6 +14689,7 @@ "Vue(PC)", "React(PC)", "Angular(PC)", + "Vue(Mobile)", "React(Mobile)", "Angular(Mobile)", "Miniprogram" @@ -14696,43 +14698,6 @@ "Object" ] }, - { - "id": 1712654734, - "platform_framework": [ - "8" - ], - "component": "Button", - "field_category": 1, - "field_name": "loadingProps", - "field_type": [ - "8" - ], - "field_default_value": "", - "field_enum": "", - "field_desc_zh": "透传加载组件全部属性", - "field_desc_en": null, - "field_required": 0, - "event_input": "", - "create_time": "2024-04-09 09:25:34", - "update_time": "2024-04-09 09:25:34", - "event_output": null, - "custom_field_type": "LoadingProps【import { LoadingProps } from '@Loading'】", - "syntactic_sugar": null, - "readonly": 1, - "html_attribute": 0, - "trigger_elements": "", - "deprecated": 0, - "version": "", - "test_description": null, - "support_default_value": 0, - "field_category_text": "Props", - "platform_framework_text": [ - "Vue(Mobile)" - ], - "field_type_text": [ - "Object" - ] - }, { "id": 1709458728, "platform_framework": [ @@ -15086,6 +15051,8 @@ "id": 1712914060, "platform_framework": [ "8", + "16", + "32", "64" ], "component": "Button", @@ -15115,46 +15082,9 @@ "field_category_text": "Props", "platform_framework_text": [ "Vue(Mobile)", - "Miniprogram" - ], - "field_type_text": [ - "String" - ] - }, - { - "id": 1713235048, - "platform_framework": [ - "16", - "32" - ], - "component": "Button", - "field_category": 1, - "field_name": "size", - "field_type": [ - "1" - ], - "field_default_value": "medium", - "field_enum": "small/medium/large", - "field_desc_zh": "组件尺寸", - "field_desc_en": "a button has four size", - "field_required": 0, - "event_input": "", - "create_time": "2024-04-16 02:37:28", - "update_time": "2024-04-16 02:37:28", - "event_output": null, - "custom_field_type": null, - "syntactic_sugar": null, - "readonly": 1, - "html_attribute": 0, - "trigger_elements": "", - "deprecated": 0, - "version": "", - "test_description": null, - "support_default_value": 0, - "field_category_text": "Props", - "platform_framework_text": [ "React(Mobile)", - "Angular(Mobile)" + "Angular(Mobile)", + "Miniprogram" ], "field_type_text": [ "String" @@ -15540,6 +15470,7 @@ { "id": 1126, "platform_framework": [ + "8", "16", "32", "64" @@ -15570,6 +15501,7 @@ "support_default_value": 0, "field_category_text": "Props", "platform_framework_text": [ + "Vue(Mobile)", "React(Mobile)", "Angular(Mobile)", "Miniprogram" @@ -15578,43 +15510,6 @@ "String" ] }, - { - "id": 1712578143, - "platform_framework": [ - "8" - ], - "component": "Button", - "field_category": 1, - "field_name": "variant", - "field_type": [ - "1" - ], - "field_default_value": "base", - "field_enum": "base/outline/text", - "field_desc_zh": "按钮形式,基础、线框、文字", - "field_desc_en": "button variant", - "field_required": 0, - "event_input": "", - "create_time": "2024-04-08 12:09:03", - "update_time": "2024-04-08 12:09:03", - "event_output": null, - "custom_field_type": null, - "syntactic_sugar": null, - "readonly": 1, - "html_attribute": 0, - "trigger_elements": "", - "deprecated": 0, - "version": "", - "test_description": null, - "support_default_value": 0, - "field_category_text": "Props", - "platform_framework_text": [ - "Vue(Mobile)" - ], - "field_type_text": [ - "String" - ] - }, { "id": 1709460216, "platform_framework": [ @@ -23852,7 +23747,9 @@ { "id": 1712660966, "platform_framework": [ - "8" + "8", + "16", + "32" ], "component": "CellGroup", "field_category": 1, @@ -23880,7 +23777,9 @@ "support_default_value": 0, "field_category_text": "Props", "platform_framework_text": [ - "Vue(Mobile)" + "Vue(Mobile)", + "React(Mobile)", + "Angular(Mobile)" ], "field_type_text": [ "Boolean" @@ -23976,7 +23875,7 @@ ], "field_default_value": "default", "field_enum": "default/card", - "field_desc_zh": "单元格风格", + "field_desc_zh": "单元格组风格", "field_desc_en": null, "field_required": 0, "event_input": "", @@ -25673,6 +25572,7 @@ "1", "2", "4", + "8", "16", "32", "64" @@ -25706,6 +25606,7 @@ "Vue(PC)", "React(PC)", "Angular(PC)", + "Vue(Mobile)", "React(Mobile)", "Angular(Mobile)", "Miniprogram" @@ -25714,43 +25615,6 @@ "Boolean" ] }, - { - "id": 1712578811, - "platform_framework": [ - "8" - ], - "component": "Checkbox", - "field_category": 1, - "field_name": "disabled", - "field_type": [ - "4" - ], - "field_default_value": "undefined", - "field_enum": "", - "field_desc_zh": "是否禁用组件。如果父组件存在 CheckboxGroup,默认值由 CheckboxGroup.disabled 控制。Checkbox.disabled 优先级高于 CheckboxGroup.disabled", - "field_desc_en": null, - "field_required": 0, - "event_input": "", - "create_time": "2024-04-08 12:20:11", - "update_time": "2024-04-08 12:20:11", - "event_output": null, - "custom_field_type": null, - "syntactic_sugar": null, - "readonly": 1, - "html_attribute": 0, - "trigger_elements": "", - "deprecated": 0, - "version": "", - "test_description": null, - "support_default_value": 0, - "field_category_text": "Props", - "platform_framework_text": [ - "Vue(Mobile)" - ], - "field_type_text": [ - "Boolean" - ] - }, { "id": 1408, "platform_framework": [ @@ -26724,7 +26588,10 @@ "platform_framework": [ "1", "2", - "4" + "4", + "8", + "16", + "32" ], "component": "CheckboxGroup", "field_category": 1, @@ -26734,7 +26601,7 @@ ], "field_default_value": "undefined", "field_enum": "", - "field_desc_zh": "是否禁用组件,默认为 false。优先级:Form.disabled < CheckboxGroup.disabled < Checkbox.disabled", + "field_desc_zh": "是否禁用组件。优先级:Form.disabled < CheckboxGroup.disabled < Checkbox.disabled", "field_desc_en": null, "field_required": 0, "event_input": "", @@ -26754,72 +26621,36 @@ "platform_framework_text": [ "Vue(PC)", "React(PC)", - "Angular(PC)" - ], - "field_type_text": [ - "Boolean" - ] - }, - { - "id": 3530, - "platform_framework": [ - "16", - "32", - "64" - ], - "component": "CheckboxGroup", - "field_category": 1, - "field_name": "disabled", - "field_type": [ - "4" - ], - "field_default_value": "", - "field_enum": "", - "field_desc_zh": "是否禁用组件,默认为 false。 CheckboxGroup.disabled < Checkbox.disabled ,后续新增 Form 组件后,Form.disabled 优先级最低", - "field_desc_en": null, - "field_required": 0, - "event_input": "", - "create_time": "2023-07-15 04:55:51", - "update_time": "2023-07-15 04:55:51", - "event_output": null, - "custom_field_type": null, - "syntactic_sugar": null, - "readonly": 1, - "html_attribute": 0, - "trigger_elements": "", - "deprecated": 0, - "version": "", - "test_description": null, - "support_default_value": 0, - "field_category_text": "Props", - "platform_framework_text": [ + "Angular(PC)", + "Vue(Mobile)", "React(Mobile)", - "Angular(Mobile)", - "Miniprogram" + "Angular(Mobile)" ], "field_type_text": [ "Boolean" ] }, { - "id": 1712578949, + "id": 1689498234, "platform_framework": [ - "8" + "1", + "2", + "4" ], "component": "CheckboxGroup", "field_category": 1, - "field_name": "disabled", + "field_name": "lazyLoad", "field_type": [ "4" ], - "field_default_value": "", + "field_default_value": "false", "field_enum": "", - "field_desc_zh": "是否禁用组件,默认为 false。CheckboxGroup.disabled 优先级低于 Checkbox.disabled", - "field_desc_en": null, + "field_desc_zh": "是否启用懒加载。子组件 Checkbox 数据量大时建议开启;加载复杂内容或大量图片时建议开启", + "field_desc_en": "load checkbox content when it entering the visible area", "field_required": 0, "event_input": "", - "create_time": "2024-04-08 12:22:29", - "update_time": "2024-04-08 12:22:29", + "create_time": "2023-07-16 09:03:54", + "update_time": "2023-07-16 09:03:54", "event_output": null, "custom_field_type": null, "syntactic_sugar": null, @@ -26832,33 +26663,39 @@ "support_default_value": 0, "field_category_text": "Props", "platform_framework_text": [ - "Vue(Mobile)" + "Vue(PC)", + "React(PC)", + "Angular(PC)" ], "field_type_text": [ "Boolean" ] }, { - "id": 1689498234, + "id": 1415, "platform_framework": [ "1", "2", - "4" + "4", + "8", + "16", + "32", + "64" ], "component": "CheckboxGroup", "field_category": 1, - "field_name": "lazyLoad", + "field_name": "max", "field_type": [ - "4" + "2" ], - "field_default_value": "false", + "field_default_value": "undefined", "field_enum": "", - "field_desc_zh": "是否启用懒加载。子组件 Checkbox 数据量大时建议开启;加载复杂内容或大量图片时建议开启", - "field_desc_en": "load checkbox content when it entering the visible area", + "field_desc_zh": "支持最多选中的数量", + "field_desc_en": null, "field_required": 0, "event_input": "", - "create_time": "2023-07-16 09:03:54", - "update_time": "2023-07-16 09:03:54", + "create_time": "2021-08-06 06:08:28", + "update_time": "2021-09-01 12:39:49", "event_output": null, "custom_field_type": null, "syntactic_sugar": null, @@ -26866,21 +26703,25 @@ "html_attribute": 0, "trigger_elements": "", "deprecated": 0, - "version": "", + "version": null, "test_description": null, "support_default_value": 0, "field_category_text": "Props", "platform_framework_text": [ "Vue(PC)", "React(PC)", - "Angular(PC)" + "Angular(PC)", + "Vue(Mobile)", + "React(Mobile)", + "Angular(Mobile)", + "Miniprogram" ], "field_type_text": [ - "Boolean" + "Number" ] }, { - "id": 1415, + "id": 150, "platform_framework": [ "1", "2", @@ -26892,67 +26733,18 @@ ], "component": "CheckboxGroup", "field_category": 1, - "field_name": "max", + "field_name": "name", "field_type": [ - "2" + "1" ], - "field_default_value": "undefined", + "field_default_value": "", "field_enum": "", - "field_desc_zh": "支持最多选中的数量", + "field_desc_zh": "统一设置内部复选框 HTML 属性", "field_desc_en": null, "field_required": 0, "event_input": "", - "create_time": "2021-08-06 06:08:28", - "update_time": "2021-09-01 12:39:49", - "event_output": null, - "custom_field_type": null, - "syntactic_sugar": null, - "readonly": 1, - "html_attribute": 0, - "trigger_elements": "", - "deprecated": 0, - "version": null, - "test_description": null, - "support_default_value": 0, - "field_category_text": "Props", - "platform_framework_text": [ - "Vue(PC)", - "React(PC)", - "Angular(PC)", - "Vue(Mobile)", - "React(Mobile)", - "Angular(Mobile)", - "Miniprogram" - ], - "field_type_text": [ - "Number" - ] - }, - { - "id": 150, - "platform_framework": [ - "1", - "2", - "4", - "8", - "16", - "32", - "64" - ], - "component": "CheckboxGroup", - "field_category": 1, - "field_name": "name", - "field_type": [ - "1" - ], - "field_default_value": "", - "field_enum": "", - "field_desc_zh": "统一设置内部复选框 HTML 属性", - "field_desc_en": null, - "field_required": 0, - "event_input": "", - "create_time": "2020-11-30 09:15:41", - "update_time": "2020-12-27 14:20:04", + "create_time": "2020-11-30 09:15:41", + "update_time": "2020-12-27 14:20:04", "event_output": null, "custom_field_type": null, "syntactic_sugar": null, @@ -62235,7 +62027,9 @@ "1", "2", "4", - "8" + "8", + "16", + "32" ], "component": "Input", "field_category": 1, @@ -62266,7 +62060,9 @@ "Vue(PC)", "React(PC)", "Angular(PC)", - "Vue(Mobile)" + "Vue(Mobile)", + "React(Mobile)", + "Angular(Mobile)" ], "field_type_text": [ "String" @@ -62325,8 +62121,10 @@ "1", "2", "4", + "8", "16", - "32" + "32", + "64" ], "component": "Input", "field_category": 1, @@ -62336,7 +62134,7 @@ ], "field_default_value": "false", "field_enum": "", - "field_desc_zh": "无边框模式", + "field_desc_zh": "是否开启无边框模式", "field_desc_en": "input without border", "field_required": 0, "event_input": "", @@ -62357,87 +62155,15 @@ "Vue(PC)", "React(PC)", "Angular(PC)", + "Vue(Mobile)", "React(Mobile)", - "Angular(Mobile)" - ], - "field_type_text": [ - "Boolean" - ] - }, - { - "id": 1691465640, - "platform_framework": [ - "64" - ], - "component": "Input", - "field_category": 1, - "field_name": "borderless", - "field_type": [ - "4" - ], - "field_default_value": "false", - "field_enum": "", - "field_desc_zh": "是否开启无边框模式", - "field_desc_en": null, - "field_required": 0, - "event_input": "", - "create_time": "2023-08-08 03:34:00", - "update_time": "2023-08-08 03:34:00", - "event_output": null, - "custom_field_type": null, - "syntactic_sugar": null, - "readonly": 1, - "html_attribute": 0, - "trigger_elements": "", - "deprecated": 0, - "version": "", - "test_description": null, - "support_default_value": 0, - "field_category_text": "Props", - "platform_framework_text": [ + "Angular(Mobile)", "Miniprogram" ], "field_type_text": [ "Boolean" ] }, - { - "id": 1712648998, - "platform_framework": [ - "8" - ], - "component": "Input", - "field_category": 1, - "field_name": "borderless", - "field_type": [ - "4" - ], - "field_default_value": "false", - "field_enum": "", - "field_desc_zh": "是否开启无边框模式", - "field_desc_en": "input without border", - "field_required": 0, - "event_input": "", - "create_time": "2024-04-09 07:49:58", - "update_time": "2024-04-09 07:49:58", - "event_output": null, - "custom_field_type": null, - "syntactic_sugar": null, - "readonly": 1, - "html_attribute": 0, - "trigger_elements": "", - "deprecated": 0, - "version": "", - "test_description": null, - "support_default_value": 0, - "field_category_text": "Props", - "platform_framework_text": [ - "Vue(Mobile)" - ], - "field_type_text": [ - "Boolean" - ] - }, { "id": 1712025475, "platform_framework": [ @@ -62478,18 +62204,22 @@ { "id": 742, "platform_framework": [ - "64" + "1", + "2", + "4", + "8", + "16", + "32" ], "component": "Input", "field_category": 1, "field_name": "clearable", "field_type": [ - "4", - "8" + "4" ], "field_default_value": "false", "field_enum": "", - "field_desc_zh": "是否可清空,默认不启动。值为 `true` 表示使用默认清除空按钮,值为 `Object` 表示透传至 `icon`", + "field_desc_zh": "是否可清空", "field_desc_en": "show clear icon, clicked to clear input value", "field_required": 0, "event_input": "", @@ -62507,32 +62237,32 @@ "support_default_value": 0, "field_category_text": "Props", "platform_framework_text": [ - "Miniprogram" + "Vue(PC)", + "React(PC)", + "Angular(PC)", + "Vue(Mobile)", + "React(Mobile)", + "Angular(Mobile)" ], "field_type_text": [ - "Boolean", - "Object" + "Boolean" ] }, { "id": 1712579780, "platform_framework": [ - "1", - "2", - "4", - "8", - "16", - "32" + "64" ], "component": "Input", "field_category": 1, "field_name": "clearable", "field_type": [ - "4" + "4", + "8" ], "field_default_value": "false", "field_enum": "", - "field_desc_zh": "是否可清空", + "field_desc_zh": "是否可清空,默认不启动。值为 `true` 表示使用默认清除空按钮,值为 `Object` 表示透传至 `icon`", "field_desc_en": "show clear icon, clicked to clear input value", "field_required": 0, "event_input": "", @@ -62550,15 +62280,11 @@ "support_default_value": 0, "field_category_text": "Props", "platform_framework_text": [ - "Vue(PC)", - "React(PC)", - "Angular(PC)", - "Vue(Mobile)", - "React(Mobile)", - "Angular(Mobile)" + "Miniprogram" ], "field_type_text": [ - "Boolean" + "Boolean", + "Object" ] }, { @@ -63129,6 +62855,8 @@ "id": 3382, "platform_framework": [ "8", + "16", + "32", "64" ], "component": "Input", @@ -63158,6 +62886,8 @@ "field_category_text": "Props", "platform_framework_text": [ "Vue(Mobile)", + "React(Mobile)", + "Angular(Mobile)", "Miniprogram" ], "field_type_text": [ @@ -64778,9 +64508,7 @@ "platform_framework": [ "1", "2", - "4", - "16", - "32" + "4" ], "component": "Input", "field_category": 2, @@ -64808,9 +64536,7 @@ "platform_framework_text": [ "Vue(PC)", "React(PC)", - "Angular(PC)", - "React(Mobile)", - "Angular(Mobile)" + "Angular(PC)" ], "field_type_text": [] }, @@ -64850,7 +64576,9 @@ { "id": 1712649678, "platform_framework": [ - "8" + "8", + "16", + "32" ], "component": "Input", "field_category": 2, @@ -64876,7 +64604,9 @@ "support_default_value": 0, "field_category_text": "Events", "platform_framework_text": [ - "Vue(Mobile)" + "Vue(Mobile)", + "React(Mobile)", + "Angular(Mobile)" ], "field_type_text": [] }, @@ -64885,9 +64615,7 @@ "platform_framework": [ "1", "2", - "4", - "16", - "32" + "4" ], "component": "Input", "field_category": 2, @@ -64915,9 +64643,7 @@ "platform_framework_text": [ "Vue(PC)", "React(PC)", - "Angular(PC)", - "React(Mobile)", - "Angular(Mobile)" + "Angular(PC)" ], "field_type_text": [] }, @@ -64957,7 +64683,9 @@ { "id": 1712649727, "platform_framework": [ - "8" + "8", + "16", + "32" ], "component": "Input", "field_category": 2, @@ -64983,7 +64711,9 @@ "support_default_value": 0, "field_category_text": "Events", "platform_framework_text": [ - "Vue(Mobile)" + "Vue(Mobile)", + "React(Mobile)", + "Angular(Mobile)" ], "field_type_text": [] }, @@ -65212,9 +64942,7 @@ "platform_framework": [ "1", "2", - "4", - "16", - "32" + "4" ], "component": "Input", "field_category": 2, @@ -65242,9 +64970,7 @@ "platform_framework_text": [ "Vue(PC)", "React(PC)", - "Angular(PC)", - "React(Mobile)", - "Angular(Mobile)" + "Angular(PC)" ], "field_type_text": [] }, @@ -65286,9 +65012,7 @@ "platform_framework": [ "1", "2", - "4", - "16", - "32" + "4" ], "component": "Input", "field_category": 2, @@ -65316,9 +65040,7 @@ "platform_framework_text": [ "Vue(PC)", "React(PC)", - "Angular(PC)", - "React(Mobile)", - "Angular(Mobile)" + "Angular(PC)" ], "field_type_text": [] }, @@ -65358,7 +65080,9 @@ { "id": 1712649844, "platform_framework": [ - "8" + "8", + "16", + "32" ], "component": "Input", "field_category": 2, @@ -65384,7 +65108,9 @@ "support_default_value": 0, "field_category_text": "Events", "platform_framework_text": [ - "Vue(Mobile)" + "Vue(Mobile)", + "React(Mobile)", + "Angular(Mobile)" ], "field_type_text": [] }, @@ -87801,6 +87527,7 @@ { "id": 1420, "platform_framework": [ + "8", "16", "32" ], @@ -87813,14 +87540,14 @@ ], "field_default_value": "'circle'", "field_enum": "", - "field_desc_zh": "自定义选中图标和非选中图标。示例:[选中态图标地址,非选中态图标地址]。使用 String 时,值为 circle 表示填充型图标、值为 line 表示描边型图标、值为 dot 表示圆点图标", + "field_desc_zh": "自定义选中图标和非选中图标。示例:[选中态图标地址,非选中态图标地址]。使用 String 时,值为 circle 表示填充型图标、值为 line 表示描边型图标、值为 dot 表示圆点图标、值为 'none' 则表示没有图标", "field_desc_en": null, "field_required": 0, "event_input": "", "create_time": "2021-08-10 05:23:21", "update_time": "2021-12-25 15:54:08", "event_output": null, - "custom_field_type": "'circle' | 'line' | 'dot' | 'loading' | Array", + "custom_field_type": "'circle' | 'line' | 'dot' | 'none' |Array", "syntactic_sugar": null, "readonly": 1, "html_attribute": 0, @@ -87831,6 +87558,7 @@ "support_default_value": 0, "field_category_text": "Props", "platform_framework_text": [ + "Vue(Mobile)", "React(Mobile)", "Angular(Mobile)" ], @@ -87880,45 +87608,6 @@ "TNode" ] }, - { - "id": 1712656661, - "platform_framework": [ - "8" - ], - "component": "Radio", - "field_category": 1, - "field_name": "icon", - "field_type": [ - "1", - "16" - ], - "field_default_value": "'circle'", - "field_enum": "", - "field_desc_zh": "自定义选中图标和非选中图标。示例:[选中态图标地址,非选中态图标地址]。使用 String 时,值为 circle 表示填充型图标、值为 line 表示描边型图标、值为 dot 表示圆点图标、值为 'none' 则表示没有图标", - "field_desc_en": null, - "field_required": 0, - "event_input": "", - "create_time": "2024-04-09 09:57:41", - "update_time": "2024-04-09 09:57:41", - "event_output": null, - "custom_field_type": "'circle' | 'line' | 'dot' | 'none' |Array", - "syntactic_sugar": null, - "readonly": 1, - "html_attribute": 0, - "trigger_elements": "", - "deprecated": 0, - "version": "", - "test_description": null, - "support_default_value": 0, - "field_category_text": "Props", - "platform_framework_text": [ - "Vue(Mobile)" - ], - "field_type_text": [ - "String", - "Array" - ] - }, { "id": 1432, "platform_framework": [ @@ -88948,6 +88637,7 @@ { "id": 3540, "platform_framework": [ + "8", "16", "32" ], @@ -88967,7 +88657,7 @@ "create_time": "2023-06-21 04:08:54", "update_time": "2023-06-21 04:08:54", "event_output": null, - "custom_field_type": "'circle' | 'line' | 'dot' | 'loading' | Array", + "custom_field_type": "'circle' | 'line' | 'dot' | Array", "syntactic_sugar": null, "readonly": 1, "html_attribute": 0, @@ -88978,6 +88668,7 @@ "support_default_value": 0, "field_category_text": "Props", "platform_framework_text": [ + "Vue(Mobile)", "React(Mobile)", "Angular(Mobile)" ], @@ -88986,45 +88677,6 @@ "Array" ] }, - { - "id": 1712656800, - "platform_framework": [ - "8" - ], - "component": "RadioGroup", - "field_category": 1, - "field_name": "icon", - "field_type": [ - "1", - "16" - ], - "field_default_value": "'circle'", - "field_enum": "", - "field_desc_zh": "自定义选中图标和非选中图标。示例:[选中态图标地址,非选中态图标地址]。使用 String 时,值为 circle 表示填充型图标、值为 line 表示描边型图标、值为 dot 表示圆点图标", - "field_desc_en": null, - "field_required": 0, - "event_input": "", - "create_time": "2024-04-09 10:00:00", - "update_time": "2024-04-09 10:00:00", - "event_output": null, - "custom_field_type": "'circle' | 'line' | 'dot' | Array", - "syntactic_sugar": null, - "readonly": 1, - "html_attribute": 0, - "trigger_elements": "", - "deprecated": 0, - "version": "", - "test_description": null, - "support_default_value": 0, - "field_category_text": "Props", - "platform_framework_text": [ - "Vue(Mobile)" - ], - "field_type_text": [ - "String", - "Array" - ] - }, { "id": 3419, "platform_framework": [ @@ -89204,6 +88856,7 @@ { "id": 3420, "platform_framework": [ + "8", "16", "32", "64" @@ -89214,9 +88867,9 @@ "field_type": [ "1" ], - "field_default_value": "'left'", + "field_default_value": "left", "field_enum": "left/right", - "field_desc_zh": "复选框和内容相对位置;仅在使用 options 时生效。", + "field_desc_zh": "复选框和内容相对位置", "field_desc_en": null, "field_required": 0, "event_input": "", @@ -89234,6 +88887,7 @@ "support_default_value": 0, "field_category_text": "Props", "platform_framework_text": [ + "Vue(Mobile)", "React(Mobile)", "Angular(Mobile)", "Miniprogram" @@ -89242,43 +88896,6 @@ "String" ] }, - { - "id": 1712656884, - "platform_framework": [ - "8" - ], - "component": "RadioGroup", - "field_category": 1, - "field_name": "placement", - "field_type": [ - "1" - ], - "field_default_value": "left", - "field_enum": "left/right", - "field_desc_zh": "复选框和内容相对位置", - "field_desc_en": null, - "field_required": 0, - "event_input": "", - "create_time": "2024-04-09 10:01:24", - "update_time": "2024-04-09 10:01:24", - "event_output": null, - "custom_field_type": null, - "syntactic_sugar": null, - "readonly": 1, - "html_attribute": 0, - "trigger_elements": "", - "deprecated": 0, - "version": "", - "test_description": null, - "support_default_value": 0, - "field_category_text": "Props", - "platform_framework_text": [ - "Vue(Mobile)" - ], - "field_type_text": [ - "String" - ] - }, { "id": 497, "platform_framework": [ @@ -91758,7 +91375,7 @@ "field_type": [ "4" ], - "field_default_value": "", + "field_default_value": "undefined", "field_enum": "", "field_desc_zh": "是否禁用评分", "field_desc_en": null, @@ -91795,9 +91412,7 @@ "platform_framework": [ "1", "2", - "4", - "16", - "32" + "4" ], "component": "Rate", "field_category": 1, @@ -91827,9 +91442,7 @@ "platform_framework_text": [ "Vue(PC)", "React(PC)", - "Angular(PC)", - "React(Mobile)", - "Angular(Mobile)" + "Angular(PC)" ], "field_type_text": [ "Number" @@ -91839,6 +91452,8 @@ "id": 1712916879, "platform_framework": [ "8", + "16", + "32", "64" ], "component": "Rate", @@ -91868,6 +91483,8 @@ "field_category_text": "Props", "platform_framework_text": [ "Vue(Mobile)", + "React(Mobile)", + "Angular(Mobile)", "Miniprogram" ], "field_type_text": [ @@ -101529,7 +101146,7 @@ "field_type": [ "4" ], - "field_default_value": "false", + "field_default_value": "undefined", "field_enum": "", "field_desc_zh": "是否禁用组件", "field_desc_en": null, @@ -104435,7 +104052,7 @@ "field_type": [ "4" ], - "field_default_value": "false", + "field_default_value": "undefined", "field_enum": "", "field_desc_zh": "禁用全部操作", "field_desc_en": null, @@ -104581,7 +104198,9 @@ { "id": 1712658566, "platform_framework": [ - "8" + "8", + "16", + "32" ], "component": "Stepper", "field_category": 1, @@ -104591,7 +104210,7 @@ ], "field_default_value": "true", "field_enum": "", - "field_desc_zh": "是否整形", + "field_desc_zh": "是否整型", "field_desc_en": null, "field_required": 0, "event_input": "", @@ -104609,7 +104228,9 @@ "support_default_value": 0, "field_category_text": "Props", "platform_framework_text": [ - "Vue(Mobile)" + "Vue(Mobile)", + "React(Mobile)", + "Angular(Mobile)" ], "field_type_text": [ "Boolean" @@ -105079,7 +104700,9 @@ { "id": 1712658600, "platform_framework": [ - "8" + "8", + "16", + "32" ], "component": "Stepper", "field_category": 2, @@ -105108,7 +104731,9 @@ "support_default_value": 0, "field_category_text": "Events", "platform_framework_text": [ - "Vue(Mobile)" + "Vue(Mobile)", + "React(Mobile)", + "Angular(Mobile)" ], "field_type_text": [ "String", @@ -120553,7 +120178,9 @@ { "id": 1712658977, "platform_framework": [ - "8" + "8", + "16", + "32" ], "component": "Textarea", "field_category": 1, @@ -120581,7 +120208,9 @@ "support_default_value": 0, "field_category_text": "Props", "platform_framework_text": [ - "Vue(Mobile)" + "Vue(Mobile)", + "React(Mobile)", + "Angular(Mobile)" ], "field_type_text": [ "String" @@ -121267,7 +120896,7 @@ "create_time": "2021-02-21 14:00:57", "update_time": "2022-02-19 07:24:52", "event_output": null, - "custom_field_type": "TextareaValue【type TextareaValue = string】", + "custom_field_type": "TextareaValue【type TextareaValue = string | number】", "syntactic_sugar": "v-model", "readonly": 1, "html_attribute": 0,