Skip to content

组件文档API部分规范

Kagol edited this page Dec 12, 2021 · 1 revision

组件文档API部分,以API开始,接着 参数、事件、插槽、接口&类型定义的顺序,如果组件缺失其中每一项则跳过。如果组件有特殊项,则在 接口&类型定义 后按自己组件顺序编写。

表格内容需要左对齐。

API

d-button属性

类型加 ``反引号包裹住,默认值如果为字符串类型或枚举类型用' '单引号包裹住

属性 类型 默认 说明 跳转Demo
type 'button' | 'submit' | 'reset' 'button' 可选,按钮类型

d-button事件

事件名 类型 说明 跳转Demo
onClick (event: MouseEvent) => void 可选,点击事件

d-button 插槽

插槽名 说明
-- 默认插槽

接口 & 类型定义

IButtonStyle

type IButtonStyle = 'common' | 'primary' | 'text' | 'text-dark' | 'danger' | 'success' | 'warning';

英文文档

API

d-button Attributes

Attribute Type Default Description Jump to Demo
type 'button' | 'submit' | 'reset' 'button' Optional

d-button Events

Event Name Type Description Jump to Demo
onClick (event: MouseEvent) => void Optional

d-button Slots

Name Description
-- customize default content

Interface & Types

IButtonStyle

type IButtonStyle = 'common' | 'primary' | 'text' | 'text-dark' | 'danger' | 'success' | 'warning';
Clone this wiki locally