@tmagic/editor 1.2.1 → 1.2.3
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.2.
|
|
2
|
+
"version": "1.2.3",
|
|
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.3",
|
|
50
|
+
"@tmagic/design": "1.2.3",
|
|
51
|
+
"@tmagic/form": "1.2.3",
|
|
52
|
+
"@tmagic/schema": "1.2.3",
|
|
53
|
+
"@tmagic/stage": "1.2.3",
|
|
54
|
+
"@tmagic/utils": "1.2.3",
|
|
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.3",
|
|
67
|
+
"@tmagic/form": "1.2.3",
|
|
68
68
|
"monaco-editor": "^0.34.0",
|
|
69
69
|
"vue": "^3.2.37"
|
|
70
70
|
},
|
package/src/services/editor.ts
CHANGED
|
@@ -108,8 +108,8 @@ class Editor extends BaseService {
|
|
|
108
108
|
throw new Error('root 不能为数组');
|
|
109
109
|
}
|
|
110
110
|
|
|
111
|
-
if (isObject(value) && !(value instanceof StageCore) && !(value instanceof Map)) {
|
|
112
|
-
this.state.pageLength = value.items
|
|
111
|
+
if (value && isObject(value) && !(value instanceof StageCore) && !(value instanceof Map)) {
|
|
112
|
+
this.state.pageLength = value.items?.length || 0;
|
|
113
113
|
} else {
|
|
114
114
|
this.state.pageLength = 0;
|
|
115
115
|
}
|