diff --git a/db/TDesign.db b/db/TDesign.db index 5c298a546..f2bbc593a 100644 Binary files a/db/TDesign.db and b/db/TDesign.db differ diff --git a/packages/products/tdesign-web-components/src/button/button.en-US.md b/packages/products/tdesign-web-components/src/button/button.en-US.md new file mode 100644 index 000000000..1126560ba --- /dev/null +++ b/packages/products/tdesign-web-components/src/button/button.en-US.md @@ -0,0 +1,31 @@ +:: BASE_DOC :: + +## API + +### Button Props + +name | type | default | description | required +-- | -- | -- | -- | -- +className | String | - | className of component | N +style | Object | - | CSS(Cascading Style Sheets) | N +innerClass | String | - | shadowDOM className of component | N +innerStyle | Object | - | shadowDOM CSS(Cascading Style Sheets) | N +block | Boolean | false | make button to be a block-level element | N +children | TNode | - | button's children elements。Typescript: `string \| TNode`。[see more ts definition](https://github.com/TDesignOteam/tdesign-web-components/blob/develop/src/common.ts) | N +content | TNode | - | button's children elements。Typescript: `string \| TNode`。[see more ts definition](https://github.com/TDesignOteam/tdesign-web-components/blob/develop/src/common.ts) | N +disabled | Boolean | undefined | disable the button, make it can not be clicked | N +form | String | undefined | native `form` attribute,which supports triggering events for a form with a specified id through the use of the form attribute | N +ghost | Boolean | false | make background-color to be transparent | N +href | String | - | \- | N +icon | TElement | - | use it to set left icon in button。Typescript: `TNode`。[see more ts definition](https://github.com/TDesignOteam/tdesign-web-components/blob/develop/src/common.ts) | N +ignoreAttributes | Array | [] | Typescript: `Array` | N +loading | Boolean | false | set button to be loading state | N +loadingProps | Object | - | Typescript: `LoadingProps`,[Loading API Documents](./loading?tab=api)。[see more ts definition](https://github.com/TDesignOteam/tdesign-web-components/blob/develop/src/button/type.ts) | N +shape | String | rectangle | button shape。options: rectangle/square/round/circle | N +size | String | medium | a button has four size。options: small/medium/large。Typescript: `SizeEnum`。[see more ts definition](https://github.com/TDesignOteam/tdesign-web-components/blob/develop/src/common.ts) | N +suffix | TElement | - | Typescript: `TNode`。[see more ts definition](https://github.com/TDesignOteam/tdesign-web-components/blob/develop/src/common.ts) | N +tag | String | - | HTML Tag Element。options: button/a/div | N +theme | String | - | button theme。options: default/primary/danger/warning/success | N +type | String | button | type of button element in html。options: submit/reset/button | N +variant | String | base | variant of button。options: base/outline/dashed/text | N +onClick | Function | | Typescript: `(e: MouseEvent) => void`
trigger on click | N diff --git a/packages/products/tdesign-web-components/src/button/button.md b/packages/products/tdesign-web-components/src/button/button.md new file mode 100644 index 000000000..e52ab0c0e --- /dev/null +++ b/packages/products/tdesign-web-components/src/button/button.md @@ -0,0 +1,31 @@ +:: BASE_DOC :: + +## API + +### Button Props + +名称 | 类型 | 默认值 | 描述 | 必传 +-- | -- | -- | -- | -- +className | String | - | 类名 | N +style | Object | - | 样式 | N +innerClass | String | - | shadowDOM 类名 | N +innerStyle | Object | - | shadowDOM 样式 | N +block | Boolean | false | 是否为块级元素 | N +children | TNode | - | 按钮内容,同 content。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/TDesignOteam/tdesign-web-components/blob/develop/src/common.ts) | N +content | TNode | - | 按钮内容。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/TDesignOteam/tdesign-web-components/blob/develop/src/common.ts) | N +disabled | Boolean | undefined | 禁用状态。优先级:Button.disabled > Form.disabled | N +form | String | undefined | 原生的form属性,支持用于通过 form 属性触发对应 id 的 form 的表单事件 | N +ghost | Boolean | false | 是否为幽灵按钮(镂空按钮) | N +href | String | - | 跳转地址。href 存在时,按钮标签默认使用 `` 渲染;如果指定了 `tag` 则使用指定的标签渲染 | N +icon | TElement | - | 按钮内部图标,可完全自定义。TS 类型:`TNode`。[通用类型定义](https://github.com/TDesignOteam/tdesign-web-components/blob/develop/src/common.ts) | N +ignoreAttributes | Array | [] | 在host标签上忽略的属性。TS 类型:`Array` | N +loading | Boolean | false | 是否显示为加载状态 | N +loadingProps | Object | - | 透传 Loading 组件全部属性。TS 类型:`LoadingProps`,[Loading API Documents](./loading?tab=api)。[详细类型定义](https://github.com/TDesignOteam/tdesign-web-components/blob/develop/src/button/type.ts) | N +shape | String | rectangle | 按钮形状,有 4 种:长方形、正方形、圆角长方形、圆形。可选项:rectangle/square/round/circle | N +size | String | medium | 组件尺寸。可选项:small/medium/large。TS 类型:`SizeEnum`。[通用类型定义](https://github.com/TDesignOteam/tdesign-web-components/blob/develop/src/common.ts) | N +suffix | TElement | - | 右侧内容,可用于定义右侧图标。TS 类型:`TNode`。[通用类型定义](https://github.com/TDesignOteam/tdesign-web-components/blob/develop/src/common.ts) | N +tag | String | - | 渲染按钮的 HTML 标签,默认使用标签 `