@tmagic/editor 1.7.0-beta.1 → 1.7.0-beta.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/dist/style.css +20 -7
- package/dist/tmagic-editor.js +61 -66
- package/dist/tmagic-editor.umd.cjs +60 -65
- package/package.json +7 -7
- package/src/fields/CodeSelectCol.vue +29 -36
- package/src/fields/CondOpSelect.vue +1 -1
- package/src/fields/DataSourceMethodSelect.vue +38 -30
- package/src/fields/EventSelect.vue +0 -1
- package/src/fields/PageFragmentSelect.vue +11 -8
- package/src/fields/UISelect.vue +0 -2
- package/types/index.d.ts +27 -27
package/dist/style.css
CHANGED
|
@@ -305,6 +305,17 @@ fieldset.m-fieldset .m-form-tip {
|
|
|
305
305
|
.m-fields-group-list .m-fields-group-list-item:last-of-type {
|
|
306
306
|
border-bottom: 0;
|
|
307
307
|
}
|
|
308
|
+
.m-fields-group-list .tmagic-design-card .el-card__header {
|
|
309
|
+
padding: 5px 20px;
|
|
310
|
+
}
|
|
311
|
+
.m-fields-group-list .tmagic-design-card .t-card__header {
|
|
312
|
+
padding: 5px 0;
|
|
313
|
+
}
|
|
314
|
+
.m-fields-group-list .m-fields-group-list-footer {
|
|
315
|
+
display: flex;
|
|
316
|
+
justify-content: space-between;
|
|
317
|
+
margin-top: 10px;
|
|
318
|
+
}
|
|
308
319
|
|
|
309
320
|
.m-form-panel .el-card__header:hover {
|
|
310
321
|
background: #f2f6fc;
|
|
@@ -326,11 +337,7 @@ fieldset.m-fieldset .m-form-tip {
|
|
|
326
337
|
.m-fields-table-wrap {
|
|
327
338
|
width: 100%;
|
|
328
339
|
}
|
|
329
|
-
|
|
330
|
-
.m-fields-table {
|
|
331
|
-
width: 100%;
|
|
332
|
-
}
|
|
333
|
-
.m-fields-table.fixed {
|
|
340
|
+
.m-fields-table-wrap.fixed {
|
|
334
341
|
position: fixed;
|
|
335
342
|
height: 100%;
|
|
336
343
|
overflow: auto;
|
|
@@ -340,16 +347,22 @@ fieldset.m-fieldset .m-form-tip {
|
|
|
340
347
|
bottom: 0;
|
|
341
348
|
z-index: 100;
|
|
342
349
|
background: rgba(0, 0, 0, 0.5);
|
|
350
|
+
align-items: center;
|
|
351
|
+
display: flex;
|
|
343
352
|
}
|
|
344
|
-
.m-fields-table.fixed > .el-form-item__content {
|
|
353
|
+
.m-fields-table-wrap.fixed > .el-form-item__content {
|
|
345
354
|
z-index: 101;
|
|
346
355
|
position: relative;
|
|
347
356
|
margin: 10vh auto;
|
|
348
357
|
max-width: fit-content;
|
|
349
358
|
}
|
|
350
|
-
.m-fields-table.fixed table {
|
|
359
|
+
.m-fields-table-wrap.fixed table {
|
|
351
360
|
width: 95vw !important;
|
|
352
361
|
}
|
|
362
|
+
|
|
363
|
+
.m-fields-table {
|
|
364
|
+
width: 100%;
|
|
365
|
+
}
|
|
353
366
|
.m-fields-table th {
|
|
354
367
|
background-color: #f2f2f2 !important;
|
|
355
368
|
color: #333 !important;
|
package/dist/tmagic-editor.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import designPlugin__default, { TMagicIcon, TMagicButton, TMagicCard, tMagicMessage, getDesignConfig, TMagicSelect, useZIndex, tMagicMessageBox, TMagicCascader, TMagicTooltip, TMagicInput, TMagicTag, TMagicDialog, TMagicSwitch, TMagicCollapse, TMagicCollapseItem, TMagicDivider, TMagicDropdown, TMagicDropdownMenu, TMagicDropdownItem, TMagicPopover, TMagicScrollbar } from '@tmagic/design';
|
|
2
2
|
export * from '@tmagic/design';
|
|
3
3
|
export { default as designPlugin } from '@tmagic/design';
|
|
4
|
-
import formPlugin__default, { MContainer, defineFormConfig, MForm, filterFunction, createValues, MFormBox,
|
|
4
|
+
import formPlugin__default, { MContainer, defineFormConfig, MForm, filterFunction, MSelect, createValues, MFormBox, MCascader, MGroupList, MPanel, createForm } from '@tmagic/form';
|
|
5
5
|
export * from '@tmagic/form';
|
|
6
6
|
export { default as formPlugin } from '@tmagic/form';
|
|
7
7
|
import tablePlugin__default, { MagicTable } from '@tmagic/table';
|
|
@@ -3324,40 +3324,29 @@ const _sfc_main$1l = /* @__PURE__ */ defineComponent({
|
|
|
3324
3324
|
}));
|
|
3325
3325
|
}
|
|
3326
3326
|
return [];
|
|
3327
|
-
},
|
|
3328
|
-
onChange: (formState, codeId, { setModel, model }) => {
|
|
3329
|
-
paramsConfig.value = getParamItemsConfig(codeId);
|
|
3330
|
-
if (paramsConfig.value.length) {
|
|
3331
|
-
setModel("params", createValues(formState, paramsConfig.value, {}, model.params));
|
|
3332
|
-
} else {
|
|
3333
|
-
setModel("params", {});
|
|
3334
|
-
}
|
|
3335
|
-
return codeId;
|
|
3336
3327
|
}
|
|
3337
3328
|
};
|
|
3338
|
-
const onCodeIdChangeHandler = (value
|
|
3339
|
-
|
|
3340
|
-
|
|
3341
|
-
|
|
3342
|
-
|
|
3343
|
-
value
|
|
3344
|
-
}
|
|
3345
|
-
|
|
3346
|
-
|
|
3347
|
-
|
|
3348
|
-
|
|
3349
|
-
|
|
3329
|
+
const onCodeIdChangeHandler = (value) => {
|
|
3330
|
+
paramsConfig.value = getParamItemsConfig(value);
|
|
3331
|
+
const changeRecords = [
|
|
3332
|
+
{
|
|
3333
|
+
propPath: props.prop,
|
|
3334
|
+
value
|
|
3335
|
+
}
|
|
3336
|
+
];
|
|
3337
|
+
changeRecords.push({
|
|
3338
|
+
propPath: props.prop.replace(`${props.name}`, "params"),
|
|
3339
|
+
value: paramsConfig.value.length ? createValues(mForm, paramsConfig.value, {}, props.model.params) : {}
|
|
3340
|
+
});
|
|
3341
|
+
emit("change", value, {
|
|
3342
|
+
changeRecords
|
|
3350
3343
|
});
|
|
3351
3344
|
};
|
|
3352
3345
|
const onParamsChangeHandler = (value, eventData) => {
|
|
3353
|
-
|
|
3354
|
-
|
|
3355
|
-
...eventData,
|
|
3356
|
-
changeRecords: (eventData.changeRecords || []).map((item) => ({
|
|
3357
|
-
prop: `${props.prop.replace(props.name, "")}${item.propPath}`,
|
|
3358
|
-
value: item.value
|
|
3359
|
-
}))
|
|
3346
|
+
eventData.changeRecords?.forEach((record) => {
|
|
3347
|
+
record.propPath = `${props.prop.replace(`${props.name}`, "")}${record.propPath}`;
|
|
3360
3348
|
});
|
|
3349
|
+
emit("change", props.model[props.name], eventData);
|
|
3361
3350
|
};
|
|
3362
3351
|
const editCode = (id) => {
|
|
3363
3352
|
eventBus?.emit("edit-code", id);
|
|
@@ -3366,13 +3355,15 @@ const _sfc_main$1l = /* @__PURE__ */ defineComponent({
|
|
|
3366
3355
|
return openBlock(), createElementBlock("div", _hoisted_1$Z, [
|
|
3367
3356
|
createElementVNode("div", _hoisted_2$n, [
|
|
3368
3357
|
createCommentVNode(" 代码块下拉框 "),
|
|
3369
|
-
createVNode(unref(
|
|
3358
|
+
createVNode(unref(MSelect), {
|
|
3370
3359
|
class: "select",
|
|
3371
3360
|
config: selectConfig,
|
|
3361
|
+
name: __props.name,
|
|
3372
3362
|
model: __props.model,
|
|
3373
3363
|
size: __props.size,
|
|
3364
|
+
prop: __props.prop,
|
|
3374
3365
|
onChange: onCodeIdChangeHandler
|
|
3375
|
-
}, null, 8, ["model", "size"]),
|
|
3366
|
+
}, null, 8, ["name", "model", "size", "prop"]),
|
|
3376
3367
|
createCommentVNode(" 查看/编辑按钮 "),
|
|
3377
3368
|
__props.model[__props.name] && hasCodeBlockSidePanel.value ? (openBlock(), createBlock(unref(TMagicButton), {
|
|
3378
3369
|
key: 0,
|
|
@@ -3395,9 +3386,10 @@ const _sfc_main$1l = /* @__PURE__ */ defineComponent({
|
|
|
3395
3386
|
key: __props.model[__props.name],
|
|
3396
3387
|
model: __props.model,
|
|
3397
3388
|
size: __props.size,
|
|
3389
|
+
disabled: __props.disabled,
|
|
3398
3390
|
"params-config": paramsConfig.value,
|
|
3399
3391
|
onChange: onParamsChangeHandler
|
|
3400
|
-
}, null, 8, ["model", "size", "params-config"])) : createCommentVNode("v-if", true)
|
|
3392
|
+
}, null, 8, ["model", "size", "disabled", "params-config"])) : createCommentVNode("v-if", true)
|
|
3401
3393
|
]);
|
|
3402
3394
|
};
|
|
3403
3395
|
}
|
|
@@ -3457,8 +3449,7 @@ const _sfc_main$1k = /* @__PURE__ */ defineComponent({
|
|
|
3457
3449
|
};
|
|
3458
3450
|
return (_ctx, _cache) => {
|
|
3459
3451
|
return openBlock(), createBlock(unref(TMagicSelect), {
|
|
3460
|
-
|
|
3461
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => __props.model[__props.name] = $event),
|
|
3452
|
+
"model-value": __props.model[__props.name],
|
|
3462
3453
|
clearable: "",
|
|
3463
3454
|
filterable: "",
|
|
3464
3455
|
size: __props.size,
|
|
@@ -3497,7 +3488,7 @@ const _sfc_main$1k = /* @__PURE__ */ defineComponent({
|
|
|
3497
3488
|
]),
|
|
3498
3489
|
_: 1
|
|
3499
3490
|
/* STABLE */
|
|
3500
|
-
}, 8, ["
|
|
3491
|
+
}, 8, ["model-value", "size", "disabled"]);
|
|
3501
3492
|
};
|
|
3502
3493
|
}
|
|
3503
3494
|
});
|
|
@@ -5743,14 +5734,6 @@ const _sfc_main$1c = /* @__PURE__ */ defineComponent({
|
|
|
5743
5734
|
}));
|
|
5744
5735
|
};
|
|
5745
5736
|
const paramsConfig = ref(getParamItemsConfig(props.model[props.name || "dataSourceMethod"]));
|
|
5746
|
-
const setParamsConfig = (dataSourceMethod, formState = {}, setModel) => {
|
|
5747
|
-
paramsConfig.value = dataSourceMethod ? getParamItemsConfig(dataSourceMethod) : [];
|
|
5748
|
-
if (paramsConfig.value.length) {
|
|
5749
|
-
setModel("params", createValues(formState, paramsConfig.value, {}, props.model.params));
|
|
5750
|
-
} else {
|
|
5751
|
-
setModel("params", {});
|
|
5752
|
-
}
|
|
5753
|
-
};
|
|
5754
5737
|
const methodsOptions = computed(
|
|
5755
5738
|
() => dataSources.value?.filter((ds) => ds.methods?.length || dataSourceService.getFormMethod(ds.type).length)?.map((ds) => ({
|
|
5756
5739
|
label: ds.title || ds.id,
|
|
@@ -5766,17 +5749,29 @@ const _sfc_main$1c = /* @__PURE__ */ defineComponent({
|
|
|
5766
5749
|
);
|
|
5767
5750
|
const cascaderConfig = computed(() => ({
|
|
5768
5751
|
type: "cascader",
|
|
5769
|
-
|
|
5770
|
-
options: methodsOptions.value,
|
|
5771
|
-
disable: props.disabled,
|
|
5772
|
-
onChange: (formState, dataSourceMethod, { setModel }) => {
|
|
5773
|
-
setParamsConfig(dataSourceMethod, formState, setModel);
|
|
5774
|
-
return dataSourceMethod;
|
|
5775
|
-
}
|
|
5752
|
+
options: methodsOptions.value
|
|
5776
5753
|
}));
|
|
5777
5754
|
const onChangeHandler = (value) => {
|
|
5778
|
-
|
|
5779
|
-
|
|
5755
|
+
paramsConfig.value = getParamItemsConfig(value);
|
|
5756
|
+
const changeRecords = [
|
|
5757
|
+
{
|
|
5758
|
+
propPath: props.prop,
|
|
5759
|
+
value
|
|
5760
|
+
}
|
|
5761
|
+
];
|
|
5762
|
+
changeRecords.push({
|
|
5763
|
+
propPath: props.prop.replace(`${props.name}`, "params"),
|
|
5764
|
+
value: paramsConfig.value.length ? createValues(mForm, paramsConfig.value, {}, props.model.params) : {}
|
|
5765
|
+
});
|
|
5766
|
+
emit("change", value, {
|
|
5767
|
+
changeRecords
|
|
5768
|
+
});
|
|
5769
|
+
};
|
|
5770
|
+
const onParamsChangeHandler = (value, eventData) => {
|
|
5771
|
+
eventData.changeRecords?.forEach((record) => {
|
|
5772
|
+
record.propPath = `${props.prop.replace(`${props.name}`, "")}${record.propPath}`;
|
|
5773
|
+
});
|
|
5774
|
+
emit("change", props.model[props.name], eventData);
|
|
5780
5775
|
};
|
|
5781
5776
|
const editCodeHandler = () => {
|
|
5782
5777
|
const [id] = props.model[props.name];
|
|
@@ -5787,13 +5782,16 @@ const _sfc_main$1c = /* @__PURE__ */ defineComponent({
|
|
|
5787
5782
|
return (_ctx, _cache) => {
|
|
5788
5783
|
return openBlock(), createElementBlock("div", _hoisted_1$R, [
|
|
5789
5784
|
createElementVNode("div", _hoisted_2$i, [
|
|
5790
|
-
createVNode(unref(
|
|
5785
|
+
createVNode(unref(MCascader), {
|
|
5791
5786
|
class: "select",
|
|
5792
5787
|
config: cascaderConfig.value,
|
|
5793
5788
|
model: __props.model,
|
|
5789
|
+
name: __props.name,
|
|
5794
5790
|
size: __props.size,
|
|
5791
|
+
disabled: __props.disabled,
|
|
5792
|
+
prop: __props.prop,
|
|
5795
5793
|
onChange: onChangeHandler
|
|
5796
|
-
}, null, 8, ["config", "model", "size"]),
|
|
5794
|
+
}, null, 8, ["config", "model", "name", "size", "disabled", "prop"]),
|
|
5797
5795
|
__props.model[__props.name] && isCustomMethod.value && hasDataSourceSidePanel.value ? (openBlock(), createBlock(unref(TMagicTooltip), {
|
|
5798
5796
|
key: 0,
|
|
5799
5797
|
content: notEditable.value ? "查看" : "编辑"
|
|
@@ -5818,13 +5816,13 @@ const _sfc_main$1c = /* @__PURE__ */ defineComponent({
|
|
|
5818
5816
|
}, 8, ["content"])) : createCommentVNode("v-if", true)
|
|
5819
5817
|
]),
|
|
5820
5818
|
paramsConfig.value.length ? (openBlock(), createBlock(_sfc_main$1m, {
|
|
5821
|
-
key: 0,
|
|
5822
5819
|
name: "params",
|
|
5820
|
+
key: __props.model[__props.name],
|
|
5823
5821
|
model: __props.model,
|
|
5824
5822
|
size: __props.size,
|
|
5825
5823
|
disabled: __props.disabled,
|
|
5826
5824
|
"params-config": paramsConfig.value,
|
|
5827
|
-
onChange:
|
|
5825
|
+
onChange: onParamsChangeHandler
|
|
5828
5826
|
}, null, 8, ["model", "size", "disabled", "params-config"])) : createCommentVNode("v-if", true)
|
|
5829
5827
|
]);
|
|
5830
5828
|
};
|
|
@@ -6450,7 +6448,6 @@ const _sfc_main$18 = /* @__PURE__ */ defineComponent({
|
|
|
6450
6448
|
display: (mForm, { model }) => model.actionType === ActionType.COMP,
|
|
6451
6449
|
onChange: (MForm, v, { setModel }) => {
|
|
6452
6450
|
setModel("method", "");
|
|
6453
|
-
return v;
|
|
6454
6451
|
}
|
|
6455
6452
|
};
|
|
6456
6453
|
return { ...defaultTargetCompConfig, ...props.config.targetCompConfig };
|
|
@@ -6869,13 +6866,11 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
|
|
|
6869
6866
|
setup(__props, { emit: __emit }) {
|
|
6870
6867
|
const { editorService } = useServices();
|
|
6871
6868
|
const emit = __emit;
|
|
6872
|
-
const props = __props;
|
|
6873
6869
|
const pageList = computed(
|
|
6874
6870
|
() => editorService.get("root")?.items.filter((item) => item.type === NodeType.PAGE_FRAGMENT)
|
|
6875
6871
|
);
|
|
6876
6872
|
const selectConfig = {
|
|
6877
6873
|
type: "select",
|
|
6878
|
-
name: props.name,
|
|
6879
6874
|
options: () => {
|
|
6880
6875
|
if (pageList.value) {
|
|
6881
6876
|
return pageList.value.map((item) => ({
|
|
@@ -6887,24 +6882,26 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
|
|
|
6887
6882
|
return [];
|
|
6888
6883
|
}
|
|
6889
6884
|
};
|
|
6890
|
-
const changeHandler =
|
|
6891
|
-
emit("change",
|
|
6885
|
+
const changeHandler = (v) => {
|
|
6886
|
+
emit("change", v);
|
|
6892
6887
|
};
|
|
6893
6888
|
const editPageFragment = (id) => {
|
|
6894
6889
|
editorService.select(id);
|
|
6895
6890
|
};
|
|
6896
6891
|
return (_ctx, _cache) => {
|
|
6897
|
-
const _component_m_form_container = resolveComponent("m-form-container");
|
|
6898
6892
|
return openBlock(), createElementBlock("div", _hoisted_1$L, [
|
|
6899
6893
|
createElementVNode("div", _hoisted_2$e, [
|
|
6900
6894
|
createCommentVNode(" 页面片下拉框 "),
|
|
6901
|
-
createVNode(
|
|
6895
|
+
createVNode(unref(MSelect), {
|
|
6902
6896
|
class: "select",
|
|
6903
6897
|
config: selectConfig,
|
|
6904
6898
|
model: __props.model,
|
|
6899
|
+
name: __props.name,
|
|
6905
6900
|
size: __props.size,
|
|
6901
|
+
prop: __props.prop,
|
|
6902
|
+
disabled: __props.disabled,
|
|
6906
6903
|
onChange: changeHandler
|
|
6907
|
-
}, null, 8, ["model", "size"]),
|
|
6904
|
+
}, null, 8, ["model", "name", "size", "prop", "disabled"]),
|
|
6908
6905
|
createCommentVNode(" 编辑按钮 "),
|
|
6909
6906
|
__props.model[__props.name] ? (openBlock(), createBlock(_sfc_main$1r, {
|
|
6910
6907
|
key: 0,
|
|
@@ -8212,7 +8209,6 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
|
8212
8209
|
id = getIdFromEl()(detail) || id;
|
|
8213
8210
|
}
|
|
8214
8211
|
if (id) {
|
|
8215
|
-
props.model[props.name] = id;
|
|
8216
8212
|
emit("change", id);
|
|
8217
8213
|
mForm?.$emit("field-change", props.prop, id);
|
|
8218
8214
|
}
|
|
@@ -8231,7 +8227,6 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
|
8231
8227
|
};
|
|
8232
8228
|
const deleteHandler = () => {
|
|
8233
8229
|
if (props.model) {
|
|
8234
|
-
props.model[props.name] = "";
|
|
8235
8230
|
emit("change", "");
|
|
8236
8231
|
mForm?.$emit("field-change", props.prop, "");
|
|
8237
8232
|
}
|
|
@@ -8117,40 +8117,29 @@
|
|
|
8117
8117
|
}));
|
|
8118
8118
|
}
|
|
8119
8119
|
return [];
|
|
8120
|
-
},
|
|
8121
|
-
onChange: (formState, codeId, { setModel, model }) => {
|
|
8122
|
-
paramsConfig.value = getParamItemsConfig(codeId);
|
|
8123
|
-
if (paramsConfig.value.length) {
|
|
8124
|
-
setModel("params", formPlugin.createValues(formState, paramsConfig.value, {}, model.params));
|
|
8125
|
-
} else {
|
|
8126
|
-
setModel("params", {});
|
|
8127
|
-
}
|
|
8128
|
-
return codeId;
|
|
8129
8120
|
}
|
|
8130
8121
|
};
|
|
8131
|
-
const onCodeIdChangeHandler = (value
|
|
8132
|
-
|
|
8133
|
-
|
|
8134
|
-
|
|
8135
|
-
|
|
8136
|
-
value
|
|
8137
|
-
}
|
|
8138
|
-
|
|
8139
|
-
|
|
8140
|
-
|
|
8141
|
-
|
|
8142
|
-
|
|
8122
|
+
const onCodeIdChangeHandler = (value) => {
|
|
8123
|
+
paramsConfig.value = getParamItemsConfig(value);
|
|
8124
|
+
const changeRecords = [
|
|
8125
|
+
{
|
|
8126
|
+
propPath: props.prop,
|
|
8127
|
+
value
|
|
8128
|
+
}
|
|
8129
|
+
];
|
|
8130
|
+
changeRecords.push({
|
|
8131
|
+
propPath: props.prop.replace(`${props.name}`, "params"),
|
|
8132
|
+
value: paramsConfig.value.length ? formPlugin.createValues(mForm, paramsConfig.value, {}, props.model.params) : {}
|
|
8133
|
+
});
|
|
8134
|
+
emit("change", value, {
|
|
8135
|
+
changeRecords
|
|
8143
8136
|
});
|
|
8144
8137
|
};
|
|
8145
8138
|
const onParamsChangeHandler = (value, eventData) => {
|
|
8146
|
-
|
|
8147
|
-
|
|
8148
|
-
...eventData,
|
|
8149
|
-
changeRecords: (eventData.changeRecords || []).map((item) => ({
|
|
8150
|
-
prop: `${props.prop.replace(props.name, "")}${item.propPath}`,
|
|
8151
|
-
value: item.value
|
|
8152
|
-
}))
|
|
8139
|
+
eventData.changeRecords?.forEach((record) => {
|
|
8140
|
+
record.propPath = `${props.prop.replace(`${props.name}`, "")}${record.propPath}`;
|
|
8153
8141
|
});
|
|
8142
|
+
emit("change", props.model[props.name], eventData);
|
|
8154
8143
|
};
|
|
8155
8144
|
const editCode = (id) => {
|
|
8156
8145
|
eventBus?.emit("edit-code", id);
|
|
@@ -8159,13 +8148,15 @@
|
|
|
8159
8148
|
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$Z, [
|
|
8160
8149
|
vue.createElementVNode("div", _hoisted_2$n, [
|
|
8161
8150
|
vue.createCommentVNode(" 代码块下拉框 "),
|
|
8162
|
-
vue.createVNode(vue.unref(formPlugin.
|
|
8151
|
+
vue.createVNode(vue.unref(formPlugin.MSelect), {
|
|
8163
8152
|
class: "select",
|
|
8164
8153
|
config: selectConfig,
|
|
8154
|
+
name: __props.name,
|
|
8165
8155
|
model: __props.model,
|
|
8166
8156
|
size: __props.size,
|
|
8157
|
+
prop: __props.prop,
|
|
8167
8158
|
onChange: onCodeIdChangeHandler
|
|
8168
|
-
}, null, 8, ["model", "size"]),
|
|
8159
|
+
}, null, 8, ["name", "model", "size", "prop"]),
|
|
8169
8160
|
vue.createCommentVNode(" 查看/编辑按钮 "),
|
|
8170
8161
|
__props.model[__props.name] && hasCodeBlockSidePanel.value ? (vue.openBlock(), vue.createBlock(vue.unref(designPlugin.TMagicButton), {
|
|
8171
8162
|
key: 0,
|
|
@@ -8188,9 +8179,10 @@
|
|
|
8188
8179
|
key: __props.model[__props.name],
|
|
8189
8180
|
model: __props.model,
|
|
8190
8181
|
size: __props.size,
|
|
8182
|
+
disabled: __props.disabled,
|
|
8191
8183
|
"params-config": paramsConfig.value,
|
|
8192
8184
|
onChange: onParamsChangeHandler
|
|
8193
|
-
}, null, 8, ["model", "size", "params-config"])) : vue.createCommentVNode("v-if", true)
|
|
8185
|
+
}, null, 8, ["model", "size", "disabled", "params-config"])) : vue.createCommentVNode("v-if", true)
|
|
8194
8186
|
]);
|
|
8195
8187
|
};
|
|
8196
8188
|
}
|
|
@@ -8250,8 +8242,7 @@
|
|
|
8250
8242
|
};
|
|
8251
8243
|
return (_ctx, _cache) => {
|
|
8252
8244
|
return vue.openBlock(), vue.createBlock(vue.unref(designPlugin.TMagicSelect), {
|
|
8253
|
-
|
|
8254
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => __props.model[__props.name] = $event),
|
|
8245
|
+
"model-value": __props.model[__props.name],
|
|
8255
8246
|
clearable: "",
|
|
8256
8247
|
filterable: "",
|
|
8257
8248
|
size: __props.size,
|
|
@@ -8290,7 +8281,7 @@
|
|
|
8290
8281
|
]),
|
|
8291
8282
|
_: 1
|
|
8292
8283
|
/* STABLE */
|
|
8293
|
-
}, 8, ["
|
|
8284
|
+
}, 8, ["model-value", "size", "disabled"]);
|
|
8294
8285
|
};
|
|
8295
8286
|
}
|
|
8296
8287
|
});
|
|
@@ -10536,14 +10527,6 @@
|
|
|
10536
10527
|
}));
|
|
10537
10528
|
};
|
|
10538
10529
|
const paramsConfig = vue.ref(getParamItemsConfig(props.model[props.name || "dataSourceMethod"]));
|
|
10539
|
-
const setParamsConfig = (dataSourceMethod, formState = {}, setModel) => {
|
|
10540
|
-
paramsConfig.value = dataSourceMethod ? getParamItemsConfig(dataSourceMethod) : [];
|
|
10541
|
-
if (paramsConfig.value.length) {
|
|
10542
|
-
setModel("params", formPlugin.createValues(formState, paramsConfig.value, {}, props.model.params));
|
|
10543
|
-
} else {
|
|
10544
|
-
setModel("params", {});
|
|
10545
|
-
}
|
|
10546
|
-
};
|
|
10547
10530
|
const methodsOptions = vue.computed(
|
|
10548
10531
|
() => dataSources.value?.filter((ds) => ds.methods?.length || dataSourceService.getFormMethod(ds.type).length)?.map((ds) => ({
|
|
10549
10532
|
label: ds.title || ds.id,
|
|
@@ -10559,17 +10542,29 @@
|
|
|
10559
10542
|
);
|
|
10560
10543
|
const cascaderConfig = vue.computed(() => ({
|
|
10561
10544
|
type: "cascader",
|
|
10562
|
-
|
|
10563
|
-
options: methodsOptions.value,
|
|
10564
|
-
disable: props.disabled,
|
|
10565
|
-
onChange: (formState, dataSourceMethod, { setModel }) => {
|
|
10566
|
-
setParamsConfig(dataSourceMethod, formState, setModel);
|
|
10567
|
-
return dataSourceMethod;
|
|
10568
|
-
}
|
|
10545
|
+
options: methodsOptions.value
|
|
10569
10546
|
}));
|
|
10570
10547
|
const onChangeHandler = (value) => {
|
|
10571
|
-
|
|
10572
|
-
|
|
10548
|
+
paramsConfig.value = getParamItemsConfig(value);
|
|
10549
|
+
const changeRecords = [
|
|
10550
|
+
{
|
|
10551
|
+
propPath: props.prop,
|
|
10552
|
+
value
|
|
10553
|
+
}
|
|
10554
|
+
];
|
|
10555
|
+
changeRecords.push({
|
|
10556
|
+
propPath: props.prop.replace(`${props.name}`, "params"),
|
|
10557
|
+
value: paramsConfig.value.length ? formPlugin.createValues(mForm, paramsConfig.value, {}, props.model.params) : {}
|
|
10558
|
+
});
|
|
10559
|
+
emit("change", value, {
|
|
10560
|
+
changeRecords
|
|
10561
|
+
});
|
|
10562
|
+
};
|
|
10563
|
+
const onParamsChangeHandler = (value, eventData) => {
|
|
10564
|
+
eventData.changeRecords?.forEach((record) => {
|
|
10565
|
+
record.propPath = `${props.prop.replace(`${props.name}`, "")}${record.propPath}`;
|
|
10566
|
+
});
|
|
10567
|
+
emit("change", props.model[props.name], eventData);
|
|
10573
10568
|
};
|
|
10574
10569
|
const editCodeHandler = () => {
|
|
10575
10570
|
const [id] = props.model[props.name];
|
|
@@ -10580,13 +10575,16 @@
|
|
|
10580
10575
|
return (_ctx, _cache) => {
|
|
10581
10576
|
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$R, [
|
|
10582
10577
|
vue.createElementVNode("div", _hoisted_2$i, [
|
|
10583
|
-
vue.createVNode(vue.unref(formPlugin.
|
|
10578
|
+
vue.createVNode(vue.unref(formPlugin.MCascader), {
|
|
10584
10579
|
class: "select",
|
|
10585
10580
|
config: cascaderConfig.value,
|
|
10586
10581
|
model: __props.model,
|
|
10582
|
+
name: __props.name,
|
|
10587
10583
|
size: __props.size,
|
|
10584
|
+
disabled: __props.disabled,
|
|
10585
|
+
prop: __props.prop,
|
|
10588
10586
|
onChange: onChangeHandler
|
|
10589
|
-
}, null, 8, ["config", "model", "size"]),
|
|
10587
|
+
}, null, 8, ["config", "model", "name", "size", "disabled", "prop"]),
|
|
10590
10588
|
__props.model[__props.name] && isCustomMethod.value && hasDataSourceSidePanel.value ? (vue.openBlock(), vue.createBlock(vue.unref(designPlugin.TMagicTooltip), {
|
|
10591
10589
|
key: 0,
|
|
10592
10590
|
content: notEditable.value ? "查看" : "编辑"
|
|
@@ -10611,13 +10609,13 @@
|
|
|
10611
10609
|
}, 8, ["content"])) : vue.createCommentVNode("v-if", true)
|
|
10612
10610
|
]),
|
|
10613
10611
|
paramsConfig.value.length ? (vue.openBlock(), vue.createBlock(_sfc_main$1m, {
|
|
10614
|
-
key: 0,
|
|
10615
10612
|
name: "params",
|
|
10613
|
+
key: __props.model[__props.name],
|
|
10616
10614
|
model: __props.model,
|
|
10617
10615
|
size: __props.size,
|
|
10618
10616
|
disabled: __props.disabled,
|
|
10619
10617
|
"params-config": paramsConfig.value,
|
|
10620
|
-
onChange:
|
|
10618
|
+
onChange: onParamsChangeHandler
|
|
10621
10619
|
}, null, 8, ["model", "size", "disabled", "params-config"])) : vue.createCommentVNode("v-if", true)
|
|
10622
10620
|
]);
|
|
10623
10621
|
};
|
|
@@ -11243,7 +11241,6 @@
|
|
|
11243
11241
|
display: (mForm, { model }) => model.actionType === core.ActionType.COMP,
|
|
11244
11242
|
onChange: (MForm, v, { setModel }) => {
|
|
11245
11243
|
setModel("method", "");
|
|
11246
|
-
return v;
|
|
11247
11244
|
}
|
|
11248
11245
|
};
|
|
11249
11246
|
return { ...defaultTargetCompConfig, ...props.config.targetCompConfig };
|
|
@@ -11662,13 +11659,11 @@
|
|
|
11662
11659
|
setup(__props, { emit: __emit }) {
|
|
11663
11660
|
const { editorService } = useServices();
|
|
11664
11661
|
const emit = __emit;
|
|
11665
|
-
const props = __props;
|
|
11666
11662
|
const pageList = vue.computed(
|
|
11667
11663
|
() => editorService.get("root")?.items.filter((item) => item.type === core.NodeType.PAGE_FRAGMENT)
|
|
11668
11664
|
);
|
|
11669
11665
|
const selectConfig = {
|
|
11670
11666
|
type: "select",
|
|
11671
|
-
name: props.name,
|
|
11672
11667
|
options: () => {
|
|
11673
11668
|
if (pageList.value) {
|
|
11674
11669
|
return pageList.value.map((item) => ({
|
|
@@ -11680,24 +11675,26 @@
|
|
|
11680
11675
|
return [];
|
|
11681
11676
|
}
|
|
11682
11677
|
};
|
|
11683
|
-
const changeHandler =
|
|
11684
|
-
emit("change",
|
|
11678
|
+
const changeHandler = (v) => {
|
|
11679
|
+
emit("change", v);
|
|
11685
11680
|
};
|
|
11686
11681
|
const editPageFragment = (id) => {
|
|
11687
11682
|
editorService.select(id);
|
|
11688
11683
|
};
|
|
11689
11684
|
return (_ctx, _cache) => {
|
|
11690
|
-
const _component_m_form_container = vue.resolveComponent("m-form-container");
|
|
11691
11685
|
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$L, [
|
|
11692
11686
|
vue.createElementVNode("div", _hoisted_2$e, [
|
|
11693
11687
|
vue.createCommentVNode(" 页面片下拉框 "),
|
|
11694
|
-
vue.createVNode(
|
|
11688
|
+
vue.createVNode(vue.unref(formPlugin.MSelect), {
|
|
11695
11689
|
class: "select",
|
|
11696
11690
|
config: selectConfig,
|
|
11697
11691
|
model: __props.model,
|
|
11692
|
+
name: __props.name,
|
|
11698
11693
|
size: __props.size,
|
|
11694
|
+
prop: __props.prop,
|
|
11695
|
+
disabled: __props.disabled,
|
|
11699
11696
|
onChange: changeHandler
|
|
11700
|
-
}, null, 8, ["model", "size"]),
|
|
11697
|
+
}, null, 8, ["model", "name", "size", "prop", "disabled"]),
|
|
11701
11698
|
vue.createCommentVNode(" 编辑按钮 "),
|
|
11702
11699
|
__props.model[__props.name] ? (vue.openBlock(), vue.createBlock(_sfc_main$1r, {
|
|
11703
11700
|
key: 0,
|
|
@@ -13005,7 +13002,6 @@
|
|
|
13005
13002
|
id = utils.getIdFromEl()(detail) || id;
|
|
13006
13003
|
}
|
|
13007
13004
|
if (id) {
|
|
13008
|
-
props.model[props.name] = id;
|
|
13009
13005
|
emit("change", id);
|
|
13010
13006
|
mForm?.$emit("field-change", props.prop, id);
|
|
13011
13007
|
}
|
|
@@ -13024,7 +13020,6 @@
|
|
|
13024
13020
|
};
|
|
13025
13021
|
const deleteHandler = () => {
|
|
13026
13022
|
if (props.model) {
|
|
13027
|
-
props.model[props.name] = "";
|
|
13028
13023
|
emit("change", "");
|
|
13029
13024
|
mForm?.$emit("field-change", props.prop, "");
|
|
13030
13025
|
}
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.7.0-beta.
|
|
2
|
+
"version": "1.7.0-beta.3",
|
|
3
3
|
"name": "@tmagic/editor",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": [
|
|
@@ -58,11 +58,11 @@
|
|
|
58
58
|
"moveable": "^0.53.0",
|
|
59
59
|
"serialize-javascript": "^6.0.2",
|
|
60
60
|
"sortablejs": "^1.15.6",
|
|
61
|
-
"@tmagic/design": "1.7.0-beta.
|
|
62
|
-
"@tmagic/
|
|
63
|
-
"@tmagic/
|
|
64
|
-
"@tmagic/
|
|
65
|
-
"@tmagic/
|
|
61
|
+
"@tmagic/design": "1.7.0-beta.3",
|
|
62
|
+
"@tmagic/form": "1.7.0-beta.3",
|
|
63
|
+
"@tmagic/stage": "1.7.0-beta.3",
|
|
64
|
+
"@tmagic/table": "1.7.0-beta.3",
|
|
65
|
+
"@tmagic/utils": "1.7.0-beta.3"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
68
|
"@types/events": "^3.0.3",
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"monaco-editor": "^0.48.0",
|
|
77
77
|
"typescript": "^5.9.3",
|
|
78
78
|
"vue": "^3.5.22",
|
|
79
|
-
"@tmagic/core": "1.7.0-beta.
|
|
79
|
+
"@tmagic/core": "1.7.0-beta.3"
|
|
80
80
|
},
|
|
81
81
|
"peerDependenciesMeta": {
|
|
82
82
|
"typescript": {
|
|
@@ -2,13 +2,15 @@
|
|
|
2
2
|
<div class="m-fields-code-select-col">
|
|
3
3
|
<div class="code-select-container">
|
|
4
4
|
<!-- 代码块下拉框 -->
|
|
5
|
-
<
|
|
5
|
+
<MSelect
|
|
6
6
|
class="select"
|
|
7
7
|
:config="selectConfig"
|
|
8
|
+
:name="name"
|
|
8
9
|
:model="model"
|
|
9
10
|
:size="size"
|
|
11
|
+
:prop="prop"
|
|
10
12
|
@change="onCodeIdChangeHandler"
|
|
11
|
-
></
|
|
13
|
+
></MSelect>
|
|
12
14
|
|
|
13
15
|
<!-- 查看/编辑按钮 -->
|
|
14
16
|
<TMagicButton
|
|
@@ -28,6 +30,7 @@
|
|
|
28
30
|
:key="model[name]"
|
|
29
31
|
:model="model"
|
|
30
32
|
:size="size"
|
|
33
|
+
:disabled="disabled"
|
|
31
34
|
:params-config="paramsConfig"
|
|
32
35
|
@change="onParamsChangeHandler"
|
|
33
36
|
></CodeParams>
|
|
@@ -48,7 +51,8 @@ import {
|
|
|
48
51
|
type FieldProps,
|
|
49
52
|
filterFunction,
|
|
50
53
|
type FormState,
|
|
51
|
-
|
|
54
|
+
MSelect,
|
|
55
|
+
type SelectConfig,
|
|
52
56
|
} from '@tmagic/form';
|
|
53
57
|
|
|
54
58
|
import CodeParams from '@editor/components/CodeParams.vue';
|
|
@@ -108,7 +112,7 @@ watch(
|
|
|
108
112
|
},
|
|
109
113
|
);
|
|
110
114
|
|
|
111
|
-
const selectConfig = {
|
|
115
|
+
const selectConfig: SelectConfig = {
|
|
112
116
|
type: 'select',
|
|
113
117
|
name: props.name,
|
|
114
118
|
disable: props.disabled,
|
|
@@ -122,33 +126,26 @@ const selectConfig = {
|
|
|
122
126
|
}
|
|
123
127
|
return [];
|
|
124
128
|
},
|
|
125
|
-
onChange: (formState: any, codeId: Id, { setModel, model }: any) => {
|
|
126
|
-
// 通过下拉框选择的codeId变化后修正model的值,避免写入其他codeId的params
|
|
127
|
-
paramsConfig.value = getParamItemsConfig(codeId);
|
|
128
|
-
|
|
129
|
-
if (paramsConfig.value.length) {
|
|
130
|
-
setModel('params', createValues(formState, paramsConfig.value, {}, model.params));
|
|
131
|
-
} else {
|
|
132
|
-
setModel('params', {});
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
return codeId;
|
|
136
|
-
},
|
|
137
129
|
};
|
|
138
130
|
|
|
139
|
-
const onCodeIdChangeHandler = (value: any
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
131
|
+
const onCodeIdChangeHandler = (value: any) => {
|
|
132
|
+
// 通过下拉框选择的codeId变化后修正model的值,避免写入其他codeId的params
|
|
133
|
+
paramsConfig.value = getParamItemsConfig(value);
|
|
134
|
+
|
|
135
|
+
const changeRecords = [
|
|
136
|
+
{
|
|
137
|
+
propPath: props.prop,
|
|
138
|
+
value,
|
|
139
|
+
},
|
|
140
|
+
];
|
|
141
|
+
|
|
142
|
+
changeRecords.push({
|
|
143
|
+
propPath: props.prop.replace(`${props.name}`, 'params'),
|
|
144
|
+
value: paramsConfig.value.length ? createValues(mForm, paramsConfig.value, {}, props.model.params) : {},
|
|
145
|
+
});
|
|
146
|
+
|
|
147
|
+
emit('change', value, {
|
|
148
|
+
changeRecords,
|
|
152
149
|
});
|
|
153
150
|
};
|
|
154
151
|
|
|
@@ -156,14 +153,10 @@ const onCodeIdChangeHandler = (value: any, eventData: ContainerChangeEventData)
|
|
|
156
153
|
* 参数值修改更新
|
|
157
154
|
*/
|
|
158
155
|
const onParamsChangeHandler = (value: any, eventData: ContainerChangeEventData) => {
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
...eventData,
|
|
162
|
-
changeRecords: (eventData.changeRecords || []).map((item) => ({
|
|
163
|
-
prop: `${props.prop.replace(props.name, '')}${item.propPath}`,
|
|
164
|
-
value: item.value,
|
|
165
|
-
})),
|
|
156
|
+
eventData.changeRecords?.forEach((record) => {
|
|
157
|
+
record.propPath = `${props.prop.replace(`${props.name}`, '')}${record.propPath}`;
|
|
166
158
|
});
|
|
159
|
+
emit('change', props.model[props.name], eventData);
|
|
167
160
|
};
|
|
168
161
|
|
|
169
162
|
const editCode = (id: string) => {
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="m-fields-data-source-method-select">
|
|
3
3
|
<div class="data-source-method-select-container">
|
|
4
|
-
<
|
|
4
|
+
<MCascader
|
|
5
5
|
class="select"
|
|
6
6
|
:config="cascaderConfig"
|
|
7
7
|
:model="model"
|
|
8
|
+
:name="name"
|
|
8
9
|
:size="size"
|
|
10
|
+
:disabled="disabled"
|
|
11
|
+
:prop="prop"
|
|
9
12
|
@change="onChangeHandler"
|
|
10
|
-
></
|
|
13
|
+
></MCascader>
|
|
11
14
|
|
|
12
15
|
<TMagicTooltip
|
|
13
16
|
v-if="model[name] && isCustomMethod && hasDataSourceSidePanel"
|
|
@@ -22,11 +25,12 @@
|
|
|
22
25
|
<CodeParams
|
|
23
26
|
v-if="paramsConfig.length"
|
|
24
27
|
name="params"
|
|
28
|
+
:key="model[name]"
|
|
25
29
|
:model="model"
|
|
26
30
|
:size="size"
|
|
27
31
|
:disabled="disabled"
|
|
28
32
|
:params-config="paramsConfig"
|
|
29
|
-
@change="
|
|
33
|
+
@change="onParamsChangeHandler"
|
|
30
34
|
></CodeParams>
|
|
31
35
|
</div>
|
|
32
36
|
</template>
|
|
@@ -38,13 +42,14 @@ import { Edit, View } from '@element-plus/icons-vue';
|
|
|
38
42
|
import type { Id } from '@tmagic/core';
|
|
39
43
|
import { TMagicButton, TMagicTooltip } from '@tmagic/design';
|
|
40
44
|
import {
|
|
45
|
+
type CascaderConfig,
|
|
46
|
+
type ContainerChangeEventData,
|
|
41
47
|
createValues,
|
|
42
48
|
type DataSourceMethodSelectConfig,
|
|
43
49
|
type FieldProps,
|
|
44
50
|
filterFunction,
|
|
45
51
|
type FormState,
|
|
46
|
-
|
|
47
|
-
type OnChangeHandlerData,
|
|
52
|
+
MCascader,
|
|
48
53
|
} from '@tmagic/form';
|
|
49
54
|
|
|
50
55
|
import CodeParams from '@editor/components/CodeParams.vue';
|
|
@@ -100,21 +105,6 @@ const getParamItemsConfig = ([dataSourceId, methodName]: [Id, string] = ['', '']
|
|
|
100
105
|
|
|
101
106
|
const paramsConfig = ref<CodeParamStatement[]>(getParamItemsConfig(props.model[props.name || 'dataSourceMethod']));
|
|
102
107
|
|
|
103
|
-
const setParamsConfig = (
|
|
104
|
-
dataSourceMethod: [Id, string],
|
|
105
|
-
formState: any = {},
|
|
106
|
-
setModel: OnChangeHandlerData['setModel'],
|
|
107
|
-
) => {
|
|
108
|
-
// 通过下拉框选择的codeId变化后修正model的值,避免写入其他codeId的params
|
|
109
|
-
paramsConfig.value = dataSourceMethod ? getParamItemsConfig(dataSourceMethod) : [];
|
|
110
|
-
|
|
111
|
-
if (paramsConfig.value.length) {
|
|
112
|
-
setModel('params', createValues(formState, paramsConfig.value, {}, props.model.params));
|
|
113
|
-
} else {
|
|
114
|
-
setModel('params', {});
|
|
115
|
-
}
|
|
116
|
-
};
|
|
117
|
-
|
|
118
108
|
const methodsOptions = computed(
|
|
119
109
|
() =>
|
|
120
110
|
dataSources.value
|
|
@@ -132,24 +122,42 @@ const methodsOptions = computed(
|
|
|
132
122
|
})) || [],
|
|
133
123
|
);
|
|
134
124
|
|
|
135
|
-
const cascaderConfig = computed(() => ({
|
|
125
|
+
const cascaderConfig = computed<CascaderConfig>(() => ({
|
|
136
126
|
type: 'cascader',
|
|
137
|
-
name: props.name,
|
|
138
127
|
options: methodsOptions.value,
|
|
139
|
-
disable: props.disabled,
|
|
140
|
-
onChange: (formState: any, dataSourceMethod: [Id, string], { setModel }: OnChangeHandlerData) => {
|
|
141
|
-
setParamsConfig(dataSourceMethod, formState, setModel);
|
|
142
|
-
|
|
143
|
-
return dataSourceMethod;
|
|
144
|
-
},
|
|
145
128
|
}));
|
|
146
129
|
|
|
147
130
|
/**
|
|
148
131
|
* 参数值修改更新
|
|
149
132
|
*/
|
|
150
133
|
const onChangeHandler = (value: any) => {
|
|
151
|
-
|
|
152
|
-
|
|
134
|
+
paramsConfig.value = getParamItemsConfig(value);
|
|
135
|
+
|
|
136
|
+
const changeRecords = [
|
|
137
|
+
{
|
|
138
|
+
propPath: props.prop,
|
|
139
|
+
value,
|
|
140
|
+
},
|
|
141
|
+
];
|
|
142
|
+
|
|
143
|
+
changeRecords.push({
|
|
144
|
+
propPath: props.prop.replace(`${props.name}`, 'params'),
|
|
145
|
+
value: paramsConfig.value.length ? createValues(mForm, paramsConfig.value, {}, props.model.params) : {},
|
|
146
|
+
});
|
|
147
|
+
|
|
148
|
+
emit('change', value, {
|
|
149
|
+
changeRecords,
|
|
150
|
+
});
|
|
151
|
+
};
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* 参数值修改更新
|
|
155
|
+
*/
|
|
156
|
+
const onParamsChangeHandler = (value: any, eventData: ContainerChangeEventData) => {
|
|
157
|
+
eventData.changeRecords?.forEach((record) => {
|
|
158
|
+
record.propPath = `${props.prop.replace(`${props.name}`, '')}${record.propPath}`;
|
|
159
|
+
});
|
|
160
|
+
emit('change', props.model[props.name], eventData);
|
|
153
161
|
};
|
|
154
162
|
|
|
155
163
|
const editCodeHandler = () => {
|
|
@@ -219,7 +219,6 @@ const targetCompConfig = computed(() => {
|
|
|
219
219
|
display: (mForm: FormState, { model }: { model: Record<any, any> }) => model.actionType === ActionType.COMP,
|
|
220
220
|
onChange: (MForm: FormState, v: string, { setModel }: OnChangeHandlerData) => {
|
|
221
221
|
setModel('method', '');
|
|
222
|
-
return v;
|
|
223
222
|
},
|
|
224
223
|
};
|
|
225
224
|
return { ...defaultTargetCompConfig, ...props.config.targetCompConfig };
|
|
@@ -2,13 +2,16 @@
|
|
|
2
2
|
<div class="m-fields-page-fragment-select">
|
|
3
3
|
<div class="page-fragment-select-container">
|
|
4
4
|
<!-- 页面片下拉框 -->
|
|
5
|
-
<
|
|
5
|
+
<MSelect
|
|
6
6
|
class="select"
|
|
7
7
|
:config="selectConfig"
|
|
8
8
|
:model="model"
|
|
9
|
+
:name="name"
|
|
9
10
|
:size="size"
|
|
11
|
+
:prop="prop"
|
|
12
|
+
:disabled="disabled"
|
|
10
13
|
@change="changeHandler"
|
|
11
|
-
></
|
|
14
|
+
></MSelect>
|
|
12
15
|
<!-- 编辑按钮 -->
|
|
13
16
|
<Icon v-if="model[name]" class="icon" :icon="Edit" @click="editPageFragment(model[name])"></Icon>
|
|
14
17
|
</div>
|
|
@@ -20,7 +23,7 @@ import { computed } from 'vue';
|
|
|
20
23
|
import { Edit } from '@element-plus/icons-vue';
|
|
21
24
|
|
|
22
25
|
import { Id, NodeType } from '@tmagic/core';
|
|
23
|
-
import { FieldProps, type PageFragmentSelectConfig } from '@tmagic/form';
|
|
26
|
+
import { FieldProps, MSelect, type PageFragmentSelectConfig, type SelectConfig } from '@tmagic/form';
|
|
24
27
|
|
|
25
28
|
import Icon from '@editor/components/Icon.vue';
|
|
26
29
|
import { useServices } from '@editor/hooks/use-services';
|
|
@@ -32,16 +35,16 @@ defineOptions({
|
|
|
32
35
|
const { editorService } = useServices();
|
|
33
36
|
const emit = defineEmits(['change']);
|
|
34
37
|
|
|
35
|
-
|
|
38
|
+
withDefaults(defineProps<FieldProps<PageFragmentSelectConfig>>(), {
|
|
36
39
|
disabled: false,
|
|
37
40
|
});
|
|
41
|
+
|
|
38
42
|
const pageList = computed(() =>
|
|
39
43
|
editorService.get('root')?.items.filter((item) => item.type === NodeType.PAGE_FRAGMENT),
|
|
40
44
|
);
|
|
41
45
|
|
|
42
|
-
const selectConfig = {
|
|
46
|
+
const selectConfig: SelectConfig = {
|
|
43
47
|
type: 'select',
|
|
44
|
-
name: props.name,
|
|
45
48
|
options: () => {
|
|
46
49
|
if (pageList.value) {
|
|
47
50
|
return pageList.value.map((item) => ({
|
|
@@ -53,8 +56,8 @@ const selectConfig = {
|
|
|
53
56
|
return [];
|
|
54
57
|
},
|
|
55
58
|
};
|
|
56
|
-
const changeHandler =
|
|
57
|
-
emit('change',
|
|
59
|
+
const changeHandler = (v: Id) => {
|
|
60
|
+
emit('change', v);
|
|
58
61
|
};
|
|
59
62
|
|
|
60
63
|
const editPageFragment = (id: Id) => {
|
package/src/fields/UISelect.vue
CHANGED
|
@@ -79,7 +79,6 @@ const clickHandler = ({ detail }: Event & { detail: HTMLElement | MNode }) => {
|
|
|
79
79
|
id = getIdFromEl()(detail as HTMLElement) || id;
|
|
80
80
|
}
|
|
81
81
|
if (id) {
|
|
82
|
-
props.model[props.name] = id;
|
|
83
82
|
emit('change', id);
|
|
84
83
|
mForm?.$emit('field-change', props.prop, id);
|
|
85
84
|
}
|
|
@@ -102,7 +101,6 @@ const startSelect = () => {
|
|
|
102
101
|
|
|
103
102
|
const deleteHandler = () => {
|
|
104
103
|
if (props.model) {
|
|
105
|
-
props.model[props.name] = '';
|
|
106
104
|
emit('change', '');
|
|
107
105
|
mForm?.$emit('field-change', props.prop, '');
|
|
108
106
|
}
|
package/types/index.d.ts
CHANGED
|
@@ -1871,8 +1871,8 @@ declare const __VLS_base$c: _vue_runtime_core.DefineComponent<EditorProps, Servi
|
|
|
1871
1871
|
preventSubmitDefault?: boolean;
|
|
1872
1872
|
extendState?: (_state: _tmagic_form_schema.FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
1873
1873
|
}> & Readonly<{
|
|
1874
|
-
onChange?: ((...args: any[]) => any) | undefined;
|
|
1875
1874
|
onError?: ((...args: any[]) => any) | undefined;
|
|
1875
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
1876
1876
|
"onUpdate:stepActive"?: ((...args: any[]) => any) | undefined;
|
|
1877
1877
|
"onField-change"?: ((...args: any[]) => any) | undefined;
|
|
1878
1878
|
"onField-input"?: ((...args: any[]) => any) | undefined;
|
|
@@ -1887,8 +1887,8 @@ declare const __VLS_base$c: _vue_runtime_core.DefineComponent<EditorProps, Servi
|
|
|
1887
1887
|
submitForm: (native?: boolean) => Promise<any>;
|
|
1888
1888
|
getTextByName: (name: string, config?: _tmagic_form_schema.FormConfig) => string | undefined;
|
|
1889
1889
|
}, {}, {}, {}, _vue_runtime_core.ComponentOptionsMixin, _vue_runtime_core.ComponentOptionsMixin, {
|
|
1890
|
-
change: (...args: any[]) => void;
|
|
1891
1890
|
error: (...args: any[]) => void;
|
|
1891
|
+
change: (...args: any[]) => void;
|
|
1892
1892
|
"update:stepActive": (...args: any[]) => void;
|
|
1893
1893
|
"field-change": (...args: any[]) => void;
|
|
1894
1894
|
"field-input": (...args: any[]) => void;
|
|
@@ -1930,8 +1930,8 @@ declare const __VLS_base$c: _vue_runtime_core.DefineComponent<EditorProps, Servi
|
|
|
1930
1930
|
preventSubmitDefault?: boolean;
|
|
1931
1931
|
extendState?: (_state: _tmagic_form_schema.FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
1932
1932
|
}> & Readonly<{
|
|
1933
|
-
onChange?: ((...args: any[]) => any) | undefined;
|
|
1934
1933
|
onError?: ((...args: any[]) => any) | undefined;
|
|
1934
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
1935
1935
|
"onUpdate:stepActive"?: ((...args: any[]) => any) | undefined;
|
|
1936
1936
|
"onField-change"?: ((...args: any[]) => any) | undefined;
|
|
1937
1937
|
"onField-input"?: ((...args: any[]) => any) | undefined;
|
|
@@ -2019,8 +2019,8 @@ declare const __VLS_base$c: _vue_runtime_core.DefineComponent<EditorProps, Servi
|
|
|
2019
2019
|
preventSubmitDefault?: boolean;
|
|
2020
2020
|
extendState?: (_state: _tmagic_form_schema.FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
2021
2021
|
}> & Readonly<{
|
|
2022
|
-
onChange?: ((...args: any[]) => any) | undefined;
|
|
2023
2022
|
onError?: ((...args: any[]) => any) | undefined;
|
|
2023
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
2024
2024
|
"onUpdate:stepActive"?: ((...args: any[]) => any) | undefined;
|
|
2025
2025
|
"onField-change"?: ((...args: any[]) => any) | undefined;
|
|
2026
2026
|
"onField-input"?: ((...args: any[]) => any) | undefined;
|
|
@@ -2035,8 +2035,8 @@ declare const __VLS_base$c: _vue_runtime_core.DefineComponent<EditorProps, Servi
|
|
|
2035
2035
|
submitForm: (native?: boolean) => Promise<any>;
|
|
2036
2036
|
getTextByName: (name: string, config?: _tmagic_form_schema.FormConfig) => string | undefined;
|
|
2037
2037
|
}, {}, {}, {}, _vue_runtime_core.ComponentOptionsMixin, _vue_runtime_core.ComponentOptionsMixin, {
|
|
2038
|
-
change: (...args: any[]) => void;
|
|
2039
2038
|
error: (...args: any[]) => void;
|
|
2039
|
+
change: (...args: any[]) => void;
|
|
2040
2040
|
"update:stepActive": (...args: any[]) => void;
|
|
2041
2041
|
"field-change": (...args: any[]) => void;
|
|
2042
2042
|
"field-input": (...args: any[]) => void;
|
|
@@ -2078,8 +2078,8 @@ declare const __VLS_base$c: _vue_runtime_core.DefineComponent<EditorProps, Servi
|
|
|
2078
2078
|
preventSubmitDefault?: boolean;
|
|
2079
2079
|
extendState?: (_state: _tmagic_form_schema.FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
2080
2080
|
}> & Readonly<{
|
|
2081
|
-
onChange?: ((...args: any[]) => any) | undefined;
|
|
2082
2081
|
onError?: ((...args: any[]) => any) | undefined;
|
|
2082
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
2083
2083
|
"onUpdate:stepActive"?: ((...args: any[]) => any) | undefined;
|
|
2084
2084
|
"onField-change"?: ((...args: any[]) => any) | undefined;
|
|
2085
2085
|
"onField-input"?: ((...args: any[]) => any) | undefined;
|
|
@@ -2182,8 +2182,8 @@ declare const __VLS_base$c: _vue_runtime_core.DefineComponent<EditorProps, Servi
|
|
|
2182
2182
|
preventSubmitDefault?: boolean;
|
|
2183
2183
|
extendState?: (_state: _tmagic_form_schema.FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
2184
2184
|
}> & Readonly<{
|
|
2185
|
-
onChange?: ((...args: any[]) => any) | undefined;
|
|
2186
2185
|
onError?: ((...args: any[]) => any) | undefined;
|
|
2186
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
2187
2187
|
"onUpdate:stepActive"?: ((...args: any[]) => any) | undefined;
|
|
2188
2188
|
"onField-change"?: ((...args: any[]) => any) | undefined;
|
|
2189
2189
|
"onField-input"?: ((...args: any[]) => any) | undefined;
|
|
@@ -2198,8 +2198,8 @@ declare const __VLS_base$c: _vue_runtime_core.DefineComponent<EditorProps, Servi
|
|
|
2198
2198
|
submitForm: (native?: boolean) => Promise<any>;
|
|
2199
2199
|
getTextByName: (name: string, config?: _tmagic_form_schema.FormConfig) => string | undefined;
|
|
2200
2200
|
}, {}, {}, {}, _vue_runtime_core.ComponentOptionsMixin, _vue_runtime_core.ComponentOptionsMixin, {
|
|
2201
|
-
change: (...args: any[]) => void;
|
|
2202
2201
|
error: (...args: any[]) => void;
|
|
2202
|
+
change: (...args: any[]) => void;
|
|
2203
2203
|
"update:stepActive": (...args: any[]) => void;
|
|
2204
2204
|
"field-change": (...args: any[]) => void;
|
|
2205
2205
|
"field-input": (...args: any[]) => void;
|
|
@@ -2241,8 +2241,8 @@ declare const __VLS_base$c: _vue_runtime_core.DefineComponent<EditorProps, Servi
|
|
|
2241
2241
|
preventSubmitDefault?: boolean;
|
|
2242
2242
|
extendState?: (_state: _tmagic_form_schema.FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
2243
2243
|
}> & Readonly<{
|
|
2244
|
-
onChange?: ((...args: any[]) => any) | undefined;
|
|
2245
2244
|
onError?: ((...args: any[]) => any) | undefined;
|
|
2245
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
2246
2246
|
"onUpdate:stepActive"?: ((...args: any[]) => any) | undefined;
|
|
2247
2247
|
"onField-change"?: ((...args: any[]) => any) | undefined;
|
|
2248
2248
|
"onField-input"?: ((...args: any[]) => any) | undefined;
|
|
@@ -2330,8 +2330,8 @@ declare const __VLS_base$c: _vue_runtime_core.DefineComponent<EditorProps, Servi
|
|
|
2330
2330
|
preventSubmitDefault?: boolean;
|
|
2331
2331
|
extendState?: (_state: _tmagic_form_schema.FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
2332
2332
|
}> & Readonly<{
|
|
2333
|
-
onChange?: ((...args: any[]) => any) | undefined;
|
|
2334
2333
|
onError?: ((...args: any[]) => any) | undefined;
|
|
2334
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
2335
2335
|
"onUpdate:stepActive"?: ((...args: any[]) => any) | undefined;
|
|
2336
2336
|
"onField-change"?: ((...args: any[]) => any) | undefined;
|
|
2337
2337
|
"onField-input"?: ((...args: any[]) => any) | undefined;
|
|
@@ -2346,8 +2346,8 @@ declare const __VLS_base$c: _vue_runtime_core.DefineComponent<EditorProps, Servi
|
|
|
2346
2346
|
submitForm: (native?: boolean) => Promise<any>;
|
|
2347
2347
|
getTextByName: (name: string, config?: _tmagic_form_schema.FormConfig) => string | undefined;
|
|
2348
2348
|
}, {}, {}, {}, _vue_runtime_core.ComponentOptionsMixin, _vue_runtime_core.ComponentOptionsMixin, {
|
|
2349
|
-
change: (...args: any[]) => void;
|
|
2350
2349
|
error: (...args: any[]) => void;
|
|
2350
|
+
change: (...args: any[]) => void;
|
|
2351
2351
|
"update:stepActive": (...args: any[]) => void;
|
|
2352
2352
|
"field-change": (...args: any[]) => void;
|
|
2353
2353
|
"field-input": (...args: any[]) => void;
|
|
@@ -2389,8 +2389,8 @@ declare const __VLS_base$c: _vue_runtime_core.DefineComponent<EditorProps, Servi
|
|
|
2389
2389
|
preventSubmitDefault?: boolean;
|
|
2390
2390
|
extendState?: (_state: _tmagic_form_schema.FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
2391
2391
|
}> & Readonly<{
|
|
2392
|
-
onChange?: ((...args: any[]) => any) | undefined;
|
|
2393
2392
|
onError?: ((...args: any[]) => any) | undefined;
|
|
2393
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
2394
2394
|
"onUpdate:stepActive"?: ((...args: any[]) => any) | undefined;
|
|
2395
2395
|
"onField-change"?: ((...args: any[]) => any) | undefined;
|
|
2396
2396
|
"onField-input"?: ((...args: any[]) => any) | undefined;
|
|
@@ -2813,8 +2813,8 @@ declare const __VLS_base$7: _vue_runtime_core.DefineComponent<__VLS_Props$d, {
|
|
|
2813
2813
|
preventSubmitDefault?: boolean;
|
|
2814
2814
|
extendState?: (_state: FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
2815
2815
|
}> & Readonly<{
|
|
2816
|
-
onChange?: ((...args: any[]) => any) | undefined;
|
|
2817
2816
|
onError?: ((...args: any[]) => any) | undefined;
|
|
2817
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
2818
2818
|
"onUpdate:stepActive"?: ((...args: any[]) => any) | undefined;
|
|
2819
2819
|
"onField-change"?: ((...args: any[]) => any) | undefined;
|
|
2820
2820
|
"onField-input"?: ((...args: any[]) => any) | undefined;
|
|
@@ -2829,8 +2829,8 @@ declare const __VLS_base$7: _vue_runtime_core.DefineComponent<__VLS_Props$d, {
|
|
|
2829
2829
|
submitForm: (native?: boolean) => Promise<any>;
|
|
2830
2830
|
getTextByName: (name: string, config?: _tmagic_form_schema.FormConfig) => string | undefined;
|
|
2831
2831
|
}, {}, {}, {}, _vue_runtime_core.ComponentOptionsMixin, _vue_runtime_core.ComponentOptionsMixin, {
|
|
2832
|
-
change: (...args: any[]) => void;
|
|
2833
2832
|
error: (...args: any[]) => void;
|
|
2833
|
+
change: (...args: any[]) => void;
|
|
2834
2834
|
"update:stepActive": (...args: any[]) => void;
|
|
2835
2835
|
"field-change": (...args: any[]) => void;
|
|
2836
2836
|
"field-input": (...args: any[]) => void;
|
|
@@ -2872,8 +2872,8 @@ declare const __VLS_base$7: _vue_runtime_core.DefineComponent<__VLS_Props$d, {
|
|
|
2872
2872
|
preventSubmitDefault?: boolean;
|
|
2873
2873
|
extendState?: (_state: FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
2874
2874
|
}> & Readonly<{
|
|
2875
|
-
onChange?: ((...args: any[]) => any) | undefined;
|
|
2876
2875
|
onError?: ((...args: any[]) => any) | undefined;
|
|
2876
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
2877
2877
|
"onUpdate:stepActive"?: ((...args: any[]) => any) | undefined;
|
|
2878
2878
|
"onField-change"?: ((...args: any[]) => any) | undefined;
|
|
2879
2879
|
"onField-input"?: ((...args: any[]) => any) | undefined;
|
|
@@ -2961,8 +2961,8 @@ declare const __VLS_base$7: _vue_runtime_core.DefineComponent<__VLS_Props$d, {
|
|
|
2961
2961
|
preventSubmitDefault?: boolean;
|
|
2962
2962
|
extendState?: (_state: FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
2963
2963
|
}> & Readonly<{
|
|
2964
|
-
onChange?: ((...args: any[]) => any) | undefined;
|
|
2965
2964
|
onError?: ((...args: any[]) => any) | undefined;
|
|
2965
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
2966
2966
|
"onUpdate:stepActive"?: ((...args: any[]) => any) | undefined;
|
|
2967
2967
|
"onField-change"?: ((...args: any[]) => any) | undefined;
|
|
2968
2968
|
"onField-input"?: ((...args: any[]) => any) | undefined;
|
|
@@ -2977,8 +2977,8 @@ declare const __VLS_base$7: _vue_runtime_core.DefineComponent<__VLS_Props$d, {
|
|
|
2977
2977
|
submitForm: (native?: boolean) => Promise<any>;
|
|
2978
2978
|
getTextByName: (name: string, config?: _tmagic_form_schema.FormConfig) => string | undefined;
|
|
2979
2979
|
}, {}, {}, {}, _vue_runtime_core.ComponentOptionsMixin, _vue_runtime_core.ComponentOptionsMixin, {
|
|
2980
|
-
change: (...args: any[]) => void;
|
|
2981
2980
|
error: (...args: any[]) => void;
|
|
2981
|
+
change: (...args: any[]) => void;
|
|
2982
2982
|
"update:stepActive": (...args: any[]) => void;
|
|
2983
2983
|
"field-change": (...args: any[]) => void;
|
|
2984
2984
|
"field-input": (...args: any[]) => void;
|
|
@@ -3020,8 +3020,8 @@ declare const __VLS_base$7: _vue_runtime_core.DefineComponent<__VLS_Props$d, {
|
|
|
3020
3020
|
preventSubmitDefault?: boolean;
|
|
3021
3021
|
extendState?: (_state: FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
3022
3022
|
}> & Readonly<{
|
|
3023
|
-
onChange?: ((...args: any[]) => any) | undefined;
|
|
3024
3023
|
onError?: ((...args: any[]) => any) | undefined;
|
|
3024
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
3025
3025
|
"onUpdate:stepActive"?: ((...args: any[]) => any) | undefined;
|
|
3026
3026
|
"onField-change"?: ((...args: any[]) => any) | undefined;
|
|
3027
3027
|
"onField-input"?: ((...args: any[]) => any) | undefined;
|
|
@@ -3123,8 +3123,8 @@ declare const __VLS_base$7: _vue_runtime_core.DefineComponent<__VLS_Props$d, {
|
|
|
3123
3123
|
preventSubmitDefault?: boolean;
|
|
3124
3124
|
extendState?: (_state: FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
3125
3125
|
}> & Readonly<{
|
|
3126
|
-
onChange?: ((...args: any[]) => any) | undefined;
|
|
3127
3126
|
onError?: ((...args: any[]) => any) | undefined;
|
|
3127
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
3128
3128
|
"onUpdate:stepActive"?: ((...args: any[]) => any) | undefined;
|
|
3129
3129
|
"onField-change"?: ((...args: any[]) => any) | undefined;
|
|
3130
3130
|
"onField-input"?: ((...args: any[]) => any) | undefined;
|
|
@@ -3139,8 +3139,8 @@ declare const __VLS_base$7: _vue_runtime_core.DefineComponent<__VLS_Props$d, {
|
|
|
3139
3139
|
submitForm: (native?: boolean) => Promise<any>;
|
|
3140
3140
|
getTextByName: (name: string, config?: _tmagic_form_schema.FormConfig) => string | undefined;
|
|
3141
3141
|
}, {}, {}, {}, _vue_runtime_core.ComponentOptionsMixin, _vue_runtime_core.ComponentOptionsMixin, {
|
|
3142
|
-
change: (...args: any[]) => void;
|
|
3143
3142
|
error: (...args: any[]) => void;
|
|
3143
|
+
change: (...args: any[]) => void;
|
|
3144
3144
|
"update:stepActive": (...args: any[]) => void;
|
|
3145
3145
|
"field-change": (...args: any[]) => void;
|
|
3146
3146
|
"field-input": (...args: any[]) => void;
|
|
@@ -3182,8 +3182,8 @@ declare const __VLS_base$7: _vue_runtime_core.DefineComponent<__VLS_Props$d, {
|
|
|
3182
3182
|
preventSubmitDefault?: boolean;
|
|
3183
3183
|
extendState?: (_state: FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
3184
3184
|
}> & Readonly<{
|
|
3185
|
-
onChange?: ((...args: any[]) => any) | undefined;
|
|
3186
3185
|
onError?: ((...args: any[]) => any) | undefined;
|
|
3186
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
3187
3187
|
"onUpdate:stepActive"?: ((...args: any[]) => any) | undefined;
|
|
3188
3188
|
"onField-change"?: ((...args: any[]) => any) | undefined;
|
|
3189
3189
|
"onField-input"?: ((...args: any[]) => any) | undefined;
|
|
@@ -3271,8 +3271,8 @@ declare const __VLS_base$7: _vue_runtime_core.DefineComponent<__VLS_Props$d, {
|
|
|
3271
3271
|
preventSubmitDefault?: boolean;
|
|
3272
3272
|
extendState?: (_state: FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
3273
3273
|
}> & Readonly<{
|
|
3274
|
-
onChange?: ((...args: any[]) => any) | undefined;
|
|
3275
3274
|
onError?: ((...args: any[]) => any) | undefined;
|
|
3275
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
3276
3276
|
"onUpdate:stepActive"?: ((...args: any[]) => any) | undefined;
|
|
3277
3277
|
"onField-change"?: ((...args: any[]) => any) | undefined;
|
|
3278
3278
|
"onField-input"?: ((...args: any[]) => any) | undefined;
|
|
@@ -3287,8 +3287,8 @@ declare const __VLS_base$7: _vue_runtime_core.DefineComponent<__VLS_Props$d, {
|
|
|
3287
3287
|
submitForm: (native?: boolean) => Promise<any>;
|
|
3288
3288
|
getTextByName: (name: string, config?: _tmagic_form_schema.FormConfig) => string | undefined;
|
|
3289
3289
|
}, {}, {}, {}, _vue_runtime_core.ComponentOptionsMixin, _vue_runtime_core.ComponentOptionsMixin, {
|
|
3290
|
-
change: (...args: any[]) => void;
|
|
3291
3290
|
error: (...args: any[]) => void;
|
|
3291
|
+
change: (...args: any[]) => void;
|
|
3292
3292
|
"update:stepActive": (...args: any[]) => void;
|
|
3293
3293
|
"field-change": (...args: any[]) => void;
|
|
3294
3294
|
"field-input": (...args: any[]) => void;
|
|
@@ -3330,8 +3330,8 @@ declare const __VLS_base$7: _vue_runtime_core.DefineComponent<__VLS_Props$d, {
|
|
|
3330
3330
|
preventSubmitDefault?: boolean;
|
|
3331
3331
|
extendState?: (_state: FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
3332
3332
|
}> & Readonly<{
|
|
3333
|
-
onChange?: ((...args: any[]) => any) | undefined;
|
|
3334
3333
|
onError?: ((...args: any[]) => any) | undefined;
|
|
3334
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
3335
3335
|
"onUpdate:stepActive"?: ((...args: any[]) => any) | undefined;
|
|
3336
3336
|
"onField-change"?: ((...args: any[]) => any) | undefined;
|
|
3337
3337
|
"onField-input"?: ((...args: any[]) => any) | undefined;
|
|
@@ -3409,8 +3409,8 @@ declare const __VLS_base$6: _vue_runtime_core.DefineComponent<__VLS_Props$c, {
|
|
|
3409
3409
|
preventSubmitDefault?: boolean;
|
|
3410
3410
|
extendState?: (_state: FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
3411
3411
|
}> & Readonly<{
|
|
3412
|
-
onChange?: ((...args: any[]) => any) | undefined;
|
|
3413
3412
|
onError?: ((...args: any[]) => any) | undefined;
|
|
3413
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
3414
3414
|
"onUpdate:stepActive"?: ((...args: any[]) => any) | undefined;
|
|
3415
3415
|
"onField-change"?: ((...args: any[]) => any) | undefined;
|
|
3416
3416
|
"onField-input"?: ((...args: any[]) => any) | undefined;
|
|
@@ -3425,8 +3425,8 @@ declare const __VLS_base$6: _vue_runtime_core.DefineComponent<__VLS_Props$c, {
|
|
|
3425
3425
|
submitForm: (native?: boolean) => Promise<any>;
|
|
3426
3426
|
getTextByName: (name: string, config?: FormConfig) => string | undefined;
|
|
3427
3427
|
}, {}, {}, {}, _vue_runtime_core.ComponentOptionsMixin, _vue_runtime_core.ComponentOptionsMixin, {
|
|
3428
|
-
change: (...args: any[]) => void;
|
|
3429
3428
|
error: (...args: any[]) => void;
|
|
3429
|
+
change: (...args: any[]) => void;
|
|
3430
3430
|
"update:stepActive": (...args: any[]) => void;
|
|
3431
3431
|
"field-change": (...args: any[]) => void;
|
|
3432
3432
|
"field-input": (...args: any[]) => void;
|
|
@@ -3468,8 +3468,8 @@ declare const __VLS_base$6: _vue_runtime_core.DefineComponent<__VLS_Props$c, {
|
|
|
3468
3468
|
preventSubmitDefault?: boolean;
|
|
3469
3469
|
extendState?: (_state: FormState) => Record<string, any> | Promise<Record<string, any>>;
|
|
3470
3470
|
}> & Readonly<{
|
|
3471
|
-
onChange?: ((...args: any[]) => any) | undefined;
|
|
3472
3471
|
onError?: ((...args: any[]) => any) | undefined;
|
|
3472
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
3473
3473
|
"onUpdate:stepActive"?: ((...args: any[]) => any) | undefined;
|
|
3474
3474
|
"onField-change"?: ((...args: any[]) => any) | undefined;
|
|
3475
3475
|
"onField-input"?: ((...args: any[]) => any) | undefined;
|