From acbf3e005bbb2de8b1609095ea1008c7d3dae063 Mon Sep 17 00:00:00 2001 From: anlyyao Date: Tue, 21 Apr 2026 19:18:03 +0800 Subject: [PATCH] dcos(Typographt): add typography for mobile --- db/TDesign.db | Bin 1134592 -> 1134592 bytes .../{layout => col}/README.en-US.md | 15 +- .../components/{layout => col}/README.md | 19 +- .../components/paragraph/README.en-US.md | 61 +++ .../packages/components/paragraph/README.md | 61 +++ .../packages/components/paragraph/props.ts | 20 + .../packages/components/paragraph/type.ts | 25 + .../packages/components/text/props.ts | 69 +++ .../packages/components/text/type.ts | 112 +++++ .../packages/components/title/props.ts | 25 + .../packages/components/title/type.ts | 33 ++ .../paragraph/README.en-US.md | 58 +++ .../uniapp-components/paragraph/README.md | 58 +++ .../uniapp-components/paragraph/props.ts | 18 + .../uniapp-components/paragraph/type.ts | 19 + .../packages/uniapp-components/text/props.ts | 47 ++ .../packages/uniapp-components/text/type.ts | 76 +++ .../packages/uniapp-components/title/props.ts | 27 ++ .../packages/uniapp-components/title/type.ts | 24 + .../src/typography/defaultProps.ts | 22 + .../src/typography/type.ts | 147 ++++++ .../src/typography/typography.en-US.md | 63 +++ .../src/typography/typography.md | 63 +++ .../src/typography/paragraph-props.ts | 24 + .../src/typography/text-props.ts | 56 +++ .../src/typography/title-props.ts | 33 ++ .../tdesign-mobile-vue/src/typography/type.ts | 151 ++++++ .../src/typography/typography.en-US.md | 68 +++ .../src/typography/typography.md | 68 +++ .../packages/components/typography/type.ts | 2 +- .../components/typography/typography.en-US.md | 36 +- .../packages/components/typography/type.ts | 2 +- .../components/typography/typography.en-US.md | 32 +- .../tdesign-vue/src/typography/type.ts | 2 +- .../src/typography/typography.en-US.md | 32 +- packages/scripts/api.json | 448 +++++++++++++++--- packages/scripts/config/files-combine.js | 11 +- packages/scripts/index.js | 8 +- 38 files changed, 1899 insertions(+), 136 deletions(-) rename packages/products/tdesign-miniprogram/packages/components/{layout => col}/README.en-US.md (99%) rename packages/products/tdesign-miniprogram/packages/components/{layout => col}/README.md (99%) create mode 100644 packages/products/tdesign-miniprogram/packages/components/paragraph/README.en-US.md create mode 100644 packages/products/tdesign-miniprogram/packages/components/paragraph/README.md create mode 100644 packages/products/tdesign-miniprogram/packages/components/paragraph/props.ts create mode 100644 packages/products/tdesign-miniprogram/packages/components/paragraph/type.ts create mode 100644 packages/products/tdesign-miniprogram/packages/components/text/props.ts create mode 100644 packages/products/tdesign-miniprogram/packages/components/text/type.ts create mode 100644 packages/products/tdesign-miniprogram/packages/components/title/props.ts create mode 100644 packages/products/tdesign-miniprogram/packages/components/title/type.ts create mode 100644 packages/products/tdesign-miniprogram/packages/uniapp-components/paragraph/README.en-US.md create mode 100644 packages/products/tdesign-miniprogram/packages/uniapp-components/paragraph/README.md create mode 100644 packages/products/tdesign-miniprogram/packages/uniapp-components/paragraph/props.ts create mode 100644 packages/products/tdesign-miniprogram/packages/uniapp-components/paragraph/type.ts create mode 100644 packages/products/tdesign-miniprogram/packages/uniapp-components/text/props.ts create mode 100644 packages/products/tdesign-miniprogram/packages/uniapp-components/text/type.ts create mode 100644 packages/products/tdesign-miniprogram/packages/uniapp-components/title/props.ts create mode 100644 packages/products/tdesign-miniprogram/packages/uniapp-components/title/type.ts create mode 100644 packages/products/tdesign-mobile-react/src/typography/defaultProps.ts create mode 100644 packages/products/tdesign-mobile-react/src/typography/type.ts create mode 100644 packages/products/tdesign-mobile-react/src/typography/typography.en-US.md create mode 100644 packages/products/tdesign-mobile-react/src/typography/typography.md create mode 100644 packages/products/tdesign-mobile-vue/src/typography/paragraph-props.ts create mode 100644 packages/products/tdesign-mobile-vue/src/typography/text-props.ts create mode 100644 packages/products/tdesign-mobile-vue/src/typography/title-props.ts create mode 100644 packages/products/tdesign-mobile-vue/src/typography/type.ts create mode 100644 packages/products/tdesign-mobile-vue/src/typography/typography.en-US.md create mode 100644 packages/products/tdesign-mobile-vue/src/typography/typography.md diff --git a/db/TDesign.db b/db/TDesign.db index 83cdd707ee1873672d5242c802d1e635549f9cb1..c08ef460700224a225e1facb02bb5fc07193db86 100644 GIT binary patch delta 1670 zcmbVMYfM{Z7(U1j**_OdY1{lB85{}wa})(#&uHI zA!L~e#KbrALMGvdiN<8nt((ar^3NF)|IC;mGBcJuiN9Aiy~jNciLz>g3xd~Z0a|5YDLd6+VnvRijf$7pA@dd)QdfUi-1 z#FeQ{*6}YkVWVA}eUgODYKE!IF(&tHRw!(qMo24sJ8$mgYlu9)~TPb&Wgg>X_B` z;P4WXM=F61 z%_;O#QWhGDV6Q>XthNPWf!m74omJ)rM2S&bhUZgDF8ABnwAxT@ zgBOMbn!*cKj+E=t2|!#QPz-O_)O;GXUM2nxFO1S2OI}zZ-Wfm4_>D7u)7ySC$G5Rp z8EC~n1ID9xc*^ulV%TpkV710&;}zq_#>K>k&zW!PNdcZ|H5b@J8%@_NcAbi2LmU1D zOHT65ch_Q5-hSDbw`3=7w3^*NsdkYlYMhpRT5etS9($HVKh3_?L<*;JS^OvoD20uBe6kYOlTj8MwFb4G(R#+ zm=Jnmkv<{cFQ+&E_T>Cj>S7L6lJykB&I2h>n2*KfKpkEAZLt~NCw5WfmuPYeyOwi56YZtTWZ!Rgih*3fpFMF)n7@{$t z9?~^;N1`KmDUaV>d}ry+JF{0dC6~*7I?LUznkPW`zzvyIPrF4U?I|myE)UWXRN25_ REY#mC$jTD$R#}49zX9|N!UF&R delta 1043 zcmaKrT}V@57{||hc0PCZY!kHQR&FP?&1TDGvq;@$wMAcMBKDzz)j55U^nu|d2xpyP z5n&8^1Su4PBB;AKeL$del_cFrP=*lQN+2_A$Fp&dYWwFL}gK(IKSy=Zwz#xjVLR>}xhoQu%0G5Z6_~ zDk9=keaR(!Qw0f*VaNy$#K2EgjKQ3gwPR;FN1`~X3uV0ibkmrKLJUrmVe|4T2os!F zL8a!ODqO)sDgKlRT*rxCRY*hQmSx}R37FX!1(e6}!Ctgk>0WVIvH&l-;`-o^jd3*n<^~(1M93n2@qP*iDHZ%m!e&)Ho$} zoa{fX<75CXGhn)wobJ(@a%p~0*R+4QTd-7f>XWrl9o>NF0UTSrR@W^#n$ee9;H+-}? V`EeBMN>-X`n=-(g; + /** + * 点击省略按钮的回调 + */ + onExpand?: (expanded: boolean) => void; +} + +export interface TypographyCopyable { + /** + * 复制的文本内容,默认为全部文本 + * @default '' + */ + text?: string; + /** + * 自定义复制触发元素,一般用于自定义复制图标 + */ + suffix?: TNode<{ copied: boolean }>; + /** + * 点击复制按钮的回调 + */ + onCopy?: () => void; +} diff --git a/packages/products/tdesign-mobile-react/src/typography/typography.en-US.md b/packages/products/tdesign-mobile-react/src/typography/typography.en-US.md new file mode 100644 index 000000000..6214a1404 --- /dev/null +++ b/packages/products/tdesign-mobile-react/src/typography/typography.en-US.md @@ -0,0 +1,63 @@ +:: BASE_DOC :: + +## API + +### Text Props + +name | type | default | description | required +-- | -- | -- | -- | -- +className | String | - | className of component | N +style | Object | - | CSS(Cascading Style Sheets),Typescript: `React.CSSProperties` | N +children | TNode | - | children of text。Typescript: `string \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-react/blob/develop/src/common.ts) | N +code | Boolean | false | add code style | N +copyable | Boolean / Object | false | add copyable style。Typescript: `boolean \| TypographyCopyable` | 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 | - | className of component | N +style | Object | - | CSS(Cascading Style Sheets),Typescript: `React.CSSProperties` | N +children | TNode | - | children of title。Typescript: `string \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-react/blob/develop/src/common.ts) | N +content | TNode | - | content of title。Typescript: `string \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-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 | - | className of component | N +style | Object | - | CSS(Cascading Style Sheets),Typescript: `React.CSSProperties` | N +children | TNode | - | children of paragraph。Typescript: `string \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-react/blob/develop/src/common.ts) | N +content | TNode | - | content of paragraph。Typescript: `string \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-react/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 | TElement | - | custom element configuration for ellipsis and collapse icon。Typescript: `TNode<{ expanded: boolean }>`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-react/blob/develop/src/common.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-mobile-react/blob/develop/src/common.ts) | N +onCopy | Function | | Typescript: `() => void`
| N diff --git a/packages/products/tdesign-mobile-react/src/typography/typography.md b/packages/products/tdesign-mobile-react/src/typography/typography.md new file mode 100644 index 000000000..59c948abb --- /dev/null +++ b/packages/products/tdesign-mobile-react/src/typography/typography.md @@ -0,0 +1,63 @@ +:: 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-mobile-react/blob/develop/src/common.ts) | N +code | Boolean | false | 是否添加代码样式 | N +copyable | Boolean / Object | false | 是否可复制,可通过配置参数自定义复制操作的具体功能和样式。TS 类型:`boolean \| TypographyCopyable` | 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-mobile-react/blob/develop/src/common.ts) | N +content | TNode | - | 段落内容。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-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-mobile-react/blob/develop/src/common.ts) | N +content | TNode | - | 段落内容。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-react/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 | TElement | - | 自定义省略触发元素,一般用于自定义折叠图标。TS 类型:`TNode<{ expanded: boolean }>`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-react/blob/develop/src/common.ts) | N +onExpand | Function | | TS 类型:`(expanded:boolean) => void`
点击省略按钮的回调 | N + +### TypographyCopyable + +名称 | 类型 | 默认值 | 描述 | 必传 +-- | -- | -- | -- | -- + text | String | - | 复制的文本内容,默认为全部文本 | N +suffix | TElement | - | 自定义复制触发元素,一般用于自定义复制图标。TS 类型:`TNode<{ copied: boolean }>`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-react/blob/develop/src/common.ts) | N +onCopy | Function | | TS 类型:`() => void`
点击复制按钮的回调 | N diff --git a/packages/products/tdesign-mobile-vue/src/typography/paragraph-props.ts b/packages/products/tdesign-mobile-vue/src/typography/paragraph-props.ts new file mode 100644 index 000000000..8d231d733 --- /dev/null +++ b/packages/products/tdesign-mobile-vue/src/typography/paragraph-props.ts @@ -0,0 +1,24 @@ +/* eslint-disable */ + +/** + * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC + * */ + +import { TdParagraphProps } 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 TdParagraphProps['ellipsis'], + }, +}; diff --git a/packages/products/tdesign-mobile-vue/src/typography/text-props.ts b/packages/products/tdesign-mobile-vue/src/typography/text-props.ts new file mode 100644 index 000000000..f1b92b6ad --- /dev/null +++ b/packages/products/tdesign-mobile-vue/src/typography/text-props.ts @@ -0,0 +1,56 @@ +/* eslint-disable */ + +/** + * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC + * */ + +import { TdTextProps } from '../typography/type'; +import { PropType } from 'vue'; + +export default { + /** 是否添加代码样式 */ + code: Boolean, + /** 文本内容 */ + content: { + type: [String, Function] as PropType, + }, + /** 是否可复制,可通过配置参数自定义复制操作的具体功能和样式 */ + copyable: { + type: [Boolean, Object] as PropType, + default: false as TdTextProps['copyable'], + }, + /** 文本内容 */ + 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-mobile-vue/src/typography/title-props.ts b/packages/products/tdesign-mobile-vue/src/typography/title-props.ts new file mode 100644 index 000000000..4bc0b80e5 --- /dev/null +++ b/packages/products/tdesign-mobile-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 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-mobile-vue/src/typography/type.ts b/packages/products/tdesign-mobile-vue/src/typography/type.ts new file mode 100644 index 000000000..fc55bb219 --- /dev/null +++ b/packages/products/tdesign-mobile-vue/src/typography/type.ts @@ -0,0 +1,151 @@ +/* eslint-disable */ + +/** + * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC + * */ + +import type { TNode } from '../common'; + +export interface TdTextProps { + /** + * 是否添加代码样式 + * @default false + */ + code?: boolean; + /** + * 文本内容 + */ + content?: string | TNode; + /** + * 是否可复制,可通过配置参数自定义复制操作的具体功能和样式 + * @default false + */ + copyable?: boolean | TypographyCopyable; + /** + * 文本内容 + */ + 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?: 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 }>; + /** + * 点击省略按钮的回调 + */ + onExpand?: (expanded: boolean) => void; +} + +export interface TypographyCopyable { + /** + * 复制的文本内容,默认为全部文本 + * @default '' + */ + text?: string; + /** + * 自定义复制触发元素,一般用于自定义复制图标 + */ + suffix?: TNode<{ copied: boolean }>; + /** + * 点击复制按钮的回调 + */ + onCopy?: () => void; +} diff --git a/packages/products/tdesign-mobile-vue/src/typography/typography.en-US.md b/packages/products/tdesign-mobile-vue/src/typography/typography.en-US.md new file mode 100644 index 000000000..d77fc8438 --- /dev/null +++ b/packages/products/tdesign-mobile-vue/src/typography/typography.en-US.md @@ -0,0 +1,68 @@ +:: 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-mobile-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 text。Typescript: `string \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-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-mobile-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-mobile-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-mobile-vue/blob/develop/src/common.ts) | N +default | String / Slot / Function | - | default slot of paragraph。Typescript: `string \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-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-mobile-vue/blob/develop/src/common.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-mobile-vue/blob/develop/src/common.ts) | N +onCopy | Function | | Typescript: `() => void`
| N +### TypographyCopyable + +name | params | description +-- | -- | -- +copy | \- | \- diff --git a/packages/products/tdesign-mobile-vue/src/typography/typography.md b/packages/products/tdesign-mobile-vue/src/typography/typography.md new file mode 100644 index 000000000..25051564a --- /dev/null +++ b/packages/products/tdesign-mobile-vue/src/typography/typography.md @@ -0,0 +1,68 @@ +:: BASE_DOC :: + +## API + +### Text Props + +名称 | 类型 | 默认值 | 描述 | 必传 +-- | -- | -- | -- | -- +code | Boolean | false | 是否添加代码样式 | N +content | String / Slot / Function | - | 文本内容。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-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-mobile-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-mobile-vue/blob/develop/src/common.ts) | N +default | String / Slot / Function | - | 标题内容。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-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-mobile-vue/blob/develop/src/common.ts) | N +default | String / Slot / Function | - | 段落内容。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-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-mobile-vue/blob/develop/src/common.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-mobile-vue/blob/develop/src/common.ts) | N +onCopy | Function | | TS 类型:`() => void`
点击复制按钮的回调 | N +### TypographyCopyable + +名称 | 参数 | 描述 +-- | -- | -- +copy | \- | 点击复制按钮的回调 diff --git a/packages/products/tdesign-react/packages/components/typography/type.ts b/packages/products/tdesign-react/packages/components/typography/type.ts index 51b33d6b6..d7c736e10 100644 --- a/packages/products/tdesign-react/packages/components/typography/type.ts +++ b/packages/products/tdesign-react/packages/components/typography/type.ts @@ -5,7 +5,7 @@ * */ import { TooltipProps } from '../tooltip'; -import { TNode } from '../common'; +import type { TNode } from '../common'; export interface TdTextProps { /** diff --git a/packages/products/tdesign-react/packages/components/typography/typography.en-US.md b/packages/products/tdesign-react/packages/components/typography/typography.en-US.md index 91dc8efd8..85a299778 100644 --- a/packages/products/tdesign-react/packages/components/typography/typography.en-US.md +++ b/packages/products/tdesign-react/packages/components/typography/typography.en-US.md @@ -7,13 +7,13 @@ name | type | default | description | required -- | -- | -- | -- | -- className | String | - | className of component | N -style | Object | - | CSS(Cascading Style Sheets),Typescript:`React.CSSProperties` | N -children | TNode | - | children of text。Typescript:`string \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/packages/components/common.ts) | N +style | Object | - | CSS(Cascading Style Sheets),Typescript: `React.CSSProperties` | N +children | TNode | - | children of text。Typescript: `string \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/packages/components/common.ts) | N code | Boolean | false | add code style | N -copyable | Boolean / Object | false | add copyable style。Typescript:`boolean \| TypographyCopyable` | N +copyable | Boolean / Object | false | add copyable style。Typescript: `boolean \| TypographyCopyable` | 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 +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 @@ -27,10 +27,10 @@ underline | Boolean | false | add underline style | N name | type | default | description | required -- | -- | -- | -- | -- className | String | - | className of component | N -style | Object | - | CSS(Cascading Style Sheets),Typescript:`React.CSSProperties` | N -children | TNode | - | children of title。Typescript:`string \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/packages/components/common.ts) | N -content | TNode | - | content of title。Typescript:`string \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/packages/components/common.ts) | N -ellipsis | Boolean / Object | false | add ellipsis style。Typescript:`boolean \| TypographyEllipsis` | N +style | Object | - | CSS(Cascading Style Sheets),Typescript: `React.CSSProperties` | N +children | TNode | - | children of title。Typescript: `string \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/packages/components/common.ts) | N +content | TNode | - | content of title。Typescript: `string \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/packages/components/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 @@ -39,10 +39,10 @@ level | String | h1 | level of title。options: h1/h2/h3/h4/h5/h6 | N name | type | default | description | required -- | -- | -- | -- | -- className | String | - | className of component | N -style | Object | - | CSS(Cascading Style Sheets),Typescript:`React.CSSProperties` | N -children | TNode | - | children of paragraph。Typescript:`string \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/packages/components/common.ts) | N -content | TNode | - | content of paragraph。Typescript:`string \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/packages/components/common.ts) | N -ellipsis | Boolean / Object | false | add ellipsis style。Typescript:`boolean \| TypographyEllipsis` | N +style | Object | - | CSS(Cascading Style Sheets),Typescript: `React.CSSProperties` | N +children | TNode | - | children of paragraph。Typescript: `string \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/packages/components/common.ts) | N +content | TNode | - | content of paragraph。Typescript: `string \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/packages/components/common.ts) | N +ellipsis | Boolean / Object | false | add ellipsis style。Typescript: `boolean \| TypographyEllipsis` | N ### TypographyEllipsis @@ -51,15 +51,15 @@ 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/packages/components/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/packages/components/typography/type.ts) | N -onExpand | Function | | Typescript:`(expanded:boolean) => void`
| 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/packages/components/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/packages/components/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/packages/components/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/packages/components/typography/type.ts) | N -onCopy | Function | | Typescript:`() => void`
| 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/packages/components/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/packages/components/typography/type.ts) | N +onCopy | Function | | Typescript: `() => void`
| N diff --git a/packages/products/tdesign-vue-next/packages/components/typography/type.ts b/packages/products/tdesign-vue-next/packages/components/typography/type.ts index ecc19bce0..3f256708c 100644 --- a/packages/products/tdesign-vue-next/packages/components/typography/type.ts +++ b/packages/products/tdesign-vue-next/packages/components/typography/type.ts @@ -5,7 +5,7 @@ * */ import { TooltipProps } from '../tooltip'; -import { TNode } from '../common'; +import type { TNode } from '../common'; export interface TdTextProps { /** diff --git a/packages/products/tdesign-vue-next/packages/components/typography/typography.en-US.md b/packages/products/tdesign-vue-next/packages/components/typography/typography.en-US.md index 30c6d14b9..22acf2aca 100644 --- a/packages/products/tdesign-vue-next/packages/components/typography/typography.en-US.md +++ b/packages/products/tdesign-vue-next/packages/components/typography/typography.en-US.md @@ -7,12 +7,12 @@ 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/packages/components/common.ts) | N -copyable | Boolean / Object | false | add copyable style。Typescript:`boolean \| TypographyCopyable` | 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/packages/components/common.ts) | N +content | String / Slot / Function | - | content of text。Typescript: `string \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-vue-next/blob/develop/packages/components/common.ts) | N +copyable | Boolean / Object | false | add copyable style。Typescript: `boolean \| TypographyCopyable` | 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/packages/components/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 +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 @@ -25,9 +25,9 @@ underline | Boolean | false | add underline style | N 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/packages/components/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/packages/components/common.ts) | N -ellipsis | Boolean / Object | false | add ellipsis style。Typescript:`boolean \| TypographyEllipsis` | N +content | String / Slot / Function | - | content of title。Typescript: `string \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-vue-next/blob/develop/packages/components/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/packages/components/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 @@ -35,9 +35,9 @@ level | String | h1 | level of title。options: h1/h2/h3/h4/h5/h6 | N 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/packages/components/common.ts) | 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/packages/components/common.ts) | N -ellipsis | Boolean / Object | false | add ellipsis style。Typescript:`boolean \| TypographyEllipsis` | N +content | String / Slot / Function | - | content of paragraph。Typescript: `string \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-vue-next/blob/develop/packages/components/common.ts) | 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/packages/components/common.ts) | N +ellipsis | Boolean / Object | false | add ellipsis style。Typescript: `boolean \| TypographyEllipsis` | N ### TypographyEllipsis @@ -46,9 +46,9 @@ 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/packages/components/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/blob/develop/packages/components/typography/type.ts) | N -onExpand | Function | | Typescript:`(expanded:boolean) => void`
| 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/packages/components/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/blob/develop/packages/components/typography/type.ts) | N +onExpand | Function | | Typescript: `(expanded:boolean) => void`
| N ### TypographyEllipsis name | params | description @@ -60,9 +60,9 @@ expand | `(expanded:boolean)` | \- 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/packages/components/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/blob/develop/packages/components/typography/type.ts) | N -onCopy | Function | | Typescript:`() => void`
| 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/packages/components/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/blob/develop/packages/components/typography/type.ts) | N +onCopy | Function | | Typescript: `() => void`
| N ### TypographyCopyable name | params | description diff --git a/packages/products/tdesign-vue/src/typography/type.ts b/packages/products/tdesign-vue/src/typography/type.ts index ecc19bce0..3f256708c 100644 --- a/packages/products/tdesign-vue/src/typography/type.ts +++ b/packages/products/tdesign-vue/src/typography/type.ts @@ -5,7 +5,7 @@ * */ import { TooltipProps } from '../tooltip'; -import { TNode } from '../common'; +import type { TNode } from '../common'; export interface TdTextProps { /** diff --git a/packages/products/tdesign-vue/src/typography/typography.en-US.md b/packages/products/tdesign-vue/src/typography/typography.en-US.md index 41adca750..f937bc94c 100644 --- a/packages/products/tdesign-vue/src/typography/typography.en-US.md +++ b/packages/products/tdesign-vue/src/typography/typography.en-US.md @@ -7,12 +7,12 @@ 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 -copyable | Boolean / Object | false | add copyable style。Typescript:`boolean \| TypographyCopyable` | 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 +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 +copyable | Boolean / Object | false | add copyable style。Typescript: `boolean \| TypographyCopyable` | 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 +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 @@ -25,9 +25,9 @@ underline | Boolean | false | add underline style | N 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 +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 @@ -35,9 +35,9 @@ level | String | h1 | level of title。options: h1/h2/h3/h4/h5/h6 | N 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 -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 +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 +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 @@ -46,9 +46,9 @@ 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 +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 @@ -60,9 +60,9 @@ expand | `(expanded:boolean)` | \- 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 +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 diff --git a/packages/scripts/api.json b/packages/scripts/api.json index 9be16cfc9..d47bdf1ab 100644 --- a/packages/scripts/api.json +++ b/packages/scripts/api.json @@ -92613,7 +92613,8 @@ { "id": 1706635398, "platform_framework": [ - "2" + "2", + "16" ], "component": "Paragraph", "field_category": 1, @@ -92642,7 +92643,8 @@ "support_default_value": 0, "field_category_text": "Props", "platform_framework_text": [ - "React(PC)" + "React(PC)", + "React(Mobile)" ], "field_type_text": [ "String", @@ -92653,7 +92655,11 @@ "id": 1706635275, "platform_framework": [ "1", - "2" + "2", + "8", + "16", + "64", + "128" ], "component": "Paragraph", "field_category": 1, @@ -92683,7 +92689,11 @@ "field_category_text": "Props", "platform_framework_text": [ "Vue(PC)", - "React(PC)" + "React(PC)", + "Vue(Mobile)", + "React(Mobile)", + "Miniprogram", + "UniApp" ], "field_type_text": [ "String", @@ -92693,7 +92703,8 @@ { "id": 1706635334, "platform_framework": [ - "1" + "1", + "8" ], "component": "Paragraph", "field_category": 1, @@ -92722,7 +92733,8 @@ "support_default_value": 0, "field_category_text": "Props", "platform_framework_text": [ - "Vue(PC)" + "Vue(PC)", + "Vue(Mobile)" ], "field_type_text": [ "String", @@ -92733,7 +92745,9 @@ "id": 1706638282, "platform_framework": [ "1", - "2" + "2", + "8", + "16" ], "component": "Paragraph", "field_category": 1, @@ -92763,7 +92777,50 @@ "field_category_text": "Props", "platform_framework_text": [ "Vue(PC)", - "React(PC)" + "React(PC)", + "Vue(Mobile)", + "React(Mobile)" + ], + "field_type_text": [ + "Boolean", + "Object" + ] + }, + { + "id": 1776828574, + "platform_framework": [ + "64", + "128" + ], + "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": "2026-04-22 03:29:34", + "update_time": "2026-04-22 03:29:34", + "event_output": null, + "custom_field_type": "boolean | TypographyEllipsis 【import { TypographyEllipsis } from '@Text'】", + "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": [ + "Miniprogram", + "UniApp" ], "field_type_text": [ "Boolean", @@ -135191,7 +135248,8 @@ { "id": 1706635543, "platform_framework": [ - "2" + "2", + "16" ], "component": "Text", "field_category": 1, @@ -135220,7 +135278,8 @@ "support_default_value": 0, "field_category_text": "Props", "platform_framework_text": [ - "React(PC)" + "React(PC)", + "React(Mobile)" ], "field_type_text": [ "String", @@ -135231,7 +135290,11 @@ "id": 1706635187, "platform_framework": [ "1", - "2" + "2", + "8", + "16", + "64", + "128" ], "component": "Text", "field_category": 1, @@ -135260,7 +135323,11 @@ "field_category_text": "Props", "platform_framework_text": [ "Vue(PC)", - "React(PC)" + "React(PC)", + "Vue(Mobile)", + "React(Mobile)", + "Miniprogram", + "UniApp" ], "field_type_text": [ "Boolean" @@ -135269,7 +135336,10 @@ { "id": 1706635518, "platform_framework": [ - "1" + "1", + "8", + "64", + "128" ], "component": "Text", "field_category": 1, @@ -135298,7 +135368,10 @@ "support_default_value": 0, "field_category_text": "Props", "platform_framework_text": [ - "Vue(PC)" + "Vue(PC)", + "Vue(Mobile)", + "Miniprogram", + "UniApp" ], "field_type_text": [ "String", @@ -135309,7 +135382,9 @@ "id": 1706638324, "platform_framework": [ "1", - "2" + "2", + "8", + "16" ], "component": "Text", "field_category": 1, @@ -135339,17 +135414,59 @@ "field_category_text": "Props", "platform_framework_text": [ "Vue(PC)", - "React(PC)" + "React(PC)", + "Vue(Mobile)", + "React(Mobile)" ], "field_type_text": [ "Boolean", "Object" ] }, + { + "id": 1776740497, + "platform_framework": [ + "64", + "128" + ], + "component": "Text", + "field_category": 1, + "field_name": "copyable", + "field_type": [ + "4" + ], + "field_default_value": "false", + "field_enum": "", + "field_desc_zh": "是否可复制", + "field_desc_en": null, + "field_required": 0, + "event_input": "", + "create_time": "2026-04-21 03:01:37", + "update_time": "2026-04-21 03:01:37", + "event_output": null, + "custom_field_type": "boolean | TypographyCopyable 【interface TypographyCopyable { text?: string }】", + "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": [ + "Miniprogram", + "UniApp" + ], + "field_type_text": [ + "Boolean" + ] + }, { "id": 1706635501, "platform_framework": [ - "1" + "1", + "8" ], "component": "Text", "field_category": 1, @@ -135378,7 +135495,8 @@ "support_default_value": 0, "field_category_text": "Props", "platform_framework_text": [ - "Vue(PC)" + "Vue(PC)", + "Vue(Mobile)" ], "field_type_text": [ "String", @@ -135389,7 +135507,11 @@ "id": 1706635746, "platform_framework": [ "1", - "2" + "2", + "8", + "16", + "64", + "128" ], "component": "Text", "field_category": 1, @@ -135418,7 +135540,11 @@ "field_category_text": "Props", "platform_framework_text": [ "Vue(PC)", - "React(PC)" + "React(PC)", + "Vue(Mobile)", + "React(Mobile)", + "Miniprogram", + "UniApp" ], "field_type_text": [ "Boolean" @@ -135428,7 +135554,11 @@ "id": 1706635833, "platform_framework": [ "1", - "2" + "2", + "8", + "16", + "64", + "128" ], "component": "Text", "field_category": 1, @@ -135457,7 +135587,11 @@ "field_category_text": "Props", "platform_framework_text": [ "Vue(PC)", - "React(PC)" + "React(PC)", + "Vue(Mobile)", + "React(Mobile)", + "Miniprogram", + "UniApp" ], "field_type_text": [ "Boolean" @@ -135467,7 +135601,9 @@ "id": 1706636550, "platform_framework": [ "1", - "2" + "2", + "8", + "16" ], "component": "Text", "field_category": 1, @@ -135497,7 +135633,50 @@ "field_category_text": "Props", "platform_framework_text": [ "Vue(PC)", - "React(PC)" + "React(PC)", + "Vue(Mobile)", + "React(Mobile)" + ], + "field_type_text": [ + "Boolean", + "Object" + ] + }, + { + "id": 1776828398, + "platform_framework": [ + "64", + "128" + ], + "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": "2026-04-22 03:26:38", + "update_time": "2026-04-22 03:26:38", + "event_output": null, + "custom_field_type": "boolean | TypographyEllipsis 【interface TypographyEllipsis { collapsible?: boolean; expandable?: boolean; row?: number;}】", + "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": [ + "Miniprogram", + "UniApp" ], "field_type_text": [ "Boolean", @@ -135508,7 +135687,11 @@ "id": 1706635810, "platform_framework": [ "1", - "2" + "2", + "8", + "16", + "64", + "128" ], "component": "Text", "field_category": 1, @@ -135537,7 +135720,11 @@ "field_category_text": "Props", "platform_framework_text": [ "Vue(PC)", - "React(PC)" + "React(PC)", + "Vue(Mobile)", + "React(Mobile)", + "Miniprogram", + "UniApp" ], "field_type_text": [ "Boolean" @@ -135547,7 +135734,11 @@ "id": 1706635845, "platform_framework": [ "1", - "2" + "2", + "8", + "16", + "64", + "128" ], "component": "Text", "field_category": 1, @@ -135576,7 +135767,11 @@ "field_category_text": "Props", "platform_framework_text": [ "Vue(PC)", - "React(PC)" + "React(PC)", + "Vue(Mobile)", + "React(Mobile)", + "Miniprogram", + "UniApp" ], "field_type_text": [ "Boolean" @@ -135586,7 +135781,11 @@ "id": 1706635902, "platform_framework": [ "1", - "2" + "2", + "8", + "16", + "64", + "128" ], "component": "Text", "field_category": 1, @@ -135616,7 +135815,11 @@ "field_category_text": "Props", "platform_framework_text": [ "Vue(PC)", - "React(PC)" + "React(PC)", + "Vue(Mobile)", + "React(Mobile)", + "Miniprogram", + "UniApp" ], "field_type_text": [ "String", @@ -135627,7 +135830,11 @@ "id": 1706635791, "platform_framework": [ "1", - "2" + "2", + "8", + "16", + "64", + "128" ], "component": "Text", "field_category": 1, @@ -135656,7 +135863,11 @@ "field_category_text": "Props", "platform_framework_text": [ "Vue(PC)", - "React(PC)" + "React(PC)", + "Vue(Mobile)", + "React(Mobile)", + "Miniprogram", + "UniApp" ], "field_type_text": [ "Boolean" @@ -135666,7 +135877,11 @@ "id": 1706635970, "platform_framework": [ "1", - "2" + "2", + "8", + "16", + "64", + "128" ], "component": "Text", "field_category": 1, @@ -135695,7 +135910,11 @@ "field_category_text": "Props", "platform_framework_text": [ "Vue(PC)", - "React(PC)" + "React(PC)", + "Vue(Mobile)", + "React(Mobile)", + "Miniprogram", + "UniApp" ], "field_type_text": [ "String" @@ -135705,7 +135924,11 @@ "id": 1706635764, "platform_framework": [ "1", - "2" + "2", + "8", + "16", + "64", + "128" ], "component": "Text", "field_category": 1, @@ -135734,7 +135957,11 @@ "field_category_text": "Props", "platform_framework_text": [ "Vue(PC)", - "React(PC)" + "React(PC)", + "Vue(Mobile)", + "React(Mobile)", + "Miniprogram", + "UniApp" ], "field_type_text": [ "Boolean" @@ -140680,7 +140907,8 @@ { "id": 1706635433, "platform_framework": [ - "2" + "2", + "16" ], "component": "Title", "field_category": 1, @@ -140709,7 +140937,8 @@ "support_default_value": 0, "field_category_text": "Props", "platform_framework_text": [ - "React(PC)" + "React(PC)", + "React(Mobile)" ], "field_type_text": [ "String", @@ -140720,7 +140949,11 @@ "id": 1706635466, "platform_framework": [ "1", - "2" + "2", + "8", + "16", + "64", + "128" ], "component": "Title", "field_category": 1, @@ -140750,7 +140983,11 @@ "field_category_text": "Props", "platform_framework_text": [ "Vue(PC)", - "React(PC)" + "React(PC)", + "Vue(Mobile)", + "React(Mobile)", + "Miniprogram", + "UniApp" ], "field_type_text": [ "String", @@ -140760,7 +140997,8 @@ { "id": 1706635482, "platform_framework": [ - "1" + "1", + "8" ], "component": "Title", "field_category": 1, @@ -140789,7 +141027,8 @@ "support_default_value": 0, "field_category_text": "Props", "platform_framework_text": [ - "Vue(PC)" + "Vue(PC)", + "Vue(Mobile)" ], "field_type_text": [ "String", @@ -140800,7 +141039,9 @@ "id": 1706638273, "platform_framework": [ "1", - "2" + "2", + "8", + "16" ], "component": "Title", "field_category": 1, @@ -140830,7 +141071,50 @@ "field_category_text": "Props", "platform_framework_text": [ "Vue(PC)", - "React(PC)" + "React(PC)", + "Vue(Mobile)", + "React(Mobile)" + ], + "field_type_text": [ + "Boolean", + "Object" + ] + }, + { + "id": 1776829625, + "platform_framework": [ + "64", + "128" + ], + "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": "2026-04-22 03:47:05", + "update_time": "2026-04-22 03:47:05", + "event_output": null, + "custom_field_type": "boolean | TypographyEllipsis 【import { TypographyEllipsis } from '@Text'】", + "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": [ + "Miniprogram", + "UniApp" ], "field_type_text": [ "Boolean", @@ -140841,7 +141125,11 @@ "id": 1706635230, "platform_framework": [ "1", - "2" + "2", + "8", + "16", + "64", + "128" ], "component": "Title", "field_category": 1, @@ -140870,7 +141158,11 @@ "field_category_text": "Props", "platform_framework_text": [ "Vue(PC)", - "React(PC)" + "React(PC)", + "Vue(Mobile)", + "React(Mobile)", + "Miniprogram", + "UniApp" ], "field_type_text": [ "String" @@ -150389,7 +150681,9 @@ "id": 1706638036, "platform_framework": [ "1", - "2" + "2", + "8", + "16" ], "component": "TypographyCopyable", "field_category": 1, @@ -150418,7 +150712,9 @@ "field_category_text": "Props", "platform_framework_text": [ "Vue(PC)", - "React(PC)" + "React(PC)", + "Vue(Mobile)", + "React(Mobile)" ], "field_type_text": [ "String" @@ -150428,7 +150724,9 @@ "id": 1706638088, "platform_framework": [ "1", - "2" + "2", + "8", + "16" ], "component": "TypographyCopyable", "field_category": 1, @@ -150457,7 +150755,9 @@ "field_category_text": "Props", "platform_framework_text": [ "Vue(PC)", - "React(PC)" + "React(PC)", + "Vue(Mobile)", + "React(Mobile)" ], "field_type_text": [ "TNode" @@ -150506,7 +150806,9 @@ "id": 1706638129, "platform_framework": [ "1", - "2" + "2", + "8", + "16" ], "component": "TypographyCopyable", "field_category": 2, @@ -150533,7 +150835,9 @@ "field_category_text": "Events", "platform_framework_text": [ "Vue(PC)", - "React(PC)" + "React(PC)", + "Vue(Mobile)", + "React(Mobile)" ], "field_type_text": [] }, @@ -150541,7 +150845,9 @@ "id": 1706637229, "platform_framework": [ "1", - "2" + "2", + "8", + "16" ], "component": "TypographyEllipsis", "field_category": 1, @@ -150570,7 +150876,9 @@ "field_category_text": "Props", "platform_framework_text": [ "Vue(PC)", - "React(PC)" + "React(PC)", + "Vue(Mobile)", + "React(Mobile)" ], "field_type_text": [ "Boolean" @@ -150580,7 +150888,9 @@ "id": 1706637150, "platform_framework": [ "1", - "2" + "2", + "8", + "16" ], "component": "TypographyEllipsis", "field_category": 1, @@ -150609,7 +150919,9 @@ "field_category_text": "Props", "platform_framework_text": [ "Vue(PC)", - "React(PC)" + "React(PC)", + "Vue(Mobile)", + "React(Mobile)" ], "field_type_text": [ "Boolean" @@ -150619,7 +150931,9 @@ "id": 1706637000, "platform_framework": [ "1", - "2" + "2", + "8", + "16" ], "component": "TypographyEllipsis", "field_category": 1, @@ -150648,7 +150962,9 @@ "field_category_text": "Props", "platform_framework_text": [ "Vue(PC)", - "React(PC)" + "React(PC)", + "Vue(Mobile)", + "React(Mobile)" ], "field_type_text": [ "Number" @@ -150658,7 +150974,9 @@ "id": 1706637830, "platform_framework": [ "1", - "2" + "2", + "8", + "16" ], "component": "TypographyEllipsis", "field_category": 1, @@ -150687,7 +151005,9 @@ "field_category_text": "Props", "platform_framework_text": [ "Vue(PC)", - "React(PC)" + "React(PC)", + "Vue(Mobile)", + "React(Mobile)" ], "field_type_text": [ "TNode" @@ -150736,7 +151056,9 @@ "id": 1706637464, "platform_framework": [ "1", - "2" + "2", + "8", + "16" ], "component": "TypographyEllipsis", "field_category": 2, @@ -150763,7 +151085,9 @@ "field_category_text": "Events", "platform_framework_text": [ "Vue(PC)", - "React(PC)" + "React(PC)", + "Vue(Mobile)", + "React(Mobile)" ], "field_type_text": [] }, diff --git a/packages/scripts/config/files-combine.js b/packages/scripts/config/files-combine.js index 214fcaf87..7e819ff1c 100644 --- a/packages/scripts/config/files-combine.js +++ b/packages/scripts/config/files-combine.js @@ -245,6 +245,14 @@ const MINIPROGRAM_COMPONENT_API_MD_MAP = { list: ['Swiper', 'SwiperNav'], includes: ['Miniprogram', 'UniApp'], }, + Paragraph: { + list: [ + 'Paragraph', + 'Text', + 'Title' + ], + includes: ['Miniprogram', 'UniApp'], + }, Chat: [], }; @@ -435,6 +443,7 @@ const TYPES_COMBINE_MAP = { 'TypographyEllipsis', 'TypographyCopyable', ], + excludes: ['Miniprogram', 'UniApp'], }, Toast: { list: ['Toast', 'ToastOptions'], @@ -472,7 +481,7 @@ const MOBILE_TYPES_COMBINE_MAP = { const MINIPROGRAM_TYPES_COMBINE_MAP = { Swiper: { list: ['Swiper', 'SwiperNav'], - excludes: ['Miniprogram', ], + excludes: ['Miniprogram'], }, Form: { list: ['Form', 'FormList', 'FormRule', 'FormErrorMessage'], diff --git a/packages/scripts/index.js b/packages/scripts/index.js index dfc1fa6ca..dea78c532 100644 --- a/packages/scripts/index.js +++ b/packages/scripts/index.js @@ -119,10 +119,10 @@ function generateComponentApi() { frameworkMap[framework === 'VueNext(PC)' ? 'Vue(PC)' : framework] ); const cmpMap = getApiComponentMapByFrameWork( - framework === 'Miniprogram' - ? Object.assign(COMPONENT_API_MD_MAP, MOBILE_COMPONENT_API_MD_MAP, MINIPROGRAM_COMPONENT_API_MD_MAP) - : (MOBILE_FRAMES.includes(framework) - ? Object.assign(COMPONENT_API_MD_MAP, MOBILE_COMPONENT_API_MD_MAP) + (framework === 'Miniprogram' || framework === 'UniApp') + ? Object.assign(COMPONENT_API_MD_MAP, MOBILE_COMPONENT_API_MD_MAP, MINIPROGRAM_COMPONENT_API_MD_MAP) + : (MOBILE_FRAMES.includes(framework) + ? Object.assign(COMPONENT_API_MD_MAP, MOBILE_COMPONENT_API_MD_MAP) : COMPONENT_API_MD_MAP), framework );