@tmagic/editor 1.3.0-alpha.15 → 1.3.0-alpha.16
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/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.3.0-alpha.
|
|
2
|
+
"version": "1.3.0-alpha.16",
|
|
3
3
|
"name": "@tmagic/editor",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": [
|
|
@@ -46,26 +46,26 @@
|
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"@babel/core": "^7.18.0",
|
|
48
48
|
"@element-plus/icons-vue": "^2.0.9",
|
|
49
|
-
"@tmagic/core": "1.3.0-alpha.
|
|
50
|
-
"@tmagic/design": "1.3.0-alpha.
|
|
51
|
-
"@tmagic/form": "1.3.0-alpha.
|
|
52
|
-
"@tmagic/schema": "1.3.0-alpha.
|
|
53
|
-
"@tmagic/stage": "1.3.0-alpha.
|
|
54
|
-
"@tmagic/table": "1.3.0-alpha.
|
|
55
|
-
"@tmagic/utils": "1.3.0-alpha.
|
|
49
|
+
"@tmagic/core": "1.3.0-alpha.16",
|
|
50
|
+
"@tmagic/design": "1.3.0-alpha.16",
|
|
51
|
+
"@tmagic/form": "1.3.0-alpha.16",
|
|
52
|
+
"@tmagic/schema": "1.3.0-alpha.16",
|
|
53
|
+
"@tmagic/stage": "1.3.0-alpha.16",
|
|
54
|
+
"@tmagic/table": "1.3.0-alpha.16",
|
|
55
|
+
"@tmagic/utils": "1.3.0-alpha.16",
|
|
56
56
|
"buffer": "^6.0.3",
|
|
57
57
|
"color": "^3.1.3",
|
|
58
58
|
"events": "^3.3.0",
|
|
59
|
-
"gesto": "^1.
|
|
60
|
-
"keycon": "^1.
|
|
59
|
+
"gesto": "^1.19.1",
|
|
60
|
+
"keycon": "^1.4.0",
|
|
61
61
|
"lodash-es": "^4.17.21",
|
|
62
62
|
"monaco-editor": "^0.39.0",
|
|
63
63
|
"serialize-javascript": "^6.0.0",
|
|
64
64
|
"vue": "^3.3.4"
|
|
65
65
|
},
|
|
66
66
|
"peerDependencies": {
|
|
67
|
-
"@tmagic/design": "1.3.0-alpha.
|
|
68
|
-
"@tmagic/form": "1.3.0-alpha.
|
|
67
|
+
"@tmagic/design": "1.3.0-alpha.16",
|
|
68
|
+
"@tmagic/form": "1.3.0-alpha.16",
|
|
69
69
|
"monaco-editor": "^0.39.0",
|
|
70
70
|
"vue": "^3.3.4"
|
|
71
71
|
},
|
package/src/services/dep.ts
CHANGED
|
@@ -19,7 +19,7 @@ import { EventEmitter } from 'events';
|
|
|
19
19
|
|
|
20
20
|
import { reactive } from 'vue';
|
|
21
21
|
|
|
22
|
-
import { MNode } from '@tmagic/schema';
|
|
22
|
+
import { Id, MNode } from '@tmagic/schema';
|
|
23
23
|
|
|
24
24
|
type IsTarget = (key: string | number, value: any) => boolean;
|
|
25
25
|
|
|
@@ -277,13 +277,15 @@ export class Watcher extends EventEmitter {
|
|
|
277
277
|
* @param nodes 需要清除依赖的节点
|
|
278
278
|
*/
|
|
279
279
|
public clear(nodes?: MNode[]) {
|
|
280
|
+
const clearedItemsNodeIds: Id[] = [];
|
|
280
281
|
Object.values(this.targets).forEach((targets) => {
|
|
281
282
|
Object.values(targets).forEach((target) => {
|
|
282
283
|
if (nodes) {
|
|
283
284
|
nodes.forEach((node) => {
|
|
284
285
|
target.removeDep(node);
|
|
285
286
|
|
|
286
|
-
if (Array.isArray(node.items)) {
|
|
287
|
+
if (Array.isArray(node.items) && node.items.length && !clearedItemsNodeIds.includes(node.id)) {
|
|
288
|
+
clearedItemsNodeIds.push(node.id);
|
|
287
289
|
this.clear(node.items);
|
|
288
290
|
}
|
|
289
291
|
});
|