@tmagic/editor 1.2.5 → 1.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/style.css +1 -2
- package/dist/tmagic-editor.js +10 -0
- package/dist/tmagic-editor.js.map +1 -1
- package/dist/tmagic-editor.umd.cjs +10 -0
- package/dist/tmagic-editor.umd.cjs.map +1 -1
- package/package.json +9 -9
- package/src/layouts/sidebar/code-block/CodeBlockList.vue +3 -0
- package/src/theme/nav-menu.scss +1 -2
- package/src/utils/stage.ts +9 -1
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.2.
|
|
2
|
+
"version": "1.2.7",
|
|
3
3
|
"name": "@tmagic/editor",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": [
|
|
@@ -46,12 +46,12 @@
|
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"@babel/core": "^7.18.0",
|
|
48
48
|
"@element-plus/icons-vue": "^2.0.9",
|
|
49
|
-
"@tmagic/core": "1.2.
|
|
50
|
-
"@tmagic/design": "1.2.
|
|
51
|
-
"@tmagic/form": "1.2.
|
|
52
|
-
"@tmagic/schema": "1.2.
|
|
53
|
-
"@tmagic/stage": "1.2.
|
|
54
|
-
"@tmagic/utils": "1.2.
|
|
49
|
+
"@tmagic/core": "1.2.7",
|
|
50
|
+
"@tmagic/design": "1.2.7",
|
|
51
|
+
"@tmagic/form": "1.2.7",
|
|
52
|
+
"@tmagic/schema": "1.2.7",
|
|
53
|
+
"@tmagic/stage": "1.2.7",
|
|
54
|
+
"@tmagic/utils": "1.2.7",
|
|
55
55
|
"buffer": "^6.0.3",
|
|
56
56
|
"color": "^3.1.3",
|
|
57
57
|
"events": "^3.3.0",
|
|
@@ -63,8 +63,8 @@
|
|
|
63
63
|
"vue": "^3.2.37"
|
|
64
64
|
},
|
|
65
65
|
"peerDependencies": {
|
|
66
|
-
"@tmagic/design": "1.2.
|
|
67
|
-
"@tmagic/form": "1.2.
|
|
66
|
+
"@tmagic/design": "1.2.7",
|
|
67
|
+
"@tmagic/form": "1.2.7",
|
|
68
68
|
"monaco-editor": "^0.34.0",
|
|
69
69
|
"vue": "^3.2.37"
|
|
70
70
|
},
|
package/src/theme/nav-menu.scss
CHANGED
package/src/utils/stage.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { computed } from 'vue';
|
|
2
2
|
|
|
3
|
-
import StageCore, { GuidesType, SortEventData, UpdateEventData } from '@tmagic/stage';
|
|
3
|
+
import StageCore, { GuidesType, RemoveEventData, SortEventData, UpdateEventData } from '@tmagic/stage';
|
|
4
4
|
|
|
5
5
|
import editorService from '../services/editor';
|
|
6
6
|
import uiService from '../services/ui';
|
|
@@ -73,6 +73,14 @@ export const useStage = (stageOptions: StageOptions) => {
|
|
|
73
73
|
editorService.sort(ev.src, ev.dist);
|
|
74
74
|
});
|
|
75
75
|
|
|
76
|
+
stage.on('remove', (ev: RemoveEventData) => {
|
|
77
|
+
editorService.remove(
|
|
78
|
+
ev.data.map(({ el }) => ({
|
|
79
|
+
id: el.id,
|
|
80
|
+
})),
|
|
81
|
+
);
|
|
82
|
+
});
|
|
83
|
+
|
|
76
84
|
stage.on('select-parent', () => {
|
|
77
85
|
const parent = editorService.get('parent');
|
|
78
86
|
if (!parent) throw new Error('父节点为空');
|