diff --git a/db/TDesign.db b/db/TDesign.db index 7a069d336..57e47cfb8 100644 Binary files a/db/TDesign.db and b/db/TDesign.db differ diff --git a/packages/products/tdesign-react/src/common.ts b/packages/products/tdesign-react/src/common.ts index e5df47f92..67566139c 100644 --- a/packages/products/tdesign-react/src/common.ts +++ b/packages/products/tdesign-react/src/common.ts @@ -5,7 +5,7 @@ import { ReactElement, ReactNode, CSSProperties, FormEvent, DragEvent, Synthetic // TElement 表示 API 只接受传入组件 export type TElement = T extends undefined ? ReactElement : (props: T) => ReactElement; // 1. TNode = ReactNode; 2. TNode = (props: T) => ReactNode -export type TNode = T extends undefined ? ReactNode : ReactNode | ((props: T) => ReactNode); +export type TNode = T extends undefined ? ReactNode | (() => ReactNode) : ReactNode | ((props: T) => ReactNode); export type AttachNodeReturnValue = HTMLElement | Element | Document; export type AttachNode = CSSSelector | ((triggerNode?: HTMLElement) => AttachNodeReturnValue); diff --git a/packages/products/tdesign-react/src/typography/defaultProps.ts b/packages/products/tdesign-react/src/typography/defaultProps.ts new file mode 100644 index 000000000..40632c4ce --- /dev/null +++ b/packages/products/tdesign-react/src/typography/defaultProps.ts @@ -0,0 +1,21 @@ +/** + * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC + * */ + +import { TdTextProps, TdTitleProps, TdParagraphProps } from './type'; + +export const textDefaultProps: TdTextProps = { + code: false, + delete: false, + disabled: false, + ellipsis: false, + italic: false, + keyboard: false, + mark: false, + strong: false, + underline: false, +}; + +export const titleDefaultProps: TdTitleProps = { ellipsis: false, level: 'h1' }; + +export const paragraphDefaultProps: TdParagraphProps = { copyable: false, ellipsis: false }; diff --git a/packages/products/tdesign-react/src/typography/type.ts b/packages/products/tdesign-react/src/typography/type.ts new file mode 100644 index 000000000..5f3ab1212 --- /dev/null +++ b/packages/products/tdesign-react/src/typography/type.ts @@ -0,0 +1,156 @@ +/* eslint-disable */ + +/** + * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC + * */ + +import { tooltipProps } from '../tooltip'; +import { TNode } from '../common'; + +export interface TdTextProps { + /** + * 文本内容,同content + */ + children?: TNode; + /** + * 是否添加代码样式 + * @default false + */ + code?: boolean; + /** + * 是否添加删除线样式 + * @default false + */ + delete?: boolean; + /** + * 是否添加不可用样式 + * @default false + */ + disabled?: boolean; + /** + * 是否省略展示,可通过配置参数自定义省略操作的具体功能和样式 + * @default false + */ + ellipsis?: boolean | TypographyEllipsis; + /** + * 文本是否为斜体 + * @default false + */ + italic?: boolean; + /** + * 是否添加键盘样式 + * @default false + */ + keyboard?: boolean; + /** + * 是否添加标记样式,默认为黄色,可通过配置颜色修改标记样式,如#0052D9 + * @default false + */ + mark?: string | boolean; + /** + * 文本是否加粗 + * @default false + */ + strong?: boolean; + /** + * 主题 + */ + theme?: 'primary' | 'secondary' | 'success' | 'warning' | 'error'; + /** + * 是否添加下划线样式 + * @default false + */ + underline?: boolean; +} + +export interface TdTitleProps { + /** + * 段落内容,同 content + */ + children?: TNode; + /** + * 段落内容 + */ + content?: TNode; + /** + * 是否省略展示,可通过配置参数自定义省略操作的具体功能和样式 + * @default false + */ + ellipsis?: boolean | TypographyEllipsis; + /** + * 标题等级 + * @default h1 + */ + level?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'; +} + +export interface TdParagraphProps { + /** + * 段落内容,同 content + */ + children?: TNode; + /** + * 段落内容 + */ + content?: TNode; + /** + * 是否可复制,可通过配置参数自定义复制操作的具体功能和样式 + * @default false + */ + copyable?: boolean | TypographyCopyable; + /** + * 是否省略展示,可通过配置参数自定义省略操作的具体功能和样式 + * @default false + */ + ellipsis?: boolean | TypographyEllipsis; +} + +export interface TypographyEllipsis { + /** + * 展开后是否可以重新收起 + * @default true + */ + collapsible?: boolean; + /** + * 是否可展开 + * @default true + */ + expandable?: boolean; + /** + * 省略配置默认展示行数 + * @default 1 + */ + row?: number; + /** + * 自定义省略触发元素,一般用于自定义折叠图标 + */ + suffix?: TNode<{ expanded: boolean }>; + /** + * 光标在省略图标上出现的tooltip的配置 + */ + tooltipProps?: tooltipProps; + /** + * 点击省略按钮的回调 + */ + onExpand?: (expanded: boolean) => void; +} + +export interface TypographyCopyable { + /** + * 复制的文本内容,默认为全部文本 + * @default '' + */ + text?: string; + /** + * 自定义复制触发元素,一般用于自定义复制图标 + */ + suffix?: TNode<{ copied: boolean }>; + /** + * 光标在复制图标上出现的tooltip的配置 + */ + tooltipProps?: tooltipProps; + /** + * 点击复制按钮的回调 + */ + onCopy?: () => void; +} diff --git a/packages/products/tdesign-react/src/typography/typography.en-US.md b/packages/products/tdesign-react/src/typography/typography.en-US.md new file mode 100644 index 000000000..637a9cfcb --- /dev/null +++ b/packages/products/tdesign-react/src/typography/typography.en-US.md @@ -0,0 +1,62 @@ +:: BASE_DOC :: + +## API +### Text Props + +name | type | default | description | required +-- | -- | -- | -- | -- +className | String | - | 类名 | N +style | Object | - | 样式,Typescript:`React.CSSProperties` | N +children | TNode | - | children of text。Typescript:`string \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N +code | Boolean | false | add code style | N +delete | Boolean | false | add delete line style | N +disabled | Boolean | false | add disabled style | N +ellipsis | Boolean / Object | false | add ellipsis style。Typescript:`boolean \| TypographyEllipsis` | N +italic | Boolean | false | add italic style | N +keyboard | Boolean | false | add keyboard style | N +mark | String / Boolean | false | add mark style | N +strong | Boolean | false | add bold style | N +theme | String | - | theme of text。options: primary/secondary/success/warning/error | N +underline | Boolean | false | add underline style | N + +### Title Props + +name | type | default | description | required +-- | -- | -- | -- | -- +className | String | - | 类名 | N +style | Object | - | 样式,Typescript:`React.CSSProperties` | N +children | TNode | - | children of title。Typescript:`string \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N +content | TNode | - | content of title。Typescript:`string \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N +ellipsis | Boolean / Object | false | add ellipsis style。Typescript:`boolean \| TypographyEllipsis` | N +level | String | h1 | level of title。options: h1/h2/h3/h4/h5/h6 | N + +### Paragraph Props + +name | type | default | description | required +-- | -- | -- | -- | -- +className | String | - | 类名 | N +style | Object | - | 样式,Typescript:`React.CSSProperties` | N +children | TNode | - | children of paragraph。Typescript:`string \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N +content | TNode | - | content of paragraph。Typescript:`string \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N +copyable | Boolean / Object | false | add copyable style。Typescript:`boolean \| TypographyCopyable` | N +ellipsis | Boolean / Object | false | add ellipsis style。Typescript:`boolean \| TypographyEllipsis` | N + +### TypographyEllipsis + +name | type | default | description | required +-- | -- | -- | -- | -- +collapsible | Boolean | true | collapsible after expanding | N +expandable | Boolean | true | expandable | N +row | Number | 1 | default row number of ellipsis | N +suffix | TElement | - | custom element configuration for ellipsis and collapse icon。Typescript:`TNode<{ expanded: boolean }>`。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N +tooltipProps | Object | - | Configuration of the tooltip that appears on the ellipsis icon when the cursor is over it.。Typescript:`tooltipProps`,[Tooltip API Documents](./tooltip?tab=api)。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/src/typography/type.ts) | N +onExpand | Function | | Typescript:`(expanded:boolean) => void`
| N + +### TypographyCopyable + +name | type | default | description | required +-- | -- | -- | -- | -- + text | String | - | copied content | N +suffix | TElement | - | custom element configuration for copy icon。Typescript:`TNode<{ copied: boolean }>`。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N +tooltipProps | Object | - | Configuration of the tooltip that appears on the copy icon when the cursor is over it.。Typescript:`tooltipProps`,[Tooltip API Documents](./tooltip?tab=api)。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/src/typography/type.ts) | N +onCopy | Function | | Typescript:`() => void`
| N diff --git a/packages/products/tdesign-react/src/typography/typography.md b/packages/products/tdesign-react/src/typography/typography.md new file mode 100644 index 000000000..3776cb05b --- /dev/null +++ b/packages/products/tdesign-react/src/typography/typography.md @@ -0,0 +1,62 @@ +:: BASE_DOC :: + +## API +### Text Props + +名称 | 类型 | 默认值 | 说明 | 必传 +-- | -- | -- | -- | -- +className | String | - | 类名 | N +style | Object | - | 样式,TS 类型:`React.CSSProperties` | N +children | TNode | - | 文本内容,同content。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N +code | Boolean | false | 是否添加代码样式 | N +delete | Boolean | false | 是否添加删除线样式 | N +disabled | Boolean | false | 是否添加不可用样式 | N +ellipsis | Boolean / Object | false | 是否省略展示,可通过配置参数自定义省略操作的具体功能和样式。TS 类型:`boolean \| TypographyEllipsis` | N +italic | Boolean | false | 文本是否为斜体 | N +keyboard | Boolean | false | 是否添加键盘样式 | N +mark | String / Boolean | false | 是否添加标记样式,默认为黄色,可通过配置颜色修改标记样式,如#0052D9 | N +strong | Boolean | false | 文本是否加粗 | N +theme | String | - | 主题。可选项:primary/secondary/success/warning/error | N +underline | Boolean | false | 是否添加下划线样式 | N + +### Title Props + +名称 | 类型 | 默认值 | 说明 | 必传 +-- | -- | -- | -- | -- +className | String | - | 类名 | N +style | Object | - | 样式,TS 类型:`React.CSSProperties` | N +children | TNode | - | 段落内容,同 content。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N +content | TNode | - | 段落内容。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N +ellipsis | Boolean / Object | false | 是否省略展示,可通过配置参数自定义省略操作的具体功能和样式。TS 类型:`boolean \| TypographyEllipsis` | N +level | String | h1 | 标题等级。可选项:h1/h2/h3/h4/h5/h6 | N + +### Paragraph Props + +名称 | 类型 | 默认值 | 说明 | 必传 +-- | -- | -- | -- | -- +className | String | - | 类名 | N +style | Object | - | 样式,TS 类型:`React.CSSProperties` | N +children | TNode | - | 段落内容,同 content。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N +content | TNode | - | 段落内容。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N +copyable | Boolean / Object | false | 是否可复制,可通过配置参数自定义复制操作的具体功能和样式。TS 类型:`boolean \| TypographyCopyable` | N +ellipsis | Boolean / Object | false | 是否省略展示,可通过配置参数自定义省略操作的具体功能和样式。TS 类型:`boolean \| TypographyEllipsis` | N + +### TypographyEllipsis + +名称 | 类型 | 默认值 | 说明 | 必传 +-- | -- | -- | -- | -- +collapsible | Boolean | true | 展开后是否可以重新收起 | N +expandable | Boolean | true | 是否可展开 | N +row | Number | 1 | 省略配置默认展示行数 | N +suffix | TElement | - | 自定义省略触发元素,一般用于自定义折叠图标。TS 类型:`TNode<{ expanded: boolean }>`。[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N +tooltipProps | Object | - | 光标在省略图标上出现的tooltip的配置。TS 类型:`tooltipProps`,[Tooltip API Documents](./tooltip?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/typography/type.ts) | N +onExpand | Function | | TS 类型:`(expanded:boolean) => void`
点击省略按钮的回调 | N + +### TypographyCopyable + +名称 | 类型 | 默认值 | 说明 | 必传 +-- | -- | -- | -- | -- + text | String | - | 复制的文本内容,默认为全部文本 | N +suffix | TElement | - | 自定义复制触发元素,一般用于自定义复制图标。TS 类型:`TNode<{ copied: boolean }>`。[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N +tooltipProps | Object | - | 光标在复制图标上出现的tooltip的配置。TS 类型:`tooltipProps`,[Tooltip API Documents](./tooltip?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/typography/type.ts) | N +onCopy | Function | | TS 类型:`() => void`
点击复制按钮的回调 | N diff --git a/packages/products/tdesign-vue-next/src/typography/paragraph-props.ts b/packages/products/tdesign-vue-next/src/typography/paragraph-props.ts new file mode 100644 index 000000000..e8d08c930 --- /dev/null +++ b/packages/products/tdesign-vue-next/src/typography/paragraph-props.ts @@ -0,0 +1,29 @@ +/* eslint-disable */ + +/** + * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC + * */ + +import { TdParagraphProps } from '../typography/type'; +import { PropType } from 'vue'; + +export default { + /** 段落内容 */ + content: { + type: [String, Function] as PropType, + }, + /** 是否可复制,可通过配置参数自定义复制操作的具体功能和样式 */ + copyable: { + type: [Boolean, Object] as PropType, + default: false as TdParagraphProps['copyable'], + }, + /** 段落内容 */ + default: { + type: [String, Function] as PropType, + }, + /** 是否省略展示,可通过配置参数自定义省略操作的具体功能和样式 */ + ellipsis: { + type: [Boolean, Object] as PropType, + default: false as TdParagraphProps['ellipsis'], + }, +}; diff --git a/packages/products/tdesign-vue-next/src/typography/text-props.ts b/packages/products/tdesign-vue-next/src/typography/text-props.ts new file mode 100644 index 000000000..f9856cd35 --- /dev/null +++ b/packages/products/tdesign-vue-next/src/typography/text-props.ts @@ -0,0 +1,51 @@ +/* eslint-disable */ + +/** + * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC + * */ + +import { TdTextProps } from '../typography/type'; +import { PropType } from 'vue'; + +export default { + /** 是否添加代码样式 */ + code: Boolean, + /** 文本内容 */ + content: { + type: [String, Function] as PropType, + }, + /** 文本内容 */ + default: { + type: [String, Function] as PropType, + }, + /** 是否添加删除线样式 */ + delete: Boolean, + /** 是否添加不可用样式 */ + disabled: Boolean, + /** 是否省略展示,可通过配置参数自定义省略操作的具体功能和样式 */ + ellipsis: { + type: [Boolean, Object] as PropType, + default: false as TdTextProps['ellipsis'], + }, + /** 文本是否为斜体 */ + italic: Boolean, + /** 是否添加键盘样式 */ + keyboard: Boolean, + /** 是否添加标记样式,默认为黄色,可通过配置颜色修改标记样式,如#0052D9 */ + mark: { + type: [String, Boolean] as PropType, + default: false as TdTextProps['mark'], + }, + /** 文本是否加粗 */ + strong: Boolean, + /** 主题 */ + theme: { + type: String as PropType, + validator(val: TdTextProps['theme']): boolean { + if (!val) return true; + return ['primary', 'secondary', 'success', 'warning', 'error'].includes(val); + }, + }, + /** 是否添加下划线样式 */ + underline: Boolean, +}; diff --git a/packages/products/tdesign-vue-next/src/typography/title-props.ts b/packages/products/tdesign-vue-next/src/typography/title-props.ts new file mode 100644 index 000000000..4bc0b80e5 --- /dev/null +++ b/packages/products/tdesign-vue-next/src/typography/title-props.ts @@ -0,0 +1,33 @@ +/* eslint-disable */ + +/** + * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC + * */ + +import { TdTitleProps } from '../typography/type'; +import { PropType } from 'vue'; + +export default { + /** 段落内容 */ + content: { + type: [String, Function] as PropType, + }, + /** 标题内容 */ + default: { + type: [String, Function] as PropType, + }, + /** 是否省略展示,可通过配置参数自定义省略操作的具体功能和样式 */ + ellipsis: { + type: [Boolean, Object] as PropType, + default: false as TdTitleProps['ellipsis'], + }, + /** 标题等级 */ + level: { + type: String as PropType, + default: 'h1' as TdTitleProps['level'], + validator(val: TdTitleProps['level']): boolean { + if (!val) return true; + return ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'].includes(val); + }, + }, +}; diff --git a/packages/products/tdesign-vue-next/src/typography/type.ts b/packages/products/tdesign-vue-next/src/typography/type.ts new file mode 100644 index 000000000..6ab812bbe --- /dev/null +++ b/packages/products/tdesign-vue-next/src/typography/type.ts @@ -0,0 +1,160 @@ +/* eslint-disable */ + +/** + * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC + * */ + +import { tooltipProps } from '../tooltip'; +import { TNode } from '../common'; + +export interface TdTextProps { + /** + * 是否添加代码样式 + * @default false + */ + code?: boolean; + /** + * 文本内容 + */ + content?: string | TNode; + /** + * 文本内容 + */ + default?: string | TNode; + /** + * 是否添加删除线样式 + * @default false + */ + delete?: boolean; + /** + * 是否添加不可用样式 + * @default false + */ + disabled?: boolean; + /** + * 是否省略展示,可通过配置参数自定义省略操作的具体功能和样式 + * @default false + */ + ellipsis?: boolean | TypographyEllipsis; + /** + * 文本是否为斜体 + * @default false + */ + italic?: boolean; + /** + * 是否添加键盘样式 + * @default false + */ + keyboard?: boolean; + /** + * 是否添加标记样式,默认为黄色,可通过配置颜色修改标记样式,如#0052D9 + * @default false + */ + mark?: string | boolean; + /** + * 文本是否加粗 + * @default false + */ + strong?: boolean; + /** + * 主题 + */ + theme?: 'primary' | 'secondary' | 'success' | 'warning' | 'error'; + /** + * 是否添加下划线样式 + * @default false + */ + underline?: boolean; +} + +export interface TdTitleProps { + /** + * 段落内容 + */ + content?: string | TNode; + /** + * 标题内容 + */ + default?: string | TNode; + /** + * 是否省略展示,可通过配置参数自定义省略操作的具体功能和样式 + * @default false + */ + ellipsis?: boolean | TypographyEllipsis; + /** + * 标题等级 + * @default h1 + */ + level?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'; +} + +export interface TdParagraphProps { + /** + * 段落内容 + */ + content?: string | TNode; + /** + * 是否可复制,可通过配置参数自定义复制操作的具体功能和样式 + * @default false + */ + copyable?: boolean | TypographyCopyable; + /** + * 段落内容 + */ + default?: string | TNode; + /** + * 是否省略展示,可通过配置参数自定义省略操作的具体功能和样式 + * @default false + */ + ellipsis?: boolean | TypographyEllipsis; +} + +export interface TypographyEllipsis { + /** + * 展开后是否可以重新收起 + * @default true + */ + collapsible?: boolean; + /** + * 是否可展开 + * @default true + */ + expandable?: boolean; + /** + * 省略配置默认展示行数 + * @default 1 + */ + row?: number; + /** + * 自定义省略触发元素,一般用于自定义折叠图标 + */ + suffix?: TNode<{ expanded: boolean }>; + /** + * 光标在省略图标上出现的tooltip的配置 + */ + tooltipProps?: tooltipProps; + /** + * 点击省略按钮的回调 + */ + onExpand?: (expanded: boolean) => void; +} + +export interface TypographyCopyable { + /** + * 复制的文本内容,默认为全部文本 + * @default '' + */ + text?: string; + /** + * 自定义复制触发元素,一般用于自定义复制图标 + */ + suffix?: TNode<{ copied: boolean }>; + /** + * 光标在复制图标上出现的tooltip的配置 + */ + tooltipProps?: tooltipProps; + /** + * 点击复制按钮的回调 + */ + onCopy?: () => void; +} diff --git a/packages/products/tdesign-vue-next/src/typography/typography.en-US.md b/packages/products/tdesign-vue-next/src/typography/typography.en-US.md new file mode 100644 index 000000000..30eb5fa20 --- /dev/null +++ b/packages/products/tdesign-vue-next/src/typography/typography.en-US.md @@ -0,0 +1,67 @@ +:: BASE_DOC :: + +## API +### Text Props + +name | type | default | description | required +-- | -- | -- | -- | -- +code | Boolean | false | add code style | N +content | String / Slot / Function | - | content of text。Typescript:`string \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-vue-next/blob/develop/src/common.ts) | N +default | String / Slot / Function | - | default slot of text。Typescript:`string \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-vue-next/blob/develop/src/common.ts) | N +delete | Boolean | false | add delete line style | N +disabled | Boolean | false | add disabled style | N +ellipsis | Boolean / Object | false | add ellipsis style。Typescript:`boolean \| TypographyEllipsis` | N +italic | Boolean | false | add italic style | N +keyboard | Boolean | false | add keyboard style | N +mark | String / Boolean | false | add mark style | N +strong | Boolean | false | add bold style | N +theme | String | - | theme of text。options: primary/secondary/success/warning/error | N +underline | Boolean | false | add underline style | N + +### Title Props + +name | type | default | description | required +-- | -- | -- | -- | -- +content | String / Slot / Function | - | content of title。Typescript:`string \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-vue-next/blob/develop/src/common.ts) | N +default | String / Slot / Function | - | default slot of title。Typescript:`string \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-vue-next/blob/develop/src/common.ts) | N +ellipsis | Boolean / Object | false | add ellipsis style。Typescript:`boolean \| TypographyEllipsis` | N +level | String | h1 | level of title。options: h1/h2/h3/h4/h5/h6 | N + +### Paragraph Props + +name | type | default | description | required +-- | -- | -- | -- | -- +content | String / Slot / Function | - | content of paragraph。Typescript:`string \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-vue-next/blob/develop/src/common.ts) | N +copyable | Boolean / Object | false | add copyable style。Typescript:`boolean \| TypographyCopyable` | N +default | String / Slot / Function | - | default slot of paragraph。Typescript:`string \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-vue-next/blob/develop/src/common.ts) | N +ellipsis | Boolean / Object | false | add ellipsis style。Typescript:`boolean \| TypographyEllipsis` | N + +### TypographyEllipsis + +name | type | default | description | required +-- | -- | -- | -- | -- +collapsible | Boolean | true | collapsible after expanding | N +expandable | Boolean | true | expandable | N +row | Number | 1 | default row number of ellipsis | N +suffix | Slot / Function | - | custom element configuration for ellipsis and collapse icon。Typescript:`TNode<{ expanded: boolean }>`。[see more ts definition](https://github.com/Tencent/tdesign-vue-next/blob/develop/src/common.ts) | N +tooltipProps | Object | - | Configuration of the tooltip that appears on the ellipsis icon when the cursor is over it.。Typescript:`tooltipProps`,[Tooltip API Documents](./tooltip?tab=api)。[see more ts definition](https://github.com/Tencent/tdesign-vue-next/tree/develop/src/typography/type.ts) | N +onExpand | Function | | Typescript:`(expanded:boolean) => void`
| N +### TypographyEllipsis + +name | params | description +-- | -- | -- +expand | `(expanded:boolean)` | \- + +### TypographyCopyable + +name | type | default | description | required +-- | -- | -- | -- | -- + text | String | - | copied content | N +suffix | Slot / Function | - | custom element configuration for copy icon。Typescript:`TNode<{ copied: boolean }>`。[see more ts definition](https://github.com/Tencent/tdesign-vue-next/blob/develop/src/common.ts) | N +tooltipProps | Object | - | Configuration of the tooltip that appears on the copy icon when the cursor is over it.。Typescript:`tooltipProps`,[Tooltip API Documents](./tooltip?tab=api)。[see more ts definition](https://github.com/Tencent/tdesign-vue-next/tree/develop/src/typography/type.ts) | N +onCopy | Function | | Typescript:`() => void`
| N +### TypographyCopyable + +name | params | description +-- | -- | -- +copy | \- | \- diff --git a/packages/products/tdesign-vue-next/src/typography/typography.md b/packages/products/tdesign-vue-next/src/typography/typography.md new file mode 100644 index 000000000..1c7a51e8f --- /dev/null +++ b/packages/products/tdesign-vue-next/src/typography/typography.md @@ -0,0 +1,67 @@ +:: BASE_DOC :: + +## API +### Text Props + +名称 | 类型 | 默认值 | 说明 | 必传 +-- | -- | -- | -- | -- +code | Boolean | false | 是否添加代码样式 | N +content | String / Slot / Function | - | 文本内容。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-vue-next/blob/develop/src/common.ts) | N +default | String / Slot / Function | - | 文本内容。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-vue-next/blob/develop/src/common.ts) | N +delete | Boolean | false | 是否添加删除线样式 | N +disabled | Boolean | false | 是否添加不可用样式 | N +ellipsis | Boolean / Object | false | 是否省略展示,可通过配置参数自定义省略操作的具体功能和样式。TS 类型:`boolean \| TypographyEllipsis` | N +italic | Boolean | false | 文本是否为斜体 | N +keyboard | Boolean | false | 是否添加键盘样式 | N +mark | String / Boolean | false | 是否添加标记样式,默认为黄色,可通过配置颜色修改标记样式,如#0052D9 | N +strong | Boolean | false | 文本是否加粗 | N +theme | String | - | 主题。可选项:primary/secondary/success/warning/error | N +underline | Boolean | false | 是否添加下划线样式 | N + +### Title Props + +名称 | 类型 | 默认值 | 说明 | 必传 +-- | -- | -- | -- | -- +content | String / Slot / Function | - | 段落内容。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-vue-next/blob/develop/src/common.ts) | N +default | String / Slot / Function | - | 标题内容。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-vue-next/blob/develop/src/common.ts) | N +ellipsis | Boolean / Object | false | 是否省略展示,可通过配置参数自定义省略操作的具体功能和样式。TS 类型:`boolean \| TypographyEllipsis` | N +level | String | h1 | 标题等级。可选项:h1/h2/h3/h4/h5/h6 | N + +### Paragraph Props + +名称 | 类型 | 默认值 | 说明 | 必传 +-- | -- | -- | -- | -- +content | String / Slot / Function | - | 段落内容。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-vue-next/blob/develop/src/common.ts) | N +copyable | Boolean / Object | false | 是否可复制,可通过配置参数自定义复制操作的具体功能和样式。TS 类型:`boolean \| TypographyCopyable` | N +default | String / Slot / Function | - | 段落内容。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-vue-next/blob/develop/src/common.ts) | N +ellipsis | Boolean / Object | false | 是否省略展示,可通过配置参数自定义省略操作的具体功能和样式。TS 类型:`boolean \| TypographyEllipsis` | N + +### TypographyEllipsis + +名称 | 类型 | 默认值 | 说明 | 必传 +-- | -- | -- | -- | -- +collapsible | Boolean | true | 展开后是否可以重新收起 | N +expandable | Boolean | true | 是否可展开 | N +row | Number | 1 | 省略配置默认展示行数 | N +suffix | Slot / Function | - | 自定义省略触发元素,一般用于自定义折叠图标。TS 类型:`TNode<{ expanded: boolean }>`。[通用类型定义](https://github.com/Tencent/tdesign-vue-next/blob/develop/src/common.ts) | N +tooltipProps | Object | - | 光标在省略图标上出现的tooltip的配置。TS 类型:`tooltipProps`,[Tooltip API Documents](./tooltip?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-vue-next/tree/develop/src/typography/type.ts) | N +onExpand | Function | | TS 类型:`(expanded:boolean) => void`
点击省略按钮的回调 | N +### TypographyEllipsis + +名称 | 参数 | 描述 +-- | -- | -- +expand | `(expanded:boolean)` | 点击省略按钮的回调 + +### TypographyCopyable + +名称 | 类型 | 默认值 | 说明 | 必传 +-- | -- | -- | -- | -- + text | String | - | 复制的文本内容,默认为全部文本 | N +suffix | Slot / Function | - | 自定义复制触发元素,一般用于自定义复制图标。TS 类型:`TNode<{ copied: boolean }>`。[通用类型定义](https://github.com/Tencent/tdesign-vue-next/blob/develop/src/common.ts) | N +tooltipProps | Object | - | 光标在复制图标上出现的tooltip的配置。TS 类型:`tooltipProps`,[Tooltip API Documents](./tooltip?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-vue-next/tree/develop/src/typography/type.ts) | N +onCopy | Function | | TS 类型:`() => void`
点击复制按钮的回调 | N +### TypographyCopyable + +名称 | 参数 | 描述 +-- | -- | -- +copy | \- | 点击复制按钮的回调 diff --git a/packages/products/tdesign-vue/src/typography/paragraph-props.ts b/packages/products/tdesign-vue/src/typography/paragraph-props.ts new file mode 100644 index 000000000..3995e23b3 --- /dev/null +++ b/packages/products/tdesign-vue/src/typography/paragraph-props.ts @@ -0,0 +1,29 @@ +/* eslint-disable */ + +/** + * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC + * */ + +import { TdParagraphProps } from '../typography/type'; +import { PropType } from 'vue'; + +export default { + /** 段落内容 */ + content: { + type: [String, Function] as PropType, + }, + /** 是否可复制,可通过配置参数自定义复制操作的具体功能和样式 */ + copyable: { + type: [Boolean, Object] as PropType, + default: false, + }, + /** 段落内容 */ + default: { + type: [String, Function] as PropType, + }, + /** 是否省略展示,可通过配置参数自定义省略操作的具体功能和样式 */ + ellipsis: { + type: [Boolean, Object] as PropType, + default: false, + }, +}; diff --git a/packages/products/tdesign-vue/src/typography/text-props.ts b/packages/products/tdesign-vue/src/typography/text-props.ts new file mode 100644 index 000000000..21b50751f --- /dev/null +++ b/packages/products/tdesign-vue/src/typography/text-props.ts @@ -0,0 +1,51 @@ +/* eslint-disable */ + +/** + * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC + * */ + +import { TdTextProps } from '../typography/type'; +import { PropType } from 'vue'; + +export default { + /** 是否添加代码样式 */ + code: Boolean, + /** 文本内容 */ + content: { + type: [String, Function] as PropType, + }, + /** 文本内容 */ + default: { + type: [String, Function] as PropType, + }, + /** 是否添加删除线样式 */ + delete: Boolean, + /** 是否添加不可用样式 */ + disabled: Boolean, + /** 是否省略展示,可通过配置参数自定义省略操作的具体功能和样式 */ + ellipsis: { + type: [Boolean, Object] as PropType, + default: false, + }, + /** 文本是否为斜体 */ + italic: Boolean, + /** 是否添加键盘样式 */ + keyboard: Boolean, + /** 是否添加标记样式,默认为黄色,可通过配置颜色修改标记样式,如#0052D9 */ + mark: { + type: [String, Boolean] as PropType, + default: false, + }, + /** 文本是否加粗 */ + strong: Boolean, + /** 主题 */ + theme: { + type: String as PropType, + validator(val: TdTextProps['theme']): boolean { + if (!val) return true; + return ['primary', 'secondary', 'success', 'warning', 'error'].includes(val); + }, + }, + /** 是否添加下划线样式 */ + underline: Boolean, +}; diff --git a/packages/products/tdesign-vue/src/typography/title-props.ts b/packages/products/tdesign-vue/src/typography/title-props.ts new file mode 100644 index 000000000..ee7cd4a35 --- /dev/null +++ b/packages/products/tdesign-vue/src/typography/title-props.ts @@ -0,0 +1,33 @@ +/* eslint-disable */ + +/** + * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC + * */ + +import { TdTitleProps } from '../typography/type'; +import { PropType } from 'vue'; + +export default { + /** 段落内容 */ + content: { + type: [String, Function] as PropType, + }, + /** 标题内容 */ + default: { + type: [String, Function] as PropType, + }, + /** 是否省略展示,可通过配置参数自定义省略操作的具体功能和样式 */ + ellipsis: { + type: [Boolean, Object] as PropType, + default: false, + }, + /** 标题等级 */ + level: { + type: String as PropType, + default: 'h1' as TdTitleProps['level'], + validator(val: TdTitleProps['level']): boolean { + if (!val) return true; + return ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'].includes(val); + }, + }, +}; diff --git a/packages/products/tdesign-vue/src/typography/type.ts b/packages/products/tdesign-vue/src/typography/type.ts new file mode 100644 index 000000000..6ab812bbe --- /dev/null +++ b/packages/products/tdesign-vue/src/typography/type.ts @@ -0,0 +1,160 @@ +/* eslint-disable */ + +/** + * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC + * */ + +import { tooltipProps } from '../tooltip'; +import { TNode } from '../common'; + +export interface TdTextProps { + /** + * 是否添加代码样式 + * @default false + */ + code?: boolean; + /** + * 文本内容 + */ + content?: string | TNode; + /** + * 文本内容 + */ + default?: string | TNode; + /** + * 是否添加删除线样式 + * @default false + */ + delete?: boolean; + /** + * 是否添加不可用样式 + * @default false + */ + disabled?: boolean; + /** + * 是否省略展示,可通过配置参数自定义省略操作的具体功能和样式 + * @default false + */ + ellipsis?: boolean | TypographyEllipsis; + /** + * 文本是否为斜体 + * @default false + */ + italic?: boolean; + /** + * 是否添加键盘样式 + * @default false + */ + keyboard?: boolean; + /** + * 是否添加标记样式,默认为黄色,可通过配置颜色修改标记样式,如#0052D9 + * @default false + */ + mark?: string | boolean; + /** + * 文本是否加粗 + * @default false + */ + strong?: boolean; + /** + * 主题 + */ + theme?: 'primary' | 'secondary' | 'success' | 'warning' | 'error'; + /** + * 是否添加下划线样式 + * @default false + */ + underline?: boolean; +} + +export interface TdTitleProps { + /** + * 段落内容 + */ + content?: string | TNode; + /** + * 标题内容 + */ + default?: string | TNode; + /** + * 是否省略展示,可通过配置参数自定义省略操作的具体功能和样式 + * @default false + */ + ellipsis?: boolean | TypographyEllipsis; + /** + * 标题等级 + * @default h1 + */ + level?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'; +} + +export interface TdParagraphProps { + /** + * 段落内容 + */ + content?: string | TNode; + /** + * 是否可复制,可通过配置参数自定义复制操作的具体功能和样式 + * @default false + */ + copyable?: boolean | TypographyCopyable; + /** + * 段落内容 + */ + default?: string | TNode; + /** + * 是否省略展示,可通过配置参数自定义省略操作的具体功能和样式 + * @default false + */ + ellipsis?: boolean | TypographyEllipsis; +} + +export interface TypographyEllipsis { + /** + * 展开后是否可以重新收起 + * @default true + */ + collapsible?: boolean; + /** + * 是否可展开 + * @default true + */ + expandable?: boolean; + /** + * 省略配置默认展示行数 + * @default 1 + */ + row?: number; + /** + * 自定义省略触发元素,一般用于自定义折叠图标 + */ + suffix?: TNode<{ expanded: boolean }>; + /** + * 光标在省略图标上出现的tooltip的配置 + */ + tooltipProps?: tooltipProps; + /** + * 点击省略按钮的回调 + */ + onExpand?: (expanded: boolean) => void; +} + +export interface TypographyCopyable { + /** + * 复制的文本内容,默认为全部文本 + * @default '' + */ + text?: string; + /** + * 自定义复制触发元素,一般用于自定义复制图标 + */ + suffix?: TNode<{ copied: boolean }>; + /** + * 光标在复制图标上出现的tooltip的配置 + */ + tooltipProps?: tooltipProps; + /** + * 点击复制按钮的回调 + */ + onCopy?: () => void; +} diff --git a/packages/products/tdesign-vue/src/typography/typography.en-US.md b/packages/products/tdesign-vue/src/typography/typography.en-US.md new file mode 100644 index 000000000..7748d1f06 --- /dev/null +++ b/packages/products/tdesign-vue/src/typography/typography.en-US.md @@ -0,0 +1,67 @@ +:: BASE_DOC :: + +## API +### Text Props + +name | type | default | description | required +-- | -- | -- | -- | -- +code | Boolean | false | add code style | N +content | String / Slot / Function | - | content of text。Typescript:`string \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N +default | String / Slot / Function | - | default slot of text。Typescript:`string \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N +delete | Boolean | false | add delete line style | N +disabled | Boolean | false | add disabled style | N +ellipsis | Boolean / Object | false | add ellipsis style。Typescript:`boolean \| TypographyEllipsis` | N +italic | Boolean | false | add italic style | N +keyboard | Boolean | false | add keyboard style | N +mark | String / Boolean | false | add mark style | N +strong | Boolean | false | add bold style | N +theme | String | - | theme of text。options: primary/secondary/success/warning/error | N +underline | Boolean | false | add underline style | N + +### Title Props + +name | type | default | description | required +-- | -- | -- | -- | -- +content | String / Slot / Function | - | content of title。Typescript:`string \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N +default | String / Slot / Function | - | default slot of title。Typescript:`string \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N +ellipsis | Boolean / Object | false | add ellipsis style。Typescript:`boolean \| TypographyEllipsis` | N +level | String | h1 | level of title。options: h1/h2/h3/h4/h5/h6 | N + +### Paragraph Props + +name | type | default | description | required +-- | -- | -- | -- | -- +content | String / Slot / Function | - | content of paragraph。Typescript:`string \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N +copyable | Boolean / Object | false | add copyable style。Typescript:`boolean \| TypographyCopyable` | N +default | String / Slot / Function | - | default slot of paragraph。Typescript:`string \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N +ellipsis | Boolean / Object | false | add ellipsis style。Typescript:`boolean \| TypographyEllipsis` | N + +### TypographyEllipsis + +name | type | default | description | required +-- | -- | -- | -- | -- +collapsible | Boolean | true | collapsible after expanding | N +expandable | Boolean | true | expandable | N +row | Number | 1 | default row number of ellipsis | N +suffix | Slot / Function | - | custom element configuration for ellipsis and collapse icon。Typescript:`TNode<{ expanded: boolean }>`。[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N +tooltipProps | Object | - | Configuration of the tooltip that appears on the ellipsis icon when the cursor is over it.。Typescript:`tooltipProps`,[Tooltip API Documents](./tooltip?tab=api)。[see more ts definition](https://github.com/Tencent/tdesign-vue/tree/develop/src/typography/type.ts) | N +onExpand | Function | | Typescript:`(expanded:boolean) => void`
| N +### TypographyEllipsis + +name | params | description +-- | -- | -- +expand | `(expanded:boolean)` | \- + +### TypographyCopyable + +name | type | default | description | required +-- | -- | -- | -- | -- + text | String | - | copied content | N +suffix | Slot / Function | - | custom element configuration for copy icon。Typescript:`TNode<{ copied: boolean }>`。[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N +tooltipProps | Object | - | Configuration of the tooltip that appears on the copy icon when the cursor is over it.。Typescript:`tooltipProps`,[Tooltip API Documents](./tooltip?tab=api)。[see more ts definition](https://github.com/Tencent/tdesign-vue/tree/develop/src/typography/type.ts) | N +onCopy | Function | | Typescript:`() => void`
| N +### TypographyCopyable + +name | params | description +-- | -- | -- +copy | \- | \- diff --git a/packages/products/tdesign-vue/src/typography/typography.md b/packages/products/tdesign-vue/src/typography/typography.md new file mode 100644 index 000000000..8659ad6c0 --- /dev/null +++ b/packages/products/tdesign-vue/src/typography/typography.md @@ -0,0 +1,67 @@ +:: BASE_DOC :: + +## API +### Text Props + +名称 | 类型 | 默认值 | 说明 | 必传 +-- | -- | -- | -- | -- +code | Boolean | false | 是否添加代码样式 | N +content | String / Slot / Function | - | 文本内容。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N +default | String / Slot / Function | - | 文本内容。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N +delete | Boolean | false | 是否添加删除线样式 | N +disabled | Boolean | false | 是否添加不可用样式 | N +ellipsis | Boolean / Object | false | 是否省略展示,可通过配置参数自定义省略操作的具体功能和样式。TS 类型:`boolean \| TypographyEllipsis` | N +italic | Boolean | false | 文本是否为斜体 | N +keyboard | Boolean | false | 是否添加键盘样式 | N +mark | String / Boolean | false | 是否添加标记样式,默认为黄色,可通过配置颜色修改标记样式,如#0052D9 | N +strong | Boolean | false | 文本是否加粗 | N +theme | String | - | 主题。可选项:primary/secondary/success/warning/error | N +underline | Boolean | false | 是否添加下划线样式 | N + +### Title Props + +名称 | 类型 | 默认值 | 说明 | 必传 +-- | -- | -- | -- | -- +content | String / Slot / Function | - | 段落内容。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N +default | String / Slot / Function | - | 标题内容。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N +ellipsis | Boolean / Object | false | 是否省略展示,可通过配置参数自定义省略操作的具体功能和样式。TS 类型:`boolean \| TypographyEllipsis` | N +level | String | h1 | 标题等级。可选项:h1/h2/h3/h4/h5/h6 | N + +### Paragraph Props + +名称 | 类型 | 默认值 | 说明 | 必传 +-- | -- | -- | -- | -- +content | String / Slot / Function | - | 段落内容。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N +copyable | Boolean / Object | false | 是否可复制,可通过配置参数自定义复制操作的具体功能和样式。TS 类型:`boolean \| TypographyCopyable` | N +default | String / Slot / Function | - | 段落内容。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N +ellipsis | Boolean / Object | false | 是否省略展示,可通过配置参数自定义省略操作的具体功能和样式。TS 类型:`boolean \| TypographyEllipsis` | N + +### TypographyEllipsis + +名称 | 类型 | 默认值 | 说明 | 必传 +-- | -- | -- | -- | -- +collapsible | Boolean | true | 展开后是否可以重新收起 | N +expandable | Boolean | true | 是否可展开 | N +row | Number | 1 | 省略配置默认展示行数 | N +suffix | Slot / Function | - | 自定义省略触发元素,一般用于自定义折叠图标。TS 类型:`TNode<{ expanded: boolean }>`。[通用类型定义](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N +tooltipProps | Object | - | 光标在省略图标上出现的tooltip的配置。TS 类型:`tooltipProps`,[Tooltip API Documents](./tooltip?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-vue/tree/develop/src/typography/type.ts) | N +onExpand | Function | | TS 类型:`(expanded:boolean) => void`
点击省略按钮的回调 | N +### TypographyEllipsis + +名称 | 参数 | 描述 +-- | -- | -- +expand | `(expanded:boolean)` | 点击省略按钮的回调 + +### TypographyCopyable + +名称 | 类型 | 默认值 | 说明 | 必传 +-- | -- | -- | -- | -- + text | String | - | 复制的文本内容,默认为全部文本 | N +suffix | Slot / Function | - | 自定义复制触发元素,一般用于自定义复制图标。TS 类型:`TNode<{ copied: boolean }>`。[通用类型定义](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N +tooltipProps | Object | - | 光标在复制图标上出现的tooltip的配置。TS 类型:`tooltipProps`,[Tooltip API Documents](./tooltip?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-vue/tree/develop/src/typography/type.ts) | N +onCopy | Function | | TS 类型:`() => void`
点击复制按钮的回调 | N +### TypographyCopyable + +名称 | 参数 | 描述 +-- | -- | -- +copy | \- | 点击复制按钮的回调 diff --git a/packages/scripts/api.json b/packages/scripts/api.json index dc5df365a..ed1a1df7d 100644 --- a/packages/scripts/api.json +++ b/packages/scripts/api.json @@ -67938,6 +67938,213 @@ "Boolean" ] }, + { + "id": 1706635398, + "platform_framework": [ + "2" + ], + "component": "Paragraph", + "field_category": 1, + "field_name": "children", + "field_type": [ + "1", + "64" + ], + "field_default_value": "", + "field_enum": "", + "field_desc_zh": "段落内容,同 content", + "field_desc_en": "children of paragraph", + "field_required": 0, + "event_input": "", + "create_time": "2024-01-30 17:23:18", + "update_time": "2024-01-30 17:23:18", + "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(PC)" + ], + "field_type_text": [ + "String", + "TNode" + ] + }, + { + "id": 1706635275, + "platform_framework": [ + "1", + "2", + "4" + ], + "component": "Paragraph", + "field_category": 1, + "field_name": "content", + "field_type": [ + "1", + "64" + ], + "field_default_value": "", + "field_enum": "", + "field_desc_zh": "段落内容", + "field_desc_en": "content of paragraph", + "field_required": 0, + "event_input": "", + "create_time": "2024-01-30 17:21:15", + "update_time": "2024-01-30 17:21:15", + "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(PC)", + "React(PC)", + "Angular(PC)" + ], + "field_type_text": [ + "String", + "TNode" + ] + }, + { + "id": 1706638324, + "platform_framework": [ + "1", + "2", + "4" + ], + "component": "Paragraph", + "field_category": 1, + "field_name": "copyable", + "field_type": [ + "4", + "8" + ], + "field_default_value": "false", + "field_enum": "", + "field_desc_zh": "是否可复制,可通过配置参数自定义复制操作的具体功能和样式", + "field_desc_en": "add copyable style", + "field_required": 0, + "event_input": "", + "create_time": "2024-01-30 18:12:04", + "update_time": "2024-01-30 18:12:04", + "event_output": null, + "custom_field_type": "boolean | TypographyCopyable", + "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(PC)", + "React(PC)", + "Angular(PC)" + ], + "field_type_text": [ + "Boolean", + "Object" + ] + }, + { + "id": 1706635334, + "platform_framework": [ + "1" + ], + "component": "Paragraph", + "field_category": 1, + "field_name": "default", + "field_type": [ + "1", + "64" + ], + "field_default_value": "", + "field_enum": "", + "field_desc_zh": "段落内容", + "field_desc_en": "default slot of paragraph", + "field_required": 0, + "event_input": "", + "create_time": "2024-01-30 17:22:14", + "update_time": "2024-01-30 17:22:14", + "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(PC)" + ], + "field_type_text": [ + "String", + "TNode" + ] + }, + { + "id": 1706638282, + "platform_framework": [ + "1", + "2", + "4" + ], + "component": "Paragraph", + "field_category": 1, + "field_name": "ellipsis", + "field_type": [ + "4", + "8" + ], + "field_default_value": "false", + "field_enum": "", + "field_desc_zh": "是否省略展示,可通过配置参数自定义省略操作的具体功能和样式", + "field_desc_en": "add ellipsis style", + "field_required": 0, + "event_input": "", + "create_time": "2024-01-30 18:11:22", + "update_time": "2024-01-30 18:11:22", + "event_output": null, + "custom_field_type": "boolean | TypographyEllipsis", + "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(PC)", + "React(PC)", + "Angular(PC)" + ], + "field_type_text": [ + "Boolean", + "Object" + ] + }, { "id": 2834, "platform_framework": [ @@ -102845,6 +103052,537 @@ ], "field_type_text": [] }, + { + "id": 1706635543, + "platform_framework": [ + "2" + ], + "component": "Text", + "field_category": 1, + "field_name": "children", + "field_type": [ + "1", + "64" + ], + "field_default_value": "", + "field_enum": "", + "field_desc_zh": "文本内容,同content", + "field_desc_en": "children of text", + "field_required": 0, + "event_input": "", + "create_time": "2024-01-30 17:25:43", + "update_time": "2024-01-30 17:25:43", + "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(PC)" + ], + "field_type_text": [ + "String", + "TNode" + ] + }, + { + "id": 1706635187, + "platform_framework": [ + "1", + "2", + "4" + ], + "component": "Text", + "field_category": 1, + "field_name": "code", + "field_type": [ + "4" + ], + "field_default_value": "false", + "field_enum": "", + "field_desc_zh": "是否添加代码样式", + "field_desc_en": "add code style", + "field_required": 0, + "event_input": "", + "create_time": "2024-01-30 17:19:47", + "update_time": "2024-01-30 17:19:47", + "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(PC)", + "React(PC)", + "Angular(PC)" + ], + "field_type_text": [ + "Boolean" + ] + }, + { + "id": 1706635518, + "platform_framework": [ + "1" + ], + "component": "Text", + "field_category": 1, + "field_name": "content", + "field_type": [ + "1", + "64" + ], + "field_default_value": "", + "field_enum": "", + "field_desc_zh": "文本内容", + "field_desc_en": "content of text", + "field_required": 0, + "event_input": "", + "create_time": "2024-01-30 17:25:18", + "update_time": "2024-01-30 17:25:18", + "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(PC)" + ], + "field_type_text": [ + "String", + "TNode" + ] + }, + { + "id": 1706635501, + "platform_framework": [ + "1" + ], + "component": "Text", + "field_category": 1, + "field_name": "default", + "field_type": [ + "1", + "64" + ], + "field_default_value": "", + "field_enum": "", + "field_desc_zh": "文本内容", + "field_desc_en": "default slot of text", + "field_required": 0, + "event_input": "", + "create_time": "2024-01-30 17:25:01", + "update_time": "2024-01-30 17:25:01", + "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(PC)" + ], + "field_type_text": [ + "String", + "TNode" + ] + }, + { + "id": 1706635746, + "platform_framework": [ + "1", + "2", + "4" + ], + "component": "Text", + "field_category": 1, + "field_name": "delete", + "field_type": [ + "4" + ], + "field_default_value": "false", + "field_enum": "", + "field_desc_zh": "是否添加删除线样式", + "field_desc_en": "add delete line style", + "field_required": 0, + "event_input": "", + "create_time": "2024-01-30 17:29:06", + "update_time": "2024-01-30 17:29:06", + "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(PC)", + "React(PC)", + "Angular(PC)" + ], + "field_type_text": [ + "Boolean" + ] + }, + { + "id": 1706635833, + "platform_framework": [ + "1", + "2", + "4" + ], + "component": "Text", + "field_category": 1, + "field_name": "disabled", + "field_type": [ + "4" + ], + "field_default_value": "false", + "field_enum": "", + "field_desc_zh": "是否添加不可用样式", + "field_desc_en": "add disabled style", + "field_required": 0, + "event_input": "", + "create_time": "2024-01-30 17:30:33", + "update_time": "2024-01-30 17:30:33", + "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(PC)", + "React(PC)", + "Angular(PC)" + ], + "field_type_text": [ + "Boolean" + ] + }, + { + "id": 1706636550, + "platform_framework": [ + "1", + "2", + "4" + ], + "component": "Text", + "field_category": 1, + "field_name": "ellipsis", + "field_type": [ + "4", + "8" + ], + "field_default_value": "false", + "field_enum": "", + "field_desc_zh": "是否省略展示,可通过配置参数自定义省略操作的具体功能和样式", + "field_desc_en": "add ellipsis style", + "field_required": 0, + "event_input": "", + "create_time": "2024-01-30 17:42:30", + "update_time": "2024-01-30 17:42:30", + "event_output": null, + "custom_field_type": "boolean | TypographyEllipsis", + "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(PC)", + "React(PC)", + "Angular(PC)" + ], + "field_type_text": [ + "Boolean", + "Object" + ] + }, + { + "id": 1706635810, + "platform_framework": [ + "1", + "2", + "4" + ], + "component": "Text", + "field_category": 1, + "field_name": "italic", + "field_type": [ + "4" + ], + "field_default_value": "false", + "field_enum": "", + "field_desc_zh": "文本是否为斜体", + "field_desc_en": "add italic style", + "field_required": 0, + "event_input": "", + "create_time": "2024-01-30 17:30:10", + "update_time": "2024-01-30 17:30:10", + "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(PC)", + "React(PC)", + "Angular(PC)" + ], + "field_type_text": [ + "Boolean" + ] + }, + { + "id": 1706635845, + "platform_framework": [ + "1", + "2", + "4" + ], + "component": "Text", + "field_category": 1, + "field_name": "keyboard", + "field_type": [ + "4" + ], + "field_default_value": "false", + "field_enum": "", + "field_desc_zh": "是否添加键盘样式", + "field_desc_en": "add keyboard style", + "field_required": 0, + "event_input": "", + "create_time": "2024-01-30 17:30:45", + "update_time": "2024-01-30 17:30:45", + "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(PC)", + "React(PC)", + "Angular(PC)" + ], + "field_type_text": [ + "Boolean" + ] + }, + { + "id": 1706635902, + "platform_framework": [ + "1", + "2", + "4" + ], + "component": "Text", + "field_category": 1, + "field_name": "mark", + "field_type": [ + "1", + "4" + ], + "field_default_value": "false", + "field_enum": "", + "field_desc_zh": "是否添加标记样式,默认为黄色,可通过配置颜色修改标记样式,如#0052D9", + "field_desc_en": "add mark style", + "field_required": 0, + "event_input": "", + "create_time": "2024-01-30 17:31:42", + "update_time": "2024-01-30 17:31:42", + "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(PC)", + "React(PC)", + "Angular(PC)" + ], + "field_type_text": [ + "String", + "Boolean" + ] + }, + { + "id": 1706635791, + "platform_framework": [ + "1", + "2", + "4" + ], + "component": "Text", + "field_category": 1, + "field_name": "strong", + "field_type": [ + "4" + ], + "field_default_value": "false", + "field_enum": "", + "field_desc_zh": "文本是否加粗", + "field_desc_en": "add bold style", + "field_required": 0, + "event_input": "", + "create_time": "2024-01-30 17:29:51", + "update_time": "2024-01-30 17:29: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": [ + "Vue(PC)", + "React(PC)", + "Angular(PC)" + ], + "field_type_text": [ + "Boolean" + ] + }, + { + "id": 1706635970, + "platform_framework": [ + "1", + "2", + "4" + ], + "component": "Text", + "field_category": 1, + "field_name": "theme", + "field_type": [ + "1" + ], + "field_default_value": "", + "field_enum": "primary/secondary/success/warning/error", + "field_desc_zh": "主题", + "field_desc_en": "theme of text", + "field_required": 0, + "event_input": "", + "create_time": "2024-01-30 17:32:50", + "update_time": "2024-01-30 17:32:50", + "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(PC)", + "React(PC)", + "Angular(PC)" + ], + "field_type_text": [ + "String" + ] + }, + { + "id": 1706635764, + "platform_framework": [ + "1", + "2", + "4" + ], + "component": "Text", + "field_category": 1, + "field_name": "underline", + "field_type": [ + "4" + ], + "field_default_value": "false", + "field_enum": "", + "field_desc_zh": "是否添加下划线样式", + "field_desc_en": "add underline style", + "field_required": 0, + "event_input": "", + "create_time": "2024-01-30 17:29:24", + "update_time": "2024-01-30 17:29: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(PC)", + "React(PC)", + "Angular(PC)" + ], + "field_type_text": [ + "Boolean" + ] + }, { "id": 1719, "platform_framework": [ @@ -107053,6 +107791,211 @@ ], "field_type_text": [] }, + { + "id": 1706635433, + "platform_framework": [ + "2" + ], + "component": "Title", + "field_category": 1, + "field_name": "children", + "field_type": [ + "1", + "64" + ], + "field_default_value": "", + "field_enum": "", + "field_desc_zh": "段落内容,同 content", + "field_desc_en": "children of title", + "field_required": 0, + "event_input": "", + "create_time": "2024-01-30 17:23:53", + "update_time": "2024-01-30 17:23:53", + "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(PC)" + ], + "field_type_text": [ + "String", + "TNode" + ] + }, + { + "id": 1706635466, + "platform_framework": [ + "1", + "2", + "4" + ], + "component": "Title", + "field_category": 1, + "field_name": "content", + "field_type": [ + "1", + "64" + ], + "field_default_value": "", + "field_enum": "", + "field_desc_zh": "段落内容", + "field_desc_en": "content of title", + "field_required": 0, + "event_input": "", + "create_time": "2024-01-30 17:24:26", + "update_time": "2024-01-30 17:24:26", + "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(PC)", + "React(PC)", + "Angular(PC)" + ], + "field_type_text": [ + "String", + "TNode" + ] + }, + { + "id": 1706635482, + "platform_framework": [ + "1" + ], + "component": "Title", + "field_category": 1, + "field_name": "default", + "field_type": [ + "1", + "64" + ], + "field_default_value": "", + "field_enum": "", + "field_desc_zh": "标题内容", + "field_desc_en": "default slot of title", + "field_required": 0, + "event_input": "", + "create_time": "2024-01-30 17:24:42", + "update_time": "2024-01-30 17:24:42", + "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(PC)" + ], + "field_type_text": [ + "String", + "TNode" + ] + }, + { + "id": 1706638273, + "platform_framework": [ + "1", + "2", + "4" + ], + "component": "Title", + "field_category": 1, + "field_name": "ellipsis", + "field_type": [ + "4", + "8" + ], + "field_default_value": "false", + "field_enum": "", + "field_desc_zh": "是否省略展示,可通过配置参数自定义省略操作的具体功能和样式", + "field_desc_en": "add ellipsis style", + "field_required": 0, + "event_input": "", + "create_time": "2024-01-30 18:11:13", + "update_time": "2024-01-30 18:11:13", + "event_output": null, + "custom_field_type": "boolean | TypographyEllipsis", + "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(PC)", + "React(PC)", + "Angular(PC)" + ], + "field_type_text": [ + "Boolean", + "Object" + ] + }, + { + "id": 1706635230, + "platform_framework": [ + "1", + "2", + "4" + ], + "component": "Title", + "field_category": 1, + "field_name": "level", + "field_type": [ + "1" + ], + "field_default_value": "h1", + "field_enum": "h1/h2/h3/h4/h5/h6", + "field_desc_zh": "标题等级", + "field_desc_en": "level of title", + "field_required": 0, + "event_input": "", + "create_time": "2024-01-30 17:20:30", + "update_time": "2024-01-30 17:20:30", + "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(PC)", + "React(PC)", + "Angular(PC)" + ], + "field_type_text": [ + "String" + ] + }, { "id": 1352, "platform_framework": [ @@ -116283,6 +117226,408 @@ "String" ] }, + { + "id": 1706638036, + "platform_framework": [ + "1", + "2", + "4" + ], + "component": "TypographyCopyable", + "field_category": 1, + "field_name": " text", + "field_type": [ + "1" + ], + "field_default_value": "", + "field_enum": "", + "field_desc_zh": "复制的文本内容,默认为全部文本", + "field_desc_en": "copied content", + "field_required": 0, + "event_input": "", + "create_time": "2024-01-30 18:07:16", + "update_time": "2024-01-30 18:07:16", + "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(PC)", + "React(PC)", + "Angular(PC)" + ], + "field_type_text": [ + "String" + ] + }, + { + "id": 1706638088, + "platform_framework": [ + "1", + "2", + "4" + ], + "component": "TypographyCopyable", + "field_category": 1, + "field_name": "suffix", + "field_type": [ + "64" + ], + "field_default_value": "", + "field_enum": "", + "field_desc_zh": "自定义复制触发元素,一般用于自定义复制图标", + "field_desc_en": "custom element configuration for copy icon", + "field_required": 0, + "event_input": "", + "create_time": "2024-01-30 18:08:08", + "update_time": "2024-01-30 18:08:08", + "event_output": null, + "custom_field_type": "TNode<{ copied: boolean }>", + "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(PC)", + "React(PC)", + "Angular(PC)" + ], + "field_type_text": [ + "TNode" + ] + }, + { + "id": 1706638172, + "platform_framework": [ + "1", + "2", + "4" + ], + "component": "TypographyCopyable", + "field_category": 1, + "field_name": "tooltipProps", + "field_type": [ + "8" + ], + "field_default_value": "", + "field_enum": "", + "field_desc_zh": "光标在复制图标上出现的tooltip的配置", + "field_desc_en": "Configuration of the tooltip that appears on the copy icon when the cursor is over it.", + "field_required": 0, + "event_input": "", + "create_time": "2024-01-30 18:09:32", + "update_time": "2024-01-30 18:09:32", + "event_output": null, + "custom_field_type": "tooltipProps【import { tooltipProps } from '@Tooltip'】", + "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(PC)", + "React(PC)", + "Angular(PC)" + ], + "field_type_text": [ + "Object" + ] + }, + { + "id": 1706638129, + "platform_framework": [ + "1", + "2", + "4" + ], + "component": "TypographyCopyable", + "field_category": 2, + "field_name": "copy", + "field_type": [], + "field_default_value": "", + "field_enum": "", + "field_desc_zh": "点击复制按钮的回调", + "field_desc_en": null, + "field_required": 0, + "event_input": "", + "create_time": "2024-01-30 18:08:49", + "update_time": "2024-01-30 18:08:49", + "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": "Events", + "platform_framework_text": [ + "Vue(PC)", + "React(PC)", + "Angular(PC)" + ], + "field_type_text": [] + }, + { + "id": 1706637229, + "platform_framework": [ + "1", + "2", + "4" + ], + "component": "TypographyEllipsis", + "field_category": 1, + "field_name": "collapsible", + "field_type": [ + "4" + ], + "field_default_value": "true", + "field_enum": "", + "field_desc_zh": "展开后是否可以重新收起", + "field_desc_en": "collapsible after expanding", + "field_required": 0, + "event_input": "", + "create_time": "2024-01-30 17:53:49", + "update_time": "2024-01-30 17:53:49", + "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(PC)", + "React(PC)", + "Angular(PC)" + ], + "field_type_text": [ + "Boolean" + ] + }, + { + "id": 1706637150, + "platform_framework": [ + "1", + "2", + "4" + ], + "component": "TypographyEllipsis", + "field_category": 1, + "field_name": "expandable", + "field_type": [ + "4" + ], + "field_default_value": "true", + "field_enum": "", + "field_desc_zh": "是否可展开", + "field_desc_en": "expandable", + "field_required": 0, + "event_input": "", + "create_time": "2024-01-30 17:52:30", + "update_time": "2024-01-30 17:52:30", + "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(PC)", + "React(PC)", + "Angular(PC)" + ], + "field_type_text": [ + "Boolean" + ] + }, + { + "id": 1706637000, + "platform_framework": [ + "1", + "2", + "4" + ], + "component": "TypographyEllipsis", + "field_category": 1, + "field_name": "row", + "field_type": [ + "2" + ], + "field_default_value": "1", + "field_enum": "", + "field_desc_zh": "省略配置默认展示行数", + "field_desc_en": "default row number of ellipsis ", + "field_required": 0, + "event_input": "", + "create_time": "2024-01-30 17:50:00", + "update_time": "2024-01-30 17:50: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": [ + "Vue(PC)", + "React(PC)", + "Angular(PC)" + ], + "field_type_text": [ + "Number" + ] + }, + { + "id": 1706637830, + "platform_framework": [ + "1", + "2", + "4" + ], + "component": "TypographyEllipsis", + "field_category": 1, + "field_name": "suffix", + "field_type": [ + "64" + ], + "field_default_value": "", + "field_enum": "", + "field_desc_zh": "自定义省略触发元素,一般用于自定义折叠图标", + "field_desc_en": "custom element configuration for ellipsis and collapse icon", + "field_required": 0, + "event_input": "", + "create_time": "2024-01-30 18:03:50", + "update_time": "2024-01-30 18:03:50", + "event_output": null, + "custom_field_type": "TNode<{ expanded: boolean }>", + "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(PC)", + "React(PC)", + "Angular(PC)" + ], + "field_type_text": [ + "TNode" + ] + }, + { + "id": 1706637302, + "platform_framework": [ + "1", + "2", + "4" + ], + "component": "TypographyEllipsis", + "field_category": 1, + "field_name": "tooltipProps", + "field_type": [ + "8" + ], + "field_default_value": "", + "field_enum": "", + "field_desc_zh": "光标在省略图标上出现的tooltip的配置", + "field_desc_en": "Configuration of the tooltip that appears on the ellipsis icon when the cursor is over it.", + "field_required": 0, + "event_input": "", + "create_time": "2024-01-30 17:55:02", + "update_time": "2024-01-30 17:55:02", + "event_output": null, + "custom_field_type": "tooltipProps【import { tooltipProps } from '@Tooltip'】", + "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(PC)", + "React(PC)", + "Angular(PC)" + ], + "field_type_text": [ + "Object" + ] + }, + { + "id": 1706637464, + "platform_framework": [ + "1", + "2", + "4" + ], + "component": "TypographyEllipsis", + "field_category": 2, + "field_name": "expand", + "field_type": [], + "field_default_value": "", + "field_enum": "", + "field_desc_zh": "点击省略按钮的回调", + "field_desc_en": null, + "field_required": 0, + "event_input": "(expanded:boolean)", + "create_time": "2024-01-30 17:57:44", + "update_time": "2024-01-30 17:57:44", + "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": "Events", + "platform_framework_text": [ + "Vue(PC)", + "React(PC)", + "Angular(PC)" + ], + "field_type_text": [] + }, { "id": 2995, "platform_framework": [ diff --git a/packages/scripts/config/files-combine.js b/packages/scripts/config/files-combine.js index 4f1222288..d6bc6f55a 100644 --- a/packages/scripts/config/files-combine.js +++ b/packages/scripts/config/files-combine.js @@ -129,7 +129,8 @@ const COMPONENT_API_MD_MAP = { list: ['Indexes', 'IndexesAnchor'], excludes: ['Miniprogram'] }, - Popup: ['Popup','$Popup'] + Popup: ['Popup','$Popup'], + Typography: ['Text', 'Title', 'Paragraph', 'TypographyEllipsis', 'TypographyCopyable'], }; // 输出 TS 类型文件时,哪些需要文件需要合并输出,数据内容为组件/插件名称 @@ -292,6 +293,9 @@ const TYPES_COMBINE_MAP = { list: ['Indexes', 'IndexesAnchor'], excludes: ['Miniprogram'] }, + Typography: { + list: ['Typography','Text', 'Title','Paragraph','TypographyEllipsis','TypographyCopyable'], + } }; exports.GLOBAL_COMPONENTS_CONFIG = GLOBAL_COMPONENTS_CONFIG; diff --git a/packages/scripts/map.json b/packages/scripts/map.json index a29c732fe..208a8e6b7 100644 --- a/packages/scripts/map.json +++ b/packages/scripts/map.json @@ -710,6 +710,10 @@ "label": "分页全局配置", "type": "TS" }, + { + "value": "Paragraph", + "label": "段落" + }, { "value": "Popconfirm", "label": "气泡确认框" @@ -904,6 +908,10 @@ "value": "TagInput", "label": "标签输入框" }, + { + "value": "Text", + "label": "文本" + }, { "value": "Timeline", "label": "时间轴" @@ -933,6 +941,10 @@ "value": "TimeRangePickerPanel", "label": "时间范围选择器面板" }, + { + "value": "Title", + "label": "标题" + }, { "value": "Tooltip", "label": "文字提示" @@ -987,6 +999,16 @@ "value": "Typography", "label": "排版" }, + { + "value": "TypographyCopyable", + "label": "排版复制配置", + "type": "TS" + }, + { + "value": "TypographyEllipsis", + "label": "排版省略配置", + "type": "TS" + }, { "value": "Upload", "label": "上传" diff --git a/packages/server/controllers/ComponentApi/const.ts b/packages/server/controllers/ComponentApi/const.ts index 4d8b88419..e4622685e 100644 --- a/packages/server/controllers/ComponentApi/const.ts +++ b/packages/server/controllers/ComponentApi/const.ts @@ -64,7 +64,7 @@ export const FIELD_TYPE_MAP: MapOptions = { [FUNCTION]: "Function", [TNODE]: "TNode", [Date]: "Date", - [FILE]: 'File', + [FILE]: "File", }; export const PLATFORM_FRAMEWORK: MapOptions = { @@ -239,6 +239,8 @@ export const COMPONENTS_PC: Array = [ { value: "AvatarGroup", label: "头像组" }, { value: "Carousel", label: "走马灯" }, { value: "Typography", label: "排版" }, + { value: "TypographyEllipsis", label: "排版省略配置", type: "TS" }, + { value: "TypographyCopyable", label: "排版复制配置", type: "TS" }, { value: "Space", label: "间距" }, { value: "Swiper", label: "轮播" }, { value: "SwiperItem", label: "轮播项" }, @@ -264,6 +266,10 @@ export const COMPONENTS_PC: Array = [ { value: "Result", label: "结果" }, { value: "Skeleton", label: "骨架屏" }, { value: "Watermark", label: "水印" }, + { value: "Typography", label: "排版" }, + { value: "Text", label: "文本" }, + { value: "Title", label: "标题" }, + { value: "Paragraph", label: "段落" }, { value: "Anchor", label: "锚点" }, { value: "BackTop", label: "回到顶部" }, { value: "Container", label: "布局容器" },