update docs

This commit is contained in:
Harvey Zack committed 2023-04-29 22:52:08 +08:00
1 parent 6264a54f93
commit ab57157371
9 files changed
+217 -157

No files matched your search

@@ -1,22 +1,22 @@
# 控制器
# Controls
## 配置
## Config
| 属性 | 类型 | 描述 |
| ---------- | ------------------- | ------------------------------------------ |
| `disable` | `Boolean` | 是否禁用组件 |
| `name` | `String` | 组件唯一名称,用于标记类名 |
| `index` | `Number` | 组件索引,用于显示的优先级 |
| `html` | `String`, `Element` | 组件的 DOM 元素 |
| `style` | `Object` | 组件样式对象 |
| `click` | `Function` | 组件点击事件 |
| `mounted` | `Function` | 组件挂载后触发 |
| `tooltip` | `String` | 组件的提示文本 |
| `position` | `String` | `left` 和 `right` 控制控制器出现的左右位置 |
| `selector` | `Array` | 选择列表的对象数组 |
| `onSelect` | `Function` | 选择列表的元素被点击时触发的函数 |
| Property | Type | Describe |
| ---------- | ------------------- | ------------------------------------------------------------------------------------ |
| `disable` | `Boolean` | Whether to disable the component |
| `name` | `String` | Component unique name, used to mark class name |
| `index` | `Number` | Component index, used for display priority |
| `html` | `String`, `Element` | DOM element of the component |
| `style` | `Object` | component style object |
| `click` | `Function` | Component click event |
| `mounted` | `Function` | Triggered after the component is mounted |
| `tooltip` | `String` | Tooltip text for the component |
| `position` | `String` | `left` and `right` control the left and right positions where the controller appears |
| `selector` | `Array` | Array of objects for the select list |
| `onSelect` | `Function` | A function that is triggered when an element of the select list is clicked |
## 创建
## Init
<div className="run-code">▶ Run Code</div>
@@ -67,7 +67,7 @@ console.info(art.controls['your-button']);
console.info(art.controls.subtitle);
```
## 添加
## Add
<div className="run-code">▶ Run Code</div>
@@ -98,7 +98,7 @@ art.controls.add({
console.info(art.controls.button1);
```
## 删除
## Remove
<div className="run-code">▶ Run Code</div>
@@ -128,7 +128,7 @@ art.on('ready', () => {
});
```
## 更新
## Update
<div className="run-code">▶ Run Code</div>