1
0
mirror of synced 2026-03-27 05:48:35 +08:00

docs: 添加editor新props

This commit is contained in:
roymondchen
2022-07-14 19:29:07 +08:00
committed by jia000
parent de0c6952c7
commit 260b6435cf
7 changed files with 50 additions and 4 deletions

View File

@@ -330,6 +330,36 @@ icon使用的是[element-plus icon](https://element-plus.org/zh-CN/component/ico
当选中框与组件不贴合时,可以通过此方法进行调整
### isContainer
- **类型:** (el: HTMLDivElement) => boolean | Promise<boolean>;
- **默认值:** (el: HTMLElement) => el.classList.contains('magic-ui-container')
- **详情:**
当组件拖动过程中停留在画布上超过 [containerHighlightDuration](#containerHighlightDuration) 时长时,识别当前是否有容器
### containerHighlightDuration
- **类型:** number;
- **默认值:** 800单位为ms
- **详情:**
当组件拖动过程中停留在画布上超过 [containerHighlightDuration](#containerHighlightDuration) 时长时,识别当前是否有容器
### containerHighlightClassName
- **类型:** string;
- **默认值:** 'tmagic-stage-container-highlight'
- **详情:**
识别到容器后会给其dom上添加的class
## slots

View File

@@ -434,7 +434,7 @@ editorService.move(1, 1);
对于每一个方法都可以为其添加before/after两个扩展方法分别在该方法运行前与运行后调用
调用时的参数会透传到before方法的参数中, 然后before的return 会作为原方法的参数和after的参数after第一个参数则是原方法的return值
调用时的参数会透传到before方法的参数中, 然后before的return 会作为原方法的参数和after的参数after最后一个个参数则是原方法的return值
- **示例:**
@@ -449,7 +449,7 @@ editorService.usePlugin({
type: 'button',
}];
},
afterAdd(result, value) {
afterAdd(value, result) {
console.log(value) // { type: 'button' }
console.log('after add');
},