@tmagic/editor 1.7.0-beta.3 → 1.7.0-beta.4
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/tmagic-editor.js +109 -69
- package/dist/tmagic-editor.umd.cjs +109 -69
- package/package.json +13 -14
- package/src/fields/DataSourceInput.vue +23 -4
- package/src/layouts/workspace/viewer/Stage.vue +1 -1
- package/types/index.d.ts +2 -2
package/dist/tmagic-editor.js
CHANGED
|
@@ -343,7 +343,8 @@ const _sfc_main$1p = /* @__PURE__ */ defineComponent({
|
|
|
343
343
|
prop: {},
|
|
344
344
|
disabled: { type: Boolean, default: false },
|
|
345
345
|
size: {},
|
|
346
|
-
lastValues: {}
|
|
346
|
+
lastValues: {},
|
|
347
|
+
isCompare: { type: Boolean }
|
|
347
348
|
},
|
|
348
349
|
emits: ["change"],
|
|
349
350
|
setup(__props, { emit: __emit }) {
|
|
@@ -381,7 +382,8 @@ const _sfc_main$1o = /* @__PURE__ */ defineComponent({
|
|
|
381
382
|
prop: {},
|
|
382
383
|
disabled: { type: Boolean },
|
|
383
384
|
size: {},
|
|
384
|
-
lastValues: {}
|
|
385
|
+
lastValues: {},
|
|
386
|
+
isCompare: { type: Boolean }
|
|
385
387
|
},
|
|
386
388
|
emits: ["change"],
|
|
387
389
|
setup(__props, { emit: __emit }) {
|
|
@@ -468,7 +470,8 @@ const _sfc_main$1n = /* @__PURE__ */ defineComponent({
|
|
|
468
470
|
prop: {},
|
|
469
471
|
disabled: { type: Boolean },
|
|
470
472
|
size: {},
|
|
471
|
-
lastValues: {}
|
|
473
|
+
lastValues: {},
|
|
474
|
+
isCompare: { type: Boolean }
|
|
472
475
|
},
|
|
473
476
|
emits: ["change"],
|
|
474
477
|
setup(__props, { emit: __emit }) {
|
|
@@ -3278,7 +3281,8 @@ const _sfc_main$1l = /* @__PURE__ */ defineComponent({
|
|
|
3278
3281
|
prop: {},
|
|
3279
3282
|
disabled: { type: Boolean, default: false },
|
|
3280
3283
|
size: {},
|
|
3281
|
-
lastValues: {}
|
|
3284
|
+
lastValues: {},
|
|
3285
|
+
isCompare: { type: Boolean }
|
|
3282
3286
|
},
|
|
3283
3287
|
emits: ["change"],
|
|
3284
3288
|
setup(__props, { emit: __emit }) {
|
|
@@ -3409,7 +3413,8 @@ const _sfc_main$1k = /* @__PURE__ */ defineComponent({
|
|
|
3409
3413
|
prop: {},
|
|
3410
3414
|
disabled: { type: Boolean },
|
|
3411
3415
|
size: {},
|
|
3412
|
-
lastValues: {}
|
|
3416
|
+
lastValues: {},
|
|
3417
|
+
isCompare: { type: Boolean }
|
|
3413
3418
|
},
|
|
3414
3419
|
emits: ["change"],
|
|
3415
3420
|
setup(__props, { emit: __emit }) {
|
|
@@ -4206,7 +4211,8 @@ const _sfc_main$1i = /* @__PURE__ */ defineComponent({
|
|
|
4206
4211
|
prop: {},
|
|
4207
4212
|
disabled: { type: Boolean, default: false },
|
|
4208
4213
|
size: {},
|
|
4209
|
-
lastValues: {}
|
|
4214
|
+
lastValues: {},
|
|
4215
|
+
isCompare: { type: Boolean }
|
|
4210
4216
|
}, {
|
|
4211
4217
|
"width": { default: 670 },
|
|
4212
4218
|
"widthModifiers": {},
|
|
@@ -4748,7 +4754,8 @@ const _sfc_main$1g = /* @__PURE__ */ defineComponent({
|
|
|
4748
4754
|
prop: {},
|
|
4749
4755
|
disabled: { type: Boolean, default: false },
|
|
4750
4756
|
size: {},
|
|
4751
|
-
lastValues: {}
|
|
4757
|
+
lastValues: {},
|
|
4758
|
+
isCompare: { type: Boolean }
|
|
4752
4759
|
},
|
|
4753
4760
|
emits: ["change"],
|
|
4754
4761
|
setup(__props, { emit: __emit }) {
|
|
@@ -4887,7 +4894,6 @@ const _sfc_main$1g = /* @__PURE__ */ defineComponent({
|
|
|
4887
4894
|
|
|
4888
4895
|
const _hoisted_1$U = { style: { "display": "flex", "flex-direction": "column", "line-height": "1.2em" } };
|
|
4889
4896
|
const _hoisted_2$l = { style: { "font-size": "10px", "color": "rgba(0, 0, 0, 0.6)" } };
|
|
4890
|
-
const _hoisted_3$8 = { class: "el-input__inner t-input__inner" };
|
|
4891
4897
|
const _sfc_main$1f = /* @__PURE__ */ defineComponent({
|
|
4892
4898
|
...{
|
|
4893
4899
|
name: "MFieldsDataSourceInput"
|
|
@@ -4902,12 +4908,14 @@ const _sfc_main$1f = /* @__PURE__ */ defineComponent({
|
|
|
4902
4908
|
prop: {},
|
|
4903
4909
|
disabled: { type: Boolean, default: false },
|
|
4904
4910
|
size: {},
|
|
4905
|
-
lastValues: {}
|
|
4911
|
+
lastValues: {},
|
|
4912
|
+
isCompare: { type: Boolean }
|
|
4906
4913
|
},
|
|
4907
4914
|
emits: ["change"],
|
|
4908
4915
|
setup(__props, { emit: __emit }) {
|
|
4909
4916
|
const props = __props;
|
|
4910
4917
|
const emit = __emit;
|
|
4918
|
+
const adapterType = getDesignConfig("adapterType");
|
|
4911
4919
|
const { dataSourceService, propsService } = useServices();
|
|
4912
4920
|
const autocompleteRef = useTemplateRef("autocomplete");
|
|
4913
4921
|
const isFocused = ref(false);
|
|
@@ -5122,62 +5130,83 @@ const _sfc_main$1f = /* @__PURE__ */ defineComponent({
|
|
|
5122
5130
|
"div",
|
|
5123
5131
|
{
|
|
5124
5132
|
key: 2,
|
|
5125
|
-
class: normalizeClass(
|
|
5133
|
+
class: normalizeClass({
|
|
5134
|
+
"tmagic-data-source-input-text": true,
|
|
5135
|
+
"el-input": unref(adapterType) === "element-plus",
|
|
5136
|
+
[`el-input--${__props.size}`]: unref(adapterType) === "element-plus",
|
|
5137
|
+
"t-input": unref(adapterType) === "tdesign-vue-next",
|
|
5138
|
+
[`t-size-${__props.size?.[0]}`]: unref(adapterType) === "tdesign-vue-next"
|
|
5139
|
+
}),
|
|
5126
5140
|
onMouseup: mouseupHandler
|
|
5127
5141
|
},
|
|
5128
5142
|
[
|
|
5129
5143
|
createElementVNode(
|
|
5130
5144
|
"div",
|
|
5131
5145
|
{
|
|
5132
|
-
class: normalizeClass(
|
|
5146
|
+
class: normalizeClass({
|
|
5147
|
+
"tmagic-data-source-input-text-wrapper": true,
|
|
5148
|
+
"el-input__wrapper": unref(adapterType) === "element-plus",
|
|
5149
|
+
"is-focus": isFocused.value
|
|
5150
|
+
})
|
|
5133
5151
|
},
|
|
5134
5152
|
[
|
|
5135
|
-
createElementVNode(
|
|
5136
|
-
|
|
5137
|
-
|
|
5138
|
-
|
|
5139
|
-
|
|
5140
|
-
|
|
5141
|
-
|
|
5142
|
-
|
|
5143
|
-
|
|
5144
|
-
|
|
5145
|
-
|
|
5146
|
-
|
|
5153
|
+
createElementVNode(
|
|
5154
|
+
"div",
|
|
5155
|
+
{
|
|
5156
|
+
class: normalizeClass({
|
|
5157
|
+
"el-input__inner": unref(adapterType) === "element-plus",
|
|
5158
|
+
input__inner: unref(adapterType) === "tdesign-vue-next"
|
|
5159
|
+
})
|
|
5160
|
+
},
|
|
5161
|
+
[
|
|
5162
|
+
(openBlock(true), createElementBlock(
|
|
5163
|
+
Fragment,
|
|
5164
|
+
null,
|
|
5165
|
+
renderList(displayState.value, (item, index) => {
|
|
5166
|
+
return openBlock(), createElementBlock(
|
|
5167
|
+
Fragment,
|
|
5168
|
+
null,
|
|
5169
|
+
[
|
|
5170
|
+
item.type === "text" ? (openBlock(), createElementBlock(
|
|
5171
|
+
"span",
|
|
5172
|
+
{
|
|
5173
|
+
key: index,
|
|
5174
|
+
style: { "margin-right": "2px" }
|
|
5175
|
+
},
|
|
5176
|
+
toDisplayString(item.value),
|
|
5177
|
+
1
|
|
5178
|
+
/* TEXT */
|
|
5179
|
+
)) : createCommentVNode("v-if", true),
|
|
5180
|
+
item.type === "var" ? (openBlock(), createBlock(unref(TMagicTag), {
|
|
5147
5181
|
key: index,
|
|
5148
|
-
|
|
5149
|
-
},
|
|
5150
|
-
|
|
5151
|
-
|
|
5152
|
-
|
|
5153
|
-
|
|
5154
|
-
|
|
5155
|
-
|
|
5156
|
-
|
|
5157
|
-
|
|
5158
|
-
|
|
5159
|
-
|
|
5160
|
-
|
|
5161
|
-
|
|
5162
|
-
|
|
5163
|
-
|
|
5164
|
-
|
|
5165
|
-
|
|
5166
|
-
|
|
5167
|
-
|
|
5168
|
-
|
|
5169
|
-
|
|
5170
|
-
|
|
5171
|
-
|
|
5172
|
-
|
|
5173
|
-
|
|
5174
|
-
|
|
5175
|
-
|
|
5176
|
-
createVNode(_sfc_main$1r, {
|
|
5177
|
-
class: "tmagic-data-source-input-icon",
|
|
5178
|
-
icon: unref(Coin)
|
|
5179
|
-
}, null, 8, ["icon"])
|
|
5180
|
-
])
|
|
5182
|
+
size: __props.size
|
|
5183
|
+
}, {
|
|
5184
|
+
default: withCtx(() => [
|
|
5185
|
+
createTextVNode(
|
|
5186
|
+
toDisplayString(item.value),
|
|
5187
|
+
1
|
|
5188
|
+
/* TEXT */
|
|
5189
|
+
)
|
|
5190
|
+
]),
|
|
5191
|
+
_: 2
|
|
5192
|
+
/* DYNAMIC */
|
|
5193
|
+
}, 1032, ["size"])) : createCommentVNode("v-if", true)
|
|
5194
|
+
],
|
|
5195
|
+
64
|
|
5196
|
+
/* STABLE_FRAGMENT */
|
|
5197
|
+
);
|
|
5198
|
+
}),
|
|
5199
|
+
256
|
|
5200
|
+
/* UNKEYED_FRAGMENT */
|
|
5201
|
+
)),
|
|
5202
|
+
createVNode(_sfc_main$1r, {
|
|
5203
|
+
class: "tmagic-data-source-input-icon",
|
|
5204
|
+
icon: unref(Coin)
|
|
5205
|
+
}, null, 8, ["icon"])
|
|
5206
|
+
],
|
|
5207
|
+
2
|
|
5208
|
+
/* CLASS */
|
|
5209
|
+
)
|
|
5181
5210
|
],
|
|
5182
5211
|
2
|
|
5183
5212
|
/* CLASS */
|
|
@@ -5547,7 +5576,8 @@ const _sfc_main$1d = /* @__PURE__ */ defineComponent({
|
|
|
5547
5576
|
prop: {},
|
|
5548
5577
|
disabled: { type: Boolean, default: false },
|
|
5549
5578
|
size: {},
|
|
5550
|
-
lastValues: {}
|
|
5579
|
+
lastValues: {},
|
|
5580
|
+
isCompare: { type: Boolean }
|
|
5551
5581
|
},
|
|
5552
5582
|
emits: ["change"],
|
|
5553
5583
|
setup(__props, { emit: __emit }) {
|
|
@@ -5705,7 +5735,8 @@ const _sfc_main$1c = /* @__PURE__ */ defineComponent({
|
|
|
5705
5735
|
prop: {},
|
|
5706
5736
|
disabled: { type: Boolean, default: false },
|
|
5707
5737
|
size: {},
|
|
5708
|
-
lastValues: {}
|
|
5738
|
+
lastValues: {},
|
|
5739
|
+
isCompare: { type: Boolean }
|
|
5709
5740
|
},
|
|
5710
5741
|
emits: ["change"],
|
|
5711
5742
|
setup(__props, { emit: __emit }) {
|
|
@@ -5845,7 +5876,8 @@ const _sfc_main$1b = /* @__PURE__ */ defineComponent({
|
|
|
5845
5876
|
prop: {},
|
|
5846
5877
|
disabled: { type: Boolean, default: false },
|
|
5847
5878
|
size: {},
|
|
5848
|
-
lastValues: {}
|
|
5879
|
+
lastValues: {},
|
|
5880
|
+
isCompare: { type: Boolean }
|
|
5849
5881
|
}, {
|
|
5850
5882
|
"width": { default: 670 },
|
|
5851
5883
|
"widthModifiers": {},
|
|
@@ -6102,7 +6134,8 @@ const _sfc_main$1a = /* @__PURE__ */ defineComponent({
|
|
|
6102
6134
|
prop: {},
|
|
6103
6135
|
disabled: { type: Boolean, default: false },
|
|
6104
6136
|
size: {},
|
|
6105
|
-
lastValues: {}
|
|
6137
|
+
lastValues: {},
|
|
6138
|
+
isCompare: { type: Boolean }
|
|
6106
6139
|
},
|
|
6107
6140
|
emits: ["change"],
|
|
6108
6141
|
setup(__props, { emit: __emit }) {
|
|
@@ -6197,7 +6230,8 @@ const _sfc_main$19 = /* @__PURE__ */ defineComponent({
|
|
|
6197
6230
|
prop: {},
|
|
6198
6231
|
disabled: { type: Boolean, default: false },
|
|
6199
6232
|
size: {},
|
|
6200
|
-
lastValues: {}
|
|
6233
|
+
lastValues: {},
|
|
6234
|
+
isCompare: { type: Boolean }
|
|
6201
6235
|
},
|
|
6202
6236
|
emits: ["change"],
|
|
6203
6237
|
setup(__props, { emit: __emit }) {
|
|
@@ -6334,7 +6368,8 @@ const _sfc_main$18 = /* @__PURE__ */ defineComponent({
|
|
|
6334
6368
|
prop: {},
|
|
6335
6369
|
disabled: { type: Boolean },
|
|
6336
6370
|
size: {},
|
|
6337
|
-
lastValues: {}
|
|
6371
|
+
lastValues: {},
|
|
6372
|
+
isCompare: { type: Boolean }
|
|
6338
6373
|
},
|
|
6339
6374
|
emits: ["change"],
|
|
6340
6375
|
setup(__props, { emit: __emit }) {
|
|
@@ -6705,7 +6740,8 @@ const _sfc_main$16 = /* @__PURE__ */ defineComponent({
|
|
|
6705
6740
|
prop: {},
|
|
6706
6741
|
disabled: { type: Boolean, default: false },
|
|
6707
6742
|
size: {},
|
|
6708
|
-
lastValues: {}
|
|
6743
|
+
lastValues: {},
|
|
6744
|
+
isCompare: { type: Boolean }
|
|
6709
6745
|
},
|
|
6710
6746
|
emits: ["change"],
|
|
6711
6747
|
setup(__props, { emit: __emit }) {
|
|
@@ -6860,7 +6896,8 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
|
|
|
6860
6896
|
prop: {},
|
|
6861
6897
|
disabled: { type: Boolean, default: false },
|
|
6862
6898
|
size: {},
|
|
6863
|
-
lastValues: {}
|
|
6899
|
+
lastValues: {},
|
|
6900
|
+
isCompare: { type: Boolean }
|
|
6864
6901
|
},
|
|
6865
6902
|
emits: ["change"],
|
|
6866
6903
|
setup(__props, { emit: __emit }) {
|
|
@@ -6929,7 +6966,8 @@ const _sfc_main$14 = /* @__PURE__ */ defineComponent({
|
|
|
6929
6966
|
prop: {},
|
|
6930
6967
|
disabled: { type: Boolean },
|
|
6931
6968
|
size: {},
|
|
6932
|
-
lastValues: {}
|
|
6969
|
+
lastValues: {},
|
|
6970
|
+
isCompare: { type: Boolean }
|
|
6933
6971
|
},
|
|
6934
6972
|
emits: ["change"],
|
|
6935
6973
|
setup(__props, { emit: __emit }) {
|
|
@@ -8084,7 +8122,8 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
|
8084
8122
|
prop: {},
|
|
8085
8123
|
disabled: { type: Boolean },
|
|
8086
8124
|
size: {},
|
|
8087
|
-
lastValues: {}
|
|
8125
|
+
lastValues: {},
|
|
8126
|
+
isCompare: { type: Boolean }
|
|
8088
8127
|
},
|
|
8089
8128
|
emits: ["change"],
|
|
8090
8129
|
setup(__props, { emit: __emit }) {
|
|
@@ -8188,7 +8227,8 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
|
8188
8227
|
prop: {},
|
|
8189
8228
|
disabled: { type: Boolean },
|
|
8190
8229
|
size: {},
|
|
8191
|
-
lastValues: {}
|
|
8230
|
+
lastValues: {},
|
|
8231
|
+
isCompare: { type: Boolean }
|
|
8192
8232
|
},
|
|
8193
8233
|
emits: ["change"],
|
|
8194
8234
|
setup(__props, { emit: __emit }) {
|
|
@@ -13586,7 +13626,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
13586
13626
|
);
|
|
13587
13627
|
}
|
|
13588
13628
|
});
|
|
13589
|
-
const resizeObserver = new ResizeObserver((entries) => {
|
|
13629
|
+
const resizeObserver = new globalThis.ResizeObserver((entries) => {
|
|
13590
13630
|
for (const { contentRect } of entries) {
|
|
13591
13631
|
uiService.set("stageContainerRect", {
|
|
13592
13632
|
width: contentRect.width,
|
|
@@ -14901,7 +14941,7 @@ const jsContent = `(function () {
|
|
|
14901
14941
|
return keys.some((key, index) => {
|
|
14902
14942
|
const field = f.find(({ name }) => name === key);
|
|
14903
14943
|
f = field?.fields || [];
|
|
14904
|
-
return field
|
|
14944
|
+
return field?.type === "array" && // 不是整数
|
|
14905
14945
|
/^(?!\\d+$).*$/.test(\`\${keys[index + 1]}\`) && index < keys.length - 1;
|
|
14906
14946
|
});
|
|
14907
14947
|
};
|
|
@@ -5136,7 +5136,8 @@
|
|
|
5136
5136
|
prop: {},
|
|
5137
5137
|
disabled: { type: Boolean, default: false },
|
|
5138
5138
|
size: {},
|
|
5139
|
-
lastValues: {}
|
|
5139
|
+
lastValues: {},
|
|
5140
|
+
isCompare: { type: Boolean }
|
|
5140
5141
|
},
|
|
5141
5142
|
emits: ["change"],
|
|
5142
5143
|
setup(__props, { emit: __emit }) {
|
|
@@ -5174,7 +5175,8 @@
|
|
|
5174
5175
|
prop: {},
|
|
5175
5176
|
disabled: { type: Boolean },
|
|
5176
5177
|
size: {},
|
|
5177
|
-
lastValues: {}
|
|
5178
|
+
lastValues: {},
|
|
5179
|
+
isCompare: { type: Boolean }
|
|
5178
5180
|
},
|
|
5179
5181
|
emits: ["change"],
|
|
5180
5182
|
setup(__props, { emit: __emit }) {
|
|
@@ -5261,7 +5263,8 @@
|
|
|
5261
5263
|
prop: {},
|
|
5262
5264
|
disabled: { type: Boolean },
|
|
5263
5265
|
size: {},
|
|
5264
|
-
lastValues: {}
|
|
5266
|
+
lastValues: {},
|
|
5267
|
+
isCompare: { type: Boolean }
|
|
5265
5268
|
},
|
|
5266
5269
|
emits: ["change"],
|
|
5267
5270
|
setup(__props, { emit: __emit }) {
|
|
@@ -8071,7 +8074,8 @@
|
|
|
8071
8074
|
prop: {},
|
|
8072
8075
|
disabled: { type: Boolean, default: false },
|
|
8073
8076
|
size: {},
|
|
8074
|
-
lastValues: {}
|
|
8077
|
+
lastValues: {},
|
|
8078
|
+
isCompare: { type: Boolean }
|
|
8075
8079
|
},
|
|
8076
8080
|
emits: ["change"],
|
|
8077
8081
|
setup(__props, { emit: __emit }) {
|
|
@@ -8202,7 +8206,8 @@
|
|
|
8202
8206
|
prop: {},
|
|
8203
8207
|
disabled: { type: Boolean },
|
|
8204
8208
|
size: {},
|
|
8205
|
-
lastValues: {}
|
|
8209
|
+
lastValues: {},
|
|
8210
|
+
isCompare: { type: Boolean }
|
|
8206
8211
|
},
|
|
8207
8212
|
emits: ["change"],
|
|
8208
8213
|
setup(__props, { emit: __emit }) {
|
|
@@ -8999,7 +9004,8 @@
|
|
|
8999
9004
|
prop: {},
|
|
9000
9005
|
disabled: { type: Boolean, default: false },
|
|
9001
9006
|
size: {},
|
|
9002
|
-
lastValues: {}
|
|
9007
|
+
lastValues: {},
|
|
9008
|
+
isCompare: { type: Boolean }
|
|
9003
9009
|
}, {
|
|
9004
9010
|
"width": { default: 670 },
|
|
9005
9011
|
"widthModifiers": {},
|
|
@@ -9541,7 +9547,8 @@
|
|
|
9541
9547
|
prop: {},
|
|
9542
9548
|
disabled: { type: Boolean, default: false },
|
|
9543
9549
|
size: {},
|
|
9544
|
-
lastValues: {}
|
|
9550
|
+
lastValues: {},
|
|
9551
|
+
isCompare: { type: Boolean }
|
|
9545
9552
|
},
|
|
9546
9553
|
emits: ["change"],
|
|
9547
9554
|
setup(__props, { emit: __emit }) {
|
|
@@ -9680,7 +9687,6 @@
|
|
|
9680
9687
|
|
|
9681
9688
|
const _hoisted_1$U = { style: { "display": "flex", "flex-direction": "column", "line-height": "1.2em" } };
|
|
9682
9689
|
const _hoisted_2$l = { style: { "font-size": "10px", "color": "rgba(0, 0, 0, 0.6)" } };
|
|
9683
|
-
const _hoisted_3$8 = { class: "el-input__inner t-input__inner" };
|
|
9684
9690
|
const _sfc_main$1f = /* @__PURE__ */ vue.defineComponent({
|
|
9685
9691
|
...{
|
|
9686
9692
|
name: "MFieldsDataSourceInput"
|
|
@@ -9695,12 +9701,14 @@
|
|
|
9695
9701
|
prop: {},
|
|
9696
9702
|
disabled: { type: Boolean, default: false },
|
|
9697
9703
|
size: {},
|
|
9698
|
-
lastValues: {}
|
|
9704
|
+
lastValues: {},
|
|
9705
|
+
isCompare: { type: Boolean }
|
|
9699
9706
|
},
|
|
9700
9707
|
emits: ["change"],
|
|
9701
9708
|
setup(__props, { emit: __emit }) {
|
|
9702
9709
|
const props = __props;
|
|
9703
9710
|
const emit = __emit;
|
|
9711
|
+
const adapterType = designPlugin.getDesignConfig("adapterType");
|
|
9704
9712
|
const { dataSourceService, propsService } = useServices();
|
|
9705
9713
|
const autocompleteRef = vue.useTemplateRef("autocomplete");
|
|
9706
9714
|
const isFocused = vue.ref(false);
|
|
@@ -9915,62 +9923,83 @@
|
|
|
9915
9923
|
"div",
|
|
9916
9924
|
{
|
|
9917
9925
|
key: 2,
|
|
9918
|
-
class: vue.normalizeClass(
|
|
9926
|
+
class: vue.normalizeClass({
|
|
9927
|
+
"tmagic-data-source-input-text": true,
|
|
9928
|
+
"el-input": vue.unref(adapterType) === "element-plus",
|
|
9929
|
+
[`el-input--${__props.size}`]: vue.unref(adapterType) === "element-plus",
|
|
9930
|
+
"t-input": vue.unref(adapterType) === "tdesign-vue-next",
|
|
9931
|
+
[`t-size-${__props.size?.[0]}`]: vue.unref(adapterType) === "tdesign-vue-next"
|
|
9932
|
+
}),
|
|
9919
9933
|
onMouseup: mouseupHandler
|
|
9920
9934
|
},
|
|
9921
9935
|
[
|
|
9922
9936
|
vue.createElementVNode(
|
|
9923
9937
|
"div",
|
|
9924
9938
|
{
|
|
9925
|
-
class: vue.normalizeClass(
|
|
9939
|
+
class: vue.normalizeClass({
|
|
9940
|
+
"tmagic-data-source-input-text-wrapper": true,
|
|
9941
|
+
"el-input__wrapper": vue.unref(adapterType) === "element-plus",
|
|
9942
|
+
"is-focus": isFocused.value
|
|
9943
|
+
})
|
|
9926
9944
|
},
|
|
9927
9945
|
[
|
|
9928
|
-
vue.createElementVNode(
|
|
9929
|
-
|
|
9930
|
-
|
|
9931
|
-
|
|
9932
|
-
|
|
9933
|
-
|
|
9934
|
-
|
|
9935
|
-
|
|
9936
|
-
|
|
9937
|
-
|
|
9938
|
-
|
|
9939
|
-
|
|
9946
|
+
vue.createElementVNode(
|
|
9947
|
+
"div",
|
|
9948
|
+
{
|
|
9949
|
+
class: vue.normalizeClass({
|
|
9950
|
+
"el-input__inner": vue.unref(adapterType) === "element-plus",
|
|
9951
|
+
input__inner: vue.unref(adapterType) === "tdesign-vue-next"
|
|
9952
|
+
})
|
|
9953
|
+
},
|
|
9954
|
+
[
|
|
9955
|
+
(vue.openBlock(true), vue.createElementBlock(
|
|
9956
|
+
vue.Fragment,
|
|
9957
|
+
null,
|
|
9958
|
+
vue.renderList(displayState.value, (item, index) => {
|
|
9959
|
+
return vue.openBlock(), vue.createElementBlock(
|
|
9960
|
+
vue.Fragment,
|
|
9961
|
+
null,
|
|
9962
|
+
[
|
|
9963
|
+
item.type === "text" ? (vue.openBlock(), vue.createElementBlock(
|
|
9964
|
+
"span",
|
|
9965
|
+
{
|
|
9966
|
+
key: index,
|
|
9967
|
+
style: { "margin-right": "2px" }
|
|
9968
|
+
},
|
|
9969
|
+
vue.toDisplayString(item.value),
|
|
9970
|
+
1
|
|
9971
|
+
/* TEXT */
|
|
9972
|
+
)) : vue.createCommentVNode("v-if", true),
|
|
9973
|
+
item.type === "var" ? (vue.openBlock(), vue.createBlock(vue.unref(designPlugin.TMagicTag), {
|
|
9940
9974
|
key: index,
|
|
9941
|
-
|
|
9942
|
-
},
|
|
9943
|
-
|
|
9944
|
-
|
|
9945
|
-
|
|
9946
|
-
|
|
9947
|
-
|
|
9948
|
-
|
|
9949
|
-
|
|
9950
|
-
|
|
9951
|
-
|
|
9952
|
-
|
|
9953
|
-
|
|
9954
|
-
|
|
9955
|
-
|
|
9956
|
-
|
|
9957
|
-
|
|
9958
|
-
|
|
9959
|
-
|
|
9960
|
-
|
|
9961
|
-
|
|
9962
|
-
|
|
9963
|
-
|
|
9964
|
-
|
|
9965
|
-
|
|
9966
|
-
|
|
9967
|
-
|
|
9968
|
-
|
|
9969
|
-
vue.createVNode(_sfc_main$1r, {
|
|
9970
|
-
class: "tmagic-data-source-input-icon",
|
|
9971
|
-
icon: vue.unref(iconsVue.Coin)
|
|
9972
|
-
}, null, 8, ["icon"])
|
|
9973
|
-
])
|
|
9975
|
+
size: __props.size
|
|
9976
|
+
}, {
|
|
9977
|
+
default: vue.withCtx(() => [
|
|
9978
|
+
vue.createTextVNode(
|
|
9979
|
+
vue.toDisplayString(item.value),
|
|
9980
|
+
1
|
|
9981
|
+
/* TEXT */
|
|
9982
|
+
)
|
|
9983
|
+
]),
|
|
9984
|
+
_: 2
|
|
9985
|
+
/* DYNAMIC */
|
|
9986
|
+
}, 1032, ["size"])) : vue.createCommentVNode("v-if", true)
|
|
9987
|
+
],
|
|
9988
|
+
64
|
|
9989
|
+
/* STABLE_FRAGMENT */
|
|
9990
|
+
);
|
|
9991
|
+
}),
|
|
9992
|
+
256
|
|
9993
|
+
/* UNKEYED_FRAGMENT */
|
|
9994
|
+
)),
|
|
9995
|
+
vue.createVNode(_sfc_main$1r, {
|
|
9996
|
+
class: "tmagic-data-source-input-icon",
|
|
9997
|
+
icon: vue.unref(iconsVue.Coin)
|
|
9998
|
+
}, null, 8, ["icon"])
|
|
9999
|
+
],
|
|
10000
|
+
2
|
|
10001
|
+
/* CLASS */
|
|
10002
|
+
)
|
|
9974
10003
|
],
|
|
9975
10004
|
2
|
|
9976
10005
|
/* CLASS */
|
|
@@ -10340,7 +10369,8 @@
|
|
|
10340
10369
|
prop: {},
|
|
10341
10370
|
disabled: { type: Boolean, default: false },
|
|
10342
10371
|
size: {},
|
|
10343
|
-
lastValues: {}
|
|
10372
|
+
lastValues: {},
|
|
10373
|
+
isCompare: { type: Boolean }
|
|
10344
10374
|
},
|
|
10345
10375
|
emits: ["change"],
|
|
10346
10376
|
setup(__props, { emit: __emit }) {
|
|
@@ -10498,7 +10528,8 @@
|
|
|
10498
10528
|
prop: {},
|
|
10499
10529
|
disabled: { type: Boolean, default: false },
|
|
10500
10530
|
size: {},
|
|
10501
|
-
lastValues: {}
|
|
10531
|
+
lastValues: {},
|
|
10532
|
+
isCompare: { type: Boolean }
|
|
10502
10533
|
},
|
|
10503
10534
|
emits: ["change"],
|
|
10504
10535
|
setup(__props, { emit: __emit }) {
|
|
@@ -10638,7 +10669,8 @@
|
|
|
10638
10669
|
prop: {},
|
|
10639
10670
|
disabled: { type: Boolean, default: false },
|
|
10640
10671
|
size: {},
|
|
10641
|
-
lastValues: {}
|
|
10672
|
+
lastValues: {},
|
|
10673
|
+
isCompare: { type: Boolean }
|
|
10642
10674
|
}, {
|
|
10643
10675
|
"width": { default: 670 },
|
|
10644
10676
|
"widthModifiers": {},
|
|
@@ -10895,7 +10927,8 @@
|
|
|
10895
10927
|
prop: {},
|
|
10896
10928
|
disabled: { type: Boolean, default: false },
|
|
10897
10929
|
size: {},
|
|
10898
|
-
lastValues: {}
|
|
10930
|
+
lastValues: {},
|
|
10931
|
+
isCompare: { type: Boolean }
|
|
10899
10932
|
},
|
|
10900
10933
|
emits: ["change"],
|
|
10901
10934
|
setup(__props, { emit: __emit }) {
|
|
@@ -10990,7 +11023,8 @@
|
|
|
10990
11023
|
prop: {},
|
|
10991
11024
|
disabled: { type: Boolean, default: false },
|
|
10992
11025
|
size: {},
|
|
10993
|
-
lastValues: {}
|
|
11026
|
+
lastValues: {},
|
|
11027
|
+
isCompare: { type: Boolean }
|
|
10994
11028
|
},
|
|
10995
11029
|
emits: ["change"],
|
|
10996
11030
|
setup(__props, { emit: __emit }) {
|
|
@@ -11127,7 +11161,8 @@
|
|
|
11127
11161
|
prop: {},
|
|
11128
11162
|
disabled: { type: Boolean },
|
|
11129
11163
|
size: {},
|
|
11130
|
-
lastValues: {}
|
|
11164
|
+
lastValues: {},
|
|
11165
|
+
isCompare: { type: Boolean }
|
|
11131
11166
|
},
|
|
11132
11167
|
emits: ["change"],
|
|
11133
11168
|
setup(__props, { emit: __emit }) {
|
|
@@ -11498,7 +11533,8 @@
|
|
|
11498
11533
|
prop: {},
|
|
11499
11534
|
disabled: { type: Boolean, default: false },
|
|
11500
11535
|
size: {},
|
|
11501
|
-
lastValues: {}
|
|
11536
|
+
lastValues: {},
|
|
11537
|
+
isCompare: { type: Boolean }
|
|
11502
11538
|
},
|
|
11503
11539
|
emits: ["change"],
|
|
11504
11540
|
setup(__props, { emit: __emit }) {
|
|
@@ -11653,7 +11689,8 @@
|
|
|
11653
11689
|
prop: {},
|
|
11654
11690
|
disabled: { type: Boolean, default: false },
|
|
11655
11691
|
size: {},
|
|
11656
|
-
lastValues: {}
|
|
11692
|
+
lastValues: {},
|
|
11693
|
+
isCompare: { type: Boolean }
|
|
11657
11694
|
},
|
|
11658
11695
|
emits: ["change"],
|
|
11659
11696
|
setup(__props, { emit: __emit }) {
|
|
@@ -11722,7 +11759,8 @@
|
|
|
11722
11759
|
prop: {},
|
|
11723
11760
|
disabled: { type: Boolean },
|
|
11724
11761
|
size: {},
|
|
11725
|
-
lastValues: {}
|
|
11762
|
+
lastValues: {},
|
|
11763
|
+
isCompare: { type: Boolean }
|
|
11726
11764
|
},
|
|
11727
11765
|
emits: ["change"],
|
|
11728
11766
|
setup(__props, { emit: __emit }) {
|
|
@@ -12877,7 +12915,8 @@
|
|
|
12877
12915
|
prop: {},
|
|
12878
12916
|
disabled: { type: Boolean },
|
|
12879
12917
|
size: {},
|
|
12880
|
-
lastValues: {}
|
|
12918
|
+
lastValues: {},
|
|
12919
|
+
isCompare: { type: Boolean }
|
|
12881
12920
|
},
|
|
12882
12921
|
emits: ["change"],
|
|
12883
12922
|
setup(__props, { emit: __emit }) {
|
|
@@ -12981,7 +13020,8 @@
|
|
|
12981
13020
|
prop: {},
|
|
12982
13021
|
disabled: { type: Boolean },
|
|
12983
13022
|
size: {},
|
|
12984
|
-
lastValues: {}
|
|
13023
|
+
lastValues: {},
|
|
13024
|
+
isCompare: { type: Boolean }
|
|
12985
13025
|
},
|
|
12986
13026
|
emits: ["change"],
|
|
12987
13027
|
setup(__props, { emit: __emit }) {
|
|
@@ -18379,7 +18419,7 @@
|
|
|
18379
18419
|
);
|
|
18380
18420
|
}
|
|
18381
18421
|
});
|
|
18382
|
-
const resizeObserver = new ResizeObserver((entries) => {
|
|
18422
|
+
const resizeObserver = new globalThis.ResizeObserver((entries) => {
|
|
18383
18423
|
for (const { contentRect } of entries) {
|
|
18384
18424
|
uiService.set("stageContainerRect", {
|
|
18385
18425
|
width: contentRect.width,
|
|
@@ -19694,7 +19734,7 @@
|
|
|
19694
19734
|
return keys.some((key, index) => {
|
|
19695
19735
|
const field = f.find(({ name }) => name === key);
|
|
19696
19736
|
f = field?.fields || [];
|
|
19697
|
-
return field
|
|
19737
|
+
return field?.type === "array" && // 不是整数
|
|
19698
19738
|
/^(?!\\d+$).*$/.test(\`\${keys[index + 1]}\`) && index < keys.length - 1;
|
|
19699
19739
|
});
|
|
19700
19740
|
};
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.7.0-beta.
|
|
2
|
+
"version": "1.7.0-beta.4",
|
|
3
3
|
"name": "@tmagic/editor",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": [
|
|
@@ -46,37 +46,36 @@
|
|
|
46
46
|
"typescript"
|
|
47
47
|
],
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@element-plus/icons-vue": "^2.3.
|
|
49
|
+
"@element-plus/icons-vue": "^2.3.2",
|
|
50
50
|
"buffer": "^6.0.3",
|
|
51
|
-
"color": "^3.1.3",
|
|
52
51
|
"deep-object-diff": "^1.1.9",
|
|
53
|
-
"emmet-monaco-es": "^5.
|
|
52
|
+
"emmet-monaco-es": "^5.6.1",
|
|
54
53
|
"events": "^3.3.0",
|
|
55
54
|
"gesto": "^1.19.4",
|
|
56
55
|
"keycon": "^1.4.0",
|
|
57
56
|
"lodash-es": "^4.17.21",
|
|
58
57
|
"moveable": "^0.53.0",
|
|
59
|
-
"serialize-javascript": "^
|
|
58
|
+
"serialize-javascript": "^7.0.0",
|
|
60
59
|
"sortablejs": "^1.15.6",
|
|
61
|
-
"@tmagic/design": "1.7.0-beta.
|
|
62
|
-
"@tmagic/form": "1.7.0-beta.
|
|
63
|
-
"@tmagic/
|
|
64
|
-
"@tmagic/
|
|
65
|
-
"@tmagic/utils": "1.7.0-beta.
|
|
60
|
+
"@tmagic/design": "1.7.0-beta.4",
|
|
61
|
+
"@tmagic/form": "1.7.0-beta.4",
|
|
62
|
+
"@tmagic/table": "1.7.0-beta.4",
|
|
63
|
+
"@tmagic/stage": "1.7.0-beta.4",
|
|
64
|
+
"@tmagic/utils": "1.7.0-beta.4"
|
|
66
65
|
},
|
|
67
66
|
"devDependencies": {
|
|
68
67
|
"@types/events": "^3.0.3",
|
|
69
68
|
"@types/lodash-es": "^4.17.4",
|
|
70
69
|
"@types/serialize-javascript": "^5.0.4",
|
|
71
|
-
"@types/sortablejs": "^1.15.
|
|
70
|
+
"@types/sortablejs": "^1.15.9",
|
|
72
71
|
"@vue/test-utils": "^2.4.6",
|
|
73
|
-
"type-fest": "^
|
|
72
|
+
"type-fest": "^5.2.0"
|
|
74
73
|
},
|
|
75
74
|
"peerDependencies": {
|
|
76
75
|
"monaco-editor": "^0.48.0",
|
|
77
76
|
"typescript": "^5.9.3",
|
|
78
|
-
"vue": "^3.5.
|
|
79
|
-
"@tmagic/core": "1.7.0-beta.
|
|
77
|
+
"vue": "^3.5.24",
|
|
78
|
+
"@tmagic/core": "1.7.0-beta.4"
|
|
80
79
|
},
|
|
81
80
|
"peerDependenciesMeta": {
|
|
82
81
|
"typescript": {
|
|
@@ -38,12 +38,29 @@
|
|
|
38
38
|
</template>
|
|
39
39
|
</component>
|
|
40
40
|
<div
|
|
41
|
-
:class="`tmagic-data-source-input-text el-input t-input t-size-${size?.[0]} el-input--${size}`"
|
|
42
|
-
@mouseup="mouseupHandler"
|
|
43
41
|
v-else
|
|
42
|
+
:class="{
|
|
43
|
+
'tmagic-data-source-input-text': true,
|
|
44
|
+
'el-input': adapterType === 'element-plus',
|
|
45
|
+
[`el-input--${size}`]: adapterType === 'element-plus',
|
|
46
|
+
't-input': adapterType === 'tdesign-vue-next',
|
|
47
|
+
[`t-size-${size?.[0]}`]: adapterType === 'tdesign-vue-next',
|
|
48
|
+
}"
|
|
49
|
+
@mouseup="mouseupHandler"
|
|
44
50
|
>
|
|
45
|
-
<div
|
|
46
|
-
|
|
51
|
+
<div
|
|
52
|
+
:class="{
|
|
53
|
+
'tmagic-data-source-input-text-wrapper': true,
|
|
54
|
+
'el-input__wrapper': adapterType === 'element-plus',
|
|
55
|
+
'is-focus': isFocused,
|
|
56
|
+
}"
|
|
57
|
+
>
|
|
58
|
+
<div
|
|
59
|
+
:class="{
|
|
60
|
+
'el-input__inner': adapterType === 'element-plus',
|
|
61
|
+
input__inner: adapterType === 'tdesign-vue-next',
|
|
62
|
+
}"
|
|
63
|
+
>
|
|
47
64
|
<template v-for="(item, index) in displayState">
|
|
48
65
|
<span :key="index" v-if="item.type === 'text'" style="margin-right: 2px">{{ item.value }}</span>
|
|
49
66
|
<TMagicTag :key="index" :size="size" v-if="item.type === 'var'">{{ item.value }}</TMagicTag>
|
|
@@ -80,6 +97,8 @@ const emit = defineEmits<{
|
|
|
80
97
|
change: [value: string];
|
|
81
98
|
}>();
|
|
82
99
|
|
|
100
|
+
const adapterType = getDesignConfig('adapterType');
|
|
101
|
+
|
|
83
102
|
const { dataSourceService, propsService } = useServices();
|
|
84
103
|
|
|
85
104
|
const autocompleteRef = useTemplateRef<InstanceType<typeof TMagicAutocomplete>>('autocomplete');
|
|
@@ -167,7 +167,7 @@ watch(page, (page) => {
|
|
|
167
167
|
}
|
|
168
168
|
});
|
|
169
169
|
|
|
170
|
-
const resizeObserver = new ResizeObserver((entries) => {
|
|
170
|
+
const resizeObserver = new globalThis.ResizeObserver((entries) => {
|
|
171
171
|
for (const { contentRect } of entries) {
|
|
172
172
|
uiService.set('stageContainerRect', {
|
|
173
173
|
width: contentRect.width,
|
package/types/index.d.ts
CHANGED
|
@@ -2679,12 +2679,12 @@ declare const __VLS_base$9: _vue_runtime_core.DefineComponent<__VLS_Props$g, {
|
|
|
2679
2679
|
deleteCode: (id: string) => Promise<void>;
|
|
2680
2680
|
}, {}, {}, {}, _vue_runtime_core.ComponentOptionsMixin, _vue_runtime_core.ComponentOptionsMixin, {
|
|
2681
2681
|
remove: (id: string) => any;
|
|
2682
|
-
"node-contextmenu": (event: MouseEvent, data: TreeNodeData) => any;
|
|
2683
2682
|
edit: (id: string) => any;
|
|
2683
|
+
"node-contextmenu": (event: MouseEvent, data: TreeNodeData) => any;
|
|
2684
2684
|
}, string, _vue_runtime_core.PublicProps, Readonly<__VLS_Props$g> & Readonly<{
|
|
2685
2685
|
onRemove?: ((id: string) => any) | undefined;
|
|
2686
|
-
"onNode-contextmenu"?: ((event: MouseEvent, data: TreeNodeData) => any) | undefined;
|
|
2687
2686
|
onEdit?: ((id: string) => any) | undefined;
|
|
2687
|
+
"onNode-contextmenu"?: ((event: MouseEvent, data: TreeNodeData) => any) | undefined;
|
|
2688
2688
|
}>, {}, {}, {}, {}, string, _vue_runtime_core.ComponentProvideOptions, false, {}, any>;
|
|
2689
2689
|
declare const __VLS_export$h: __VLS_WithSlots$9<typeof __VLS_base$9, __VLS_Slots$9>;
|
|
2690
2690
|
declare const _default$i: typeof __VLS_export$h;
|