-
Notifications
You must be signed in to change notification settings - Fork 290
组件文档API部分规范
Kagol edited this page Dec 12, 2021
·
1 revision
组件文档API部分,以API开始,接着 参数、事件、插槽、接口&类型定义的顺序,如果组件缺失其中每一项则跳过。如果组件有特殊项,则在 接口&类型定义 后按自己组件顺序编写。
表格内容需要左对齐。
类型加 ``反引号包裹住,默认值如果为字符串类型或枚举类型用' '单引号包裹住
属性 | 类型 | 默认 | 说明 | 跳转Demo |
---|---|---|---|---|
type | 'button' | 'submit' | 'reset' | 'button' | 可选,按钮类型 | |
事件名 | 类型 | 说明 | 跳转Demo |
---|---|---|---|
onClick | (event: MouseEvent) => void | 可选,点击事件 |
插槽名 | 说明 |
---|---|
-- | 默认插槽 |
IButtonStyle
type IButtonStyle = 'common' | 'primary' | 'text' | 'text-dark' | 'danger' | 'success' | 'warning';
Attribute | Type | Default | Description | Jump to Demo |
---|---|---|---|---|
type | 'button' | 'submit' | 'reset' | 'button' | Optional | |
Event Name | Type | Description | Jump to Demo |
---|---|---|---|
onClick | (event: MouseEvent) => void | Optional |
Name | Description |
---|---|
-- | customize default content |
IButtonStyle
type IButtonStyle = 'common' | 'primary' | 'text' | 'text-dark' | 'danger' | 'success' | 'warning';