@fecp/designer 5.4.62 → 5.4.64

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.
Files changed (29) hide show
  1. package/es/designer/package.json.mjs +1 -1
  2. package/es/designer/src/components/TemplateSelector.vue.mjs +1 -116
  3. package/es/designer/src/components/TemplateSelector.vue2.mjs +116 -1
  4. package/es/designer/src/packages/dialog/index.vue.mjs +1 -1
  5. package/es/designer/src/packages/dialog/index.vue2.mjs +988 -0
  6. package/es/designer/src/packages/dialogGlobal/index.vue.mjs +1 -1
  7. package/es/designer/src/packages/dialogGlobal/index.vue2.mjs +1035 -0
  8. package/es/designer/src/packages/form/property/subForm.vue.mjs +1 -1
  9. package/es/designer/src/packages/form/property/subTable.vue.mjs +1 -1
  10. package/es/designer/src/packages/form/property/widgets.vue.mjs +64 -34
  11. package/es/designer.css +26 -26
  12. package/es/packages/mobile/src/components/base/button/Button.vue.mjs +1 -1
  13. package/es/packages/vue/src/components/forms/form/Form.vue.mjs +50 -62
  14. package/es/packages/vue/src/components/layout/Layout.vue.mjs +7 -2
  15. package/lib/designer/package.json.js +1 -1
  16. package/lib/designer/src/components/TemplateSelector.vue.js +0 -115
  17. package/lib/designer/src/components/TemplateSelector.vue2.js +115 -0
  18. package/lib/designer/src/packages/dialog/index.vue.js +1 -1
  19. package/lib/designer/src/packages/dialog/index.vue2.js +988 -0
  20. package/lib/designer/src/packages/dialogGlobal/index.vue.js +1 -1
  21. package/lib/designer/src/packages/dialogGlobal/index.vue2.js +1035 -0
  22. package/lib/designer/src/packages/form/property/subForm.vue.js +1 -1
  23. package/lib/designer/src/packages/form/property/subTable.vue.js +1 -1
  24. package/lib/designer/src/packages/form/property/widgets.vue.js +81 -51
  25. package/lib/designer.css +26 -26
  26. package/lib/packages/mobile/src/components/base/button/Button.vue.js +1 -1
  27. package/lib/packages/vue/src/components/forms/form/Form.vue.js +50 -62
  28. package/lib/packages/vue/src/components/layout/Layout.vue.js +7 -2
  29. package/package.json +1 -1
@@ -12,7 +12,7 @@ require("../../../../../node_modules/element-plus/es/index.js");
12
12
  ;/* empty css */
13
13
  const vue = require("vue");
14
14
  const common = require("../../utils/common.js");
15
- const TemplateSelector = require("../../../components/TemplateSelector.vue.js");
15
+ const TemplateSelector = require("../../../components/TemplateSelector.vue2.js");
16
16
  const eventBus = require("../../utils/eventBus.js");
17
17
  const ValueSelector = require("../../../components/ValueSelector.vue.js");
18
18
  const ParamsConfig = require("../../../components/ParamsConfig.vue2.js");
@@ -25,7 +25,7 @@ require("../../../../../node_modules/element-plus/theme-chalk/el-dropdown-item.c
25
25
  ;/* empty css */
26
26
  const vue = require("vue");
27
27
  const common = require("../../utils/common.js");
28
- const TemplateSelector = require("../../../components/TemplateSelector.vue.js");
28
+ const TemplateSelector = require("../../../components/TemplateSelector.vue2.js");
29
29
  const eventBus = require("../../utils/eventBus.js");
30
30
  const ParamsConfig = require("../../../components/ParamsConfig.vue2.js");
31
31
  const index = require("../../../api/index.js");
@@ -23,7 +23,7 @@ const ParamsConfig = require("../../../components/ParamsConfig.vue2.js");
23
23
  const vue = require("vue");
24
24
  const common = require("../../utils/common.js");
25
25
  const OptionConfig = require("../../../components/OptionConfig.vue.js");
26
- const index = require("../aside/index.js");
26
+ const index$1 = require("../aside/index.js");
27
27
  const EventConfigButton = require("../../../components/EventConfigButton.vue.js");
28
28
  const DataSourceSelect = require("../../../components/DataSourceSelect.vue.js");
29
29
  const ConditionConfigButton = ;/* empty css */
@@ -32,18 +32,40 @@ const eventBus = require("../../utils/eventBus.js");
32
32
  const FieldSetMapping = require("../../../components/FieldSetMapping.vue2.js");
33
33
  const OnlyFLowConfigButton = ;/* empty css */
34
34
  const FormulaEditorInput = require("../../../components/FormulaEditorInput.vue.js");
35
- const index$1 = require("../../../api/index.js");
36
- const DialogSelect = require("../../../components/DialogSelect.vue.js");
37
- ;/* empty css */
35
+ const index$2 = require("../../../api/index.js");
36
+ ;/* empty css */
37
+ ;/* empty css */
38
+ ;/* empty css */
39
+ ;/* empty css */
40
+ ;/* empty css */
41
+ ;/* empty css */
42
+ ;/* empty css */
43
+ ;/* empty css */
44
+ ;/* empty css */
45
+ ;/* empty css */
46
+ ;/* empty css */
47
+ require("../../../../../node_modules/element-plus/theme-chalk/el-tooltip.css.js");
48
+ ;/* empty css */
49
+ ;/* empty css */
50
+ ;/* empty css */
38
51
  const _pluginVue_exportHelper = require("../../../../../_virtual/_plugin-vue_export-helper.js");
39
- const index$2 = require("../../../../../node_modules/element-plus/es/components/collapse/index.js");
40
- const index$3 = require("../../../../../node_modules/element-plus/es/components/select/index.js");
41
- const index$4 = require("../../../../../node_modules/element-plus/es/components/form/index.js");
42
- const index$5 = require("../../../../../node_modules/element-plus/es/components/input/index.js");
43
- const index$6 = require("../../../../../node_modules/element-plus/es/components/checkbox/index.js");
44
- const index$7 = require("../../../../../node_modules/element-plus/es/components/radio/index.js");
45
- const index$8 = require("../../../../../node_modules/element-plus/es/components/input-number/index.js");
46
- const index$9 = require("../../../../../node_modules/element-plus/es/components/switch/index.js");
52
+ ;/* empty css */
53
+ ;/* empty css */
54
+ require("../../../components/TemplateSelector.vue.js");
55
+ require("../../table/default.js");
56
+ ;/* empty css */
57
+ ;/* empty css */
58
+ ;/* empty css */
59
+ const index = require("../../../store/index.js");
60
+ ;/* empty css */
61
+ const index$3 = require("../../../../../node_modules/element-plus/es/components/collapse/index.js");
62
+ const index$4 = require("../../../../../node_modules/element-plus/es/components/select/index.js");
63
+ const index$5 = require("../../../../../node_modules/element-plus/es/components/form/index.js");
64
+ const index$6 = require("../../../../../node_modules/element-plus/es/components/input/index.js");
65
+ const index$7 = require("../../../../../node_modules/element-plus/es/components/checkbox/index.js");
66
+ const index$8 = require("../../../../../node_modules/element-plus/es/components/radio/index.js");
67
+ const index$9 = require("../../../../../node_modules/element-plus/es/components/input-number/index.js");
68
+ const index$a = require("../../../../../node_modules/element-plus/es/components/switch/index.js");
47
69
  const _hoisted_1 = {
48
70
  key: 0,
49
71
  class: "data-source-fields"
@@ -82,8 +104,17 @@ const _hoisted_20 = {
82
104
  const _sfc_main = {
83
105
  __name: "widgets",
84
106
  setup(__props) {
85
- const currentItem = vue.computed(() => {
86
- return common.getCurrentItem();
107
+ const currentItem = vue.computed({
108
+ get: () => {
109
+ const item = index.default.getters.selectedItem;
110
+ if (item) {
111
+ return vue.reactive({ ...index$1.defaultProperty, ...item });
112
+ }
113
+ return item;
114
+ },
115
+ set(value) {
116
+ index.default.commit("set_selected_item", value);
117
+ }
87
118
  });
88
119
  const activeName = vue.ref(["common"]);
89
120
  const validationRules = {
@@ -126,23 +157,9 @@ const _sfc_main = {
126
157
  ];
127
158
  });
128
159
  const fieldTypes = vue.computed(() => {
129
- const fieldTypeArr = [
130
- "text",
131
- "textarea",
132
- "number",
133
- "date",
134
- "select",
135
- "multipleSelection",
136
- "radio",
137
- "checkbox",
138
- "switch"
139
- ];
140
- const basicComponents = index.default.find((c) => c.name === "basic");
141
- return [
142
- ...basicComponents == null ? void 0 : basicComponents.children.filter(
143
- (item) => fieldTypeArr.includes(item.fieldType)
144
- )
145
- ];
160
+ const basicComponents = index$1.default.find((c) => c.name === "basic");
161
+ const advancedComponents = index$1.default.find((c) => c.name === "advanced");
162
+ return [...basicComponents == null ? void 0 : basicComponents.children, ...advancedComponents == null ? void 0 : advancedComponents.children];
146
163
  });
147
164
  function handleFieldTypeChange(fieldType) {
148
165
  const item = currentItem.value;
@@ -211,7 +228,7 @@ const _sfc_main = {
211
228
  const loadGlobalDialogs = async () => {
212
229
  dialogLoading.value = true;
213
230
  try {
214
- const response = await index$1.default.getAllTemplateDialog();
231
+ const response = await index$2.default.getAllTemplateDialog();
215
232
  globalDialogs.value = [];
216
233
  for (let dialog of response) {
217
234
  globalDialogs.value.push({
@@ -256,7 +273,7 @@ const _sfc_main = {
256
273
  const tableId = currDialog.value.subTableId;
257
274
  if (tableId) {
258
275
  try {
259
- const response = await index$1.default.getById(tableId, false);
276
+ const response = await index$2.default.getById(tableId, false);
260
277
  tableOptions.value = JSON.parse(response.context);
261
278
  console.log("🚀 ~ 需要获取表格配置,表格ID:", tableId);
262
279
  } catch (error) {
@@ -293,19 +310,19 @@ const _sfc_main = {
293
310
  // }
294
311
  );
295
312
  return (_ctx, _cache) => {
296
- const _component_el_option = index$3.ElOption;
297
- const _component_el_select = index$3.ElSelect;
298
- const _component_el_input = index$5.ElInput;
299
- const _component_el_form_item = index$4.ElFormItem;
300
- const _component_el_checkbox = index$6.ElCheckbox;
301
- const _component_el_radio_button = index$7.ElRadioButton;
302
- const _component_el_radio_group = index$7.ElRadioGroup;
303
- const _component_el_input_number = index$8.ElInputNumber;
304
- const _component_el_switch = index$9.ElSwitch;
313
+ const _component_el_option = index$4.ElOption;
314
+ const _component_el_select = index$4.ElSelect;
315
+ const _component_el_input = index$6.ElInput;
316
+ const _component_el_form_item = index$5.ElFormItem;
317
+ const _component_el_checkbox = index$7.ElCheckbox;
318
+ const _component_el_radio_button = index$8.ElRadioButton;
319
+ const _component_el_radio_group = index$8.ElRadioGroup;
320
+ const _component_el_input_number = index$9.ElInputNumber;
321
+ const _component_el_switch = index$a.ElSwitch;
305
322
  const _component_ParamsConfig = ParamsConfig.default;
306
- const _component_el_form = index$4.ElForm;
307
- const _component_el_collapse_item = index$2.ElCollapseItem;
308
- const _component_el_collapse = index$2.ElCollapse;
323
+ const _component_el_form = index$5.ElForm;
324
+ const _component_el_collapse_item = index$3.ElCollapseItem;
325
+ const _component_el_collapse = index$3.ElCollapse;
309
326
  return vue.openBlock(), vue.createBlock(_component_el_collapse, {
310
327
  class: "setting",
311
328
  modelValue: vue.unref(activeName),
@@ -619,15 +636,28 @@ const _sfc_main = {
619
636
  ]),
620
637
  vue.createElementVNode("div", _hoisted_4, [
621
638
  _cache[69] || (_cache[69] = vue.createElementVNode("span", { class: "field-label" }, "选择弹层", -1)),
622
- vue.createVNode(DialogSelect.default, {
639
+ vue.createVNode(_component_el_select, {
623
640
  modelValue: vue.unref(currentItem).suffixDialogId,
624
641
  "onUpdate:modelValue": _cache[20] || (_cache[20] = ($event) => vue.unref(currentItem).suffixDialogId = $event),
642
+ placeholder: "请选择弹层",
643
+ filterable: "",
625
644
  loading: vue.unref(dialogLoading),
626
- dialogOptions: vue.unref(dialogOptions),
627
- isGlobal: vue.unref(currentItem).dialogSource == "global"
628
- }, null, 8, ["modelValue", "loading", "dialogOptions", "isGlobal"])
645
+ clearable: "",
646
+ style: { "width": "100%" }
647
+ }, {
648
+ default: vue.withCtx(() => [
649
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(dialogOptions), (dialog) => {
650
+ return vue.openBlock(), vue.createBlock(_component_el_option, {
651
+ key: dialog.id,
652
+ label: dialog.name,
653
+ value: dialog.id
654
+ }, null, 8, ["label", "value"]);
655
+ }), 128))
656
+ ]),
657
+ _: 1
658
+ }, 8, ["modelValue", "loading"])
629
659
  ]),
630
- vue.unref(currentItem).dialogSource == "global" && vue.unref(currentItem).suffixDialogId && vue.unref(currDialog).contentSource === "table" ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
660
+ vue.unref(currentItem).dialogSource == "global" && vue.unref(currentItem).suffixDialogId ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
631
661
  vue.createElementVNode("div", _hoisted_5, [
632
662
  _cache[73] || (_cache[73] = vue.createElementVNode("span", { class: "field-label" }, "选择模式", -1)),
633
663
  vue.createVNode(_component_el_radio_group, {
@@ -1170,5 +1200,5 @@ const _sfc_main = {
1170
1200
  };
1171
1201
  }
1172
1202
  };
1173
- const widgets = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-3dab7919"]]);
1203
+ const widgets = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-8b0152bc"]]);
1174
1204
  exports.default = widgets;
package/lib/designer.css CHANGED
@@ -3235,17 +3235,17 @@ to {
3235
3235
  width: 100%;
3236
3236
  }
3237
3237
 
3238
- .collapse-header[data-v-3dab7919] {
3238
+ .collapse-header[data-v-8b0152bc] {
3239
3239
  display: flex;
3240
3240
  align-items: center;
3241
3241
  justify-content: space-between;
3242
3242
  width: 100%;
3243
3243
  padding-right: 20px;
3244
3244
  }
3245
- .setting[data-v-3dab7919] .el-collapse-item__content {
3245
+ .setting[data-v-8b0152bc] .el-collapse-item__content {
3246
3246
  position: relative;
3247
3247
  }
3248
- .field-type-select[data-v-3dab7919] {
3248
+ .field-type-select[data-v-8b0152bc] {
3249
3249
  position: absolute;
3250
3250
  top: 11px;
3251
3251
  right: 16px;
@@ -3256,41 +3256,41 @@ to {
3256
3256
  transition: all 0.3s;
3257
3257
  border-radius: 4px;
3258
3258
  }
3259
- .field-type-select[data-v-3dab7919] .el-select__wrapper {
3259
+ .field-type-select[data-v-8b0152bc] .el-select__wrapper {
3260
3260
  background: transparent;
3261
3261
  box-shadow: none;
3262
3262
  }
3263
- .field-type-select[data-v-3dab7919] .el-select__selected-item {
3263
+ .field-type-select[data-v-8b0152bc] .el-select__selected-item {
3264
3264
  text-align: center;
3265
3265
  }
3266
- .width-input[data-v-3dab7919] {
3266
+ .width-input[data-v-8b0152bc] {
3267
3267
  width: 100%;
3268
3268
  }
3269
- .data-source-fields[data-v-3dab7919] {
3269
+ .data-source-fields[data-v-8b0152bc] {
3270
3270
  display: flex;
3271
3271
  flex-direction: column;
3272
3272
  gap: 8px;
3273
3273
  margin-bottom: 18px;
3274
3274
  }
3275
- .data-source-fields .field-item[data-v-3dab7919] {
3275
+ .data-source-fields .field-item[data-v-8b0152bc] {
3276
3276
  display: flex;
3277
3277
  align-items: center;
3278
3278
  gap: 8px;
3279
3279
  }
3280
- .data-source-fields .field-item .field-label[data-v-3dab7919] {
3280
+ .data-source-fields .field-item .field-label[data-v-8b0152bc] {
3281
3281
  width: 80px;
3282
3282
  font-size: 13px;
3283
3283
  color: #606266;
3284
3284
  text-align: right;
3285
3285
  flex-shrink: 0;
3286
3286
  }
3287
- .data-source-fields .field-item .field-label[data-v-3dab7919]::after {
3287
+ .data-source-fields .field-item .field-label[data-v-8b0152bc]::after {
3288
3288
  content: ":";
3289
3289
  }
3290
- .data-source-fields .field-item .el-input[data-v-3dab7919] {
3290
+ .data-source-fields .field-item .el-input[data-v-8b0152bc] {
3291
3291
  flex: 1;
3292
3292
  }
3293
- [data-v-3dab7919] .el-form-item__content {
3293
+ [data-v-8b0152bc] .el-form-item__content {
3294
3294
  flex-wrap: wrap !important;
3295
3295
  }
3296
3296
  .buttons-table[data-v-8ebdd5a8] {
@@ -5904,28 +5904,27 @@ body,
5904
5904
  width: 80px;
5905
5905
  font-size: var(--el-font-size-extra-small);
5906
5906
  }
5907
- .fec-form[data-v-67c25477] {
5907
+ .fec-form[data-v-5e17ab81] {
5908
5908
  height: 100%;
5909
5909
  }
5910
- [data-v-67c25477] .vgl-item {
5910
+ [data-v-5e17ab81] .vgl-item {
5911
5911
  transition: none;
5912
5912
  }
5913
- [data-v-67c25477] .vgl-item > .el-form-item {
5913
+ [data-v-5e17ab81] .vgl-item > .el-form-item {
5914
5914
  width: 100%;
5915
5915
  padding: 12px 8px 0 8px;
5916
5916
  height: calc(100% - 15px);
5917
5917
  display: flex;
5918
5918
  }
5919
- [data-v-67c25477] .vgl-item > .el-form-item.el-form-item--label-top {
5919
+ [data-v-5e17ab81] .vgl-item > .el-form-item.el-form-item--label-top {
5920
5920
  flex-direction: column;
5921
5921
  }
5922
- [data-v-67c25477] .vgl-item > .el-form-item .el-form-item__label {
5922
+ [data-v-5e17ab81] .vgl-item > .el-form-item .el-form-item__label {
5923
5923
  line-height: 20px;
5924
5924
  display: flex;
5925
5925
  align-items: center;
5926
- pointer-events: none;
5927
5926
  }
5928
- [data-v-67c25477] .vgl-item > .el-container {
5927
+ [data-v-5e17ab81] .vgl-item > .el-container {
5929
5928
  height: auto !important;
5930
5929
  }.cell-content .cell-text[data-v-3e5372d4] {
5931
5930
  display: inline-block;
@@ -6261,17 +6260,18 @@ body,
6261
6260
  max-height: 90% !important;
6262
6261
  padding: 0 !important;
6263
6262
  }
6264
- .fec-layout-row[data-v-18b8b23a] {
6263
+ .fec-layout-row[data-v-09545121] {
6265
6264
  width: 100%;
6266
6265
  height: 100%;
6266
+ overflow: hidden;
6267
6267
  }
6268
- .fec-layout-row[data-v-18b8b23a] .el-col {
6268
+ .fec-layout-row[data-v-09545121] .el-col {
6269
6269
  height: 100%;
6270
6270
  }
6271
- .fec-layout-row[data-v-18b8b23a] .el-col .el-scrollbar__bar {
6271
+ .fec-layout-row[data-v-09545121] .el-col .el-scrollbar__bar {
6272
6272
  display: none;
6273
6273
  }
6274
- .grid-content[data-v-18b8b23a] {
6274
+ .grid-content[data-v-09545121] {
6275
6275
  border-radius: 9px 9px 4px 4px;
6276
6276
  background-color: #fff;
6277
6277
  position: relative;
@@ -6282,7 +6282,7 @@ body,
6282
6282
  padding: 16px 16px 16px 16px;
6283
6283
  } */
6284
6284
  }
6285
- .grid-content-statistics[data-v-18b8b23a] {
6285
+ .grid-content-statistics[data-v-09545121] {
6286
6286
  height: 100%;
6287
6287
  display: flex;
6288
6288
  flex-direction: column;
@@ -6293,7 +6293,7 @@ body,
6293
6293
  height: 100%;
6294
6294
  } */
6295
6295
  }
6296
- .grid-content-statistics[data-v-18b8b23a] .fec-layout-card:last-child {
6296
+ .grid-content-statistics[data-v-09545121] .fec-layout-card:last-child {
6297
6297
  margin-bottom: 0 !important;
6298
6298
  flex: 1;
6299
6299
  }
@@ -6334,7 +6334,7 @@ body,
6334
6334
  flex-grow: 1;
6335
6335
  padding-top: 12px;
6336
6336
  }
6337
- .van-button__content[data-v-d189300b]:before {
6337
+ [data-v-191efc8d] .van-button__content:before {
6338
6338
  display: none;
6339
6339
  }:root,:host{--van-cell-font-size: var(--van-font-size-md);--van-cell-line-height: 24px;--van-cell-vertical-padding: 10px;--van-cell-horizontal-padding: var(--van-padding-md);--van-cell-text-color: var(--van-text-color);--van-cell-background: var(--van-background-2);--van-cell-border-color: var(--van-border-color);--van-cell-active-color: var(--van-active-color);--van-cell-required-color: var(--van-danger-color);--van-cell-label-color: var(--van-text-color-2);--van-cell-label-font-size: var(--van-font-size-sm);--van-cell-label-line-height: var(--van-line-height-sm);--van-cell-label-margin-top: var(--van-padding-base);--van-cell-value-color: var(--van-text-color-2);--van-cell-value-font-size: inherit;--van-cell-icon-size: 16px;--van-cell-right-icon-color: var(--van-gray-6);--van-cell-large-vertical-padding: var(--van-padding-sm);--van-cell-large-title-font-size: var(--van-font-size-lg);--van-cell-large-label-font-size: var(--van-font-size-md);--van-cell-large-value-font-size: inherit}.van-cell{position:relative;display:flex;box-sizing:border-box;width:100%;padding:var(--van-cell-vertical-padding) var(--van-cell-horizontal-padding);overflow:hidden;color:var(--van-cell-text-color);font-size:var(--van-cell-font-size);line-height:var(--van-cell-line-height);background:var(--van-cell-background)}.van-cell:after{position:absolute;box-sizing:border-box;content:" ";pointer-events:none;right:var(--van-padding-md);bottom:0;left:var(--van-padding-md);border-bottom:1px solid var(--van-cell-border-color);transform:scaleY(.5)}.van-cell:last-child:after,.van-cell--borderless:after{display:none}.van-cell__label{margin-top:var(--van-cell-label-margin-top);color:var(--van-cell-label-color);font-size:var(--van-cell-label-font-size);line-height:var(--van-cell-label-line-height)}.van-cell__title,.van-cell__value{flex:1}.van-cell__value{position:relative;overflow:hidden;color:var(--van-cell-value-color);font-size:var(--van-cell-value-font-size);text-align:right;vertical-align:middle;word-wrap:break-word}.van-cell__left-icon,.van-cell__right-icon{height:var(--van-cell-line-height);font-size:var(--van-cell-icon-size);line-height:var(--van-cell-line-height)}.van-cell__left-icon{margin-right:var(--van-padding-base)}.van-cell__right-icon{margin-left:var(--van-padding-base);color:var(--van-cell-right-icon-color)}.van-cell--clickable{cursor:pointer}.van-cell--clickable:active{background-color:var(--van-cell-active-color)}.van-cell--required{overflow:visible}.van-cell--required:before{position:absolute;left:var(--van-padding-xs);color:var(--van-cell-required-color);font-size:var(--van-cell-font-size);content:"*"}.van-cell--center{align-items:center}.van-cell--large{padding-top:var(--van-cell-large-vertical-padding);padding-bottom:var(--van-cell-large-vertical-padding)}.van-cell--large .van-cell__title{font-size:var(--van-cell-large-title-font-size)}.van-cell--large .van-cell__label{font-size:var(--van-cell-large-label-font-size)}.van-cell--large .van-cell__value{font-size:var(--van-cell-large-value-font-size)}
6340
6340
  :root,:host{--van-cell-group-background: var(--van-background-2);--van-cell-group-title-color: var(--van-text-color-2);--van-cell-group-title-padding: var(--van-padding-md) var(--van-padding-md);--van-cell-group-title-font-size: var(--van-font-size-md);--van-cell-group-title-line-height: 16px;--van-cell-group-inset-padding: 0 var(--van-padding-md);--van-cell-group-inset-radius: var(--van-radius-lg);--van-cell-group-inset-title-padding: var(--van-padding-md) var(--van-padding-md)}.van-cell-group{background:var(--van-cell-group-background)}.van-cell-group--inset{margin:var(--van-cell-group-inset-padding);border-radius:var(--van-cell-group-inset-radius);overflow:hidden}.van-cell-group__title{padding:var(--van-cell-group-title-padding);color:var(--van-cell-group-title-color);font-size:var(--van-cell-group-title-font-size);line-height:var(--van-cell-group-title-line-height)}.van-cell-group__title--inset{padding:var(--van-cell-group-inset-title-padding)}
@@ -23,5 +23,5 @@ function _sfc_render(_ctx, _cache) {
23
23
  })
24
24
  ]), 1040);
25
25
  }
26
- const _Button = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-d189300b"]]);
26
+ const _Button = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-191efc8d"]]);
27
27
  exports.default = _Button;
@@ -119,8 +119,8 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
119
119
  const dataSourceOptions = vue.ref({});
120
120
  const dictionaryOptions = vue.ref({});
121
121
  const productData = vue.ref({});
122
- const fieldsData = vue.ref([]);
123
- const hiddenFields = vue.ref([]);
122
+ const fieldsData = vue.ref({});
123
+ const hiddenFields = vue.ref({});
124
124
  const rowHeight = vue.ref(1);
125
125
  const pageEvents = props.canPageEvent ? usePageEvents.usePageEvents(() => ({
126
126
  pageEventConfig: localConfig.value.pageEventConfig,
@@ -766,9 +766,14 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
766
766
  ...Object.keys(oldData || {})
767
767
  ]);
768
768
  for (const key of allKeys) {
769
- const newVal = newData[key];
770
- const oldVal = oldData[key];
771
- if (!newVal && !oldVal && Object.keys(oldData || {}).length != 0) {
769
+ const hasKeyInNew = newData && Object.prototype.hasOwnProperty.call(newData, key);
770
+ const hasKeyInOld = oldData && Object.prototype.hasOwnProperty.call(oldData, key);
771
+ if (!hasKeyInNew && !hasKeyInOld) {
772
+ continue;
773
+ }
774
+ const newVal = hasKeyInNew ? newData[key] : void 0;
775
+ const oldVal = hasKeyInOld ? oldData[key] : void 0;
776
+ if (!newVal && !oldVal && Object.keys(oldData || {}).length === 0) {
772
777
  continue;
773
778
  }
774
779
  if (JSON.stringify(newVal) != JSON.stringify(oldVal)) {
@@ -847,48 +852,40 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
847
852
  }
848
853
  });
849
854
  const updatedLayoutData = common.cloneDeep(oriGridLayoutData.value || []);
850
- const allVisibilityFieldIds = /* @__PURE__ */ new Set();
851
- relevantConfigs.visibility.forEach((item) => {
852
- (item.dataLinkFieldList || []).forEach((fieldId) => {
853
- allVisibilityFieldIds.add(fieldId);
854
- });
855
- });
856
- allVisibilityFieldIds.forEach((fieldId) => {
857
- const layoutFieldItem = updatedLayoutData.find((g) => g.id == fieldId);
858
- if (layoutFieldItem) {
859
- layoutFieldItem.hidden = true;
860
- }
861
- });
862
855
  relevantConfigs.visibility.forEach((item) => {
856
+ const dataLinkFieldList = item.dataLinkFieldList || [];
863
857
  if (parseFilterConfig.checkFilterMatch(item.filterConfig, formData.value, fields)) {
864
- (item.dataLinkFieldList || []).forEach((fieldId) => {
858
+ dataLinkFieldList.forEach((fieldId) => {
865
859
  const layoutFieldItem = updatedLayoutData.find((g) => g.id == fieldId);
866
860
  if (layoutFieldItem) {
867
861
  layoutFieldItem.hidden = false;
868
862
  }
869
863
  });
870
- }
871
- });
872
- const allRequiredFieldIds = /* @__PURE__ */ new Set();
873
- relevantConfigs.required.forEach((item) => {
874
- (item.dataLinkFieldList || []).forEach((fieldId) => {
875
- allRequiredFieldIds.add(fieldId);
876
- });
877
- });
878
- allRequiredFieldIds.forEach((fieldId) => {
879
- const layoutFieldItem = updatedLayoutData.find((g) => g.id == fieldId);
880
- if (layoutFieldItem) {
881
- layoutFieldItem.component.required = false;
864
+ } else {
865
+ dataLinkFieldList.forEach((fieldId) => {
866
+ const layoutFieldItem = updatedLayoutData.find((g) => g.id == fieldId);
867
+ if (layoutFieldItem) {
868
+ layoutFieldItem.hidden = true;
869
+ }
870
+ });
882
871
  }
883
872
  });
884
873
  relevantConfigs.required.forEach((item) => {
874
+ const dataLinkFieldList = item.dataLinkFieldList || [];
885
875
  if (parseFilterConfig.checkFilterMatch(item.filterConfig, formData.value, fields)) {
886
- (item.dataLinkFieldList || []).forEach((fieldId) => {
876
+ dataLinkFieldList.forEach((fieldId) => {
887
877
  const layoutFieldItem = updatedLayoutData.find((g) => g.id == fieldId);
888
878
  if (layoutFieldItem) {
889
879
  layoutFieldItem.component.required = true;
890
880
  }
891
881
  });
882
+ } else {
883
+ dataLinkFieldList.forEach((fieldId) => {
884
+ const layoutFieldItem = updatedLayoutData.find((g) => g.id == fieldId);
885
+ if (layoutFieldItem) {
886
+ layoutFieldItem.component.required = false;
887
+ }
888
+ });
892
889
  }
893
890
  });
894
891
  const rules = {};
@@ -904,48 +901,40 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
904
901
  rules[fieldName] = prodRules.value[fieldName];
905
902
  }
906
903
  formRules.value = rules;
907
- const allReadonlyFieldIds = /* @__PURE__ */ new Set();
908
- relevantConfigs.readonly.forEach((item) => {
909
- (item.dataLinkFieldList || []).forEach((fieldId) => {
910
- allReadonlyFieldIds.add(fieldId);
911
- });
912
- });
913
- allReadonlyFieldIds.forEach((fieldId) => {
914
- const layoutFieldItem = updatedLayoutData.find((g) => g.id == fieldId);
915
- if (layoutFieldItem) {
916
- layoutFieldItem.component.readOnly = false;
917
- }
918
- });
919
904
  relevantConfigs.readonly.forEach((item) => {
905
+ const dataLinkFieldList = item.dataLinkFieldList || [];
920
906
  if (parseFilterConfig.checkFilterMatch(item.filterConfig, formData.value, fields)) {
921
- (item.dataLinkFieldList || []).forEach((fieldId) => {
907
+ dataLinkFieldList.forEach((fieldId) => {
922
908
  const layoutFieldItem = updatedLayoutData.find((g) => g.id == fieldId);
923
909
  if (layoutFieldItem) {
924
910
  layoutFieldItem.component.readOnly = true;
925
911
  }
926
912
  });
927
- }
928
- });
929
- const allDisabledFieldIds = /* @__PURE__ */ new Set();
930
- relevantConfigs.disabled.forEach((item) => {
931
- (item.dataLinkFieldList || []).forEach((fieldId) => {
932
- allDisabledFieldIds.add(fieldId);
933
- });
934
- });
935
- allDisabledFieldIds.forEach((fieldId) => {
936
- const layoutFieldItem = updatedLayoutData.find((g) => g.id == fieldId);
937
- if (layoutFieldItem) {
938
- layoutFieldItem.component.disabled = false;
913
+ } else {
914
+ dataLinkFieldList.forEach((fieldId) => {
915
+ const layoutFieldItem = updatedLayoutData.find((g) => g.id == fieldId);
916
+ if (layoutFieldItem) {
917
+ layoutFieldItem.component.readOnly = false;
918
+ }
919
+ });
939
920
  }
940
921
  });
941
922
  relevantConfigs.disabled.forEach((item) => {
923
+ const dataLinkFieldList = item.dataLinkFieldList || [];
942
924
  if (parseFilterConfig.checkFilterMatch(item.filterConfig, formData.value, fields)) {
943
- (item.dataLinkFieldList || []).forEach((fieldId) => {
925
+ dataLinkFieldList.forEach((fieldId) => {
944
926
  const layoutFieldItem = updatedLayoutData.find((g) => g.id == fieldId);
945
927
  if (layoutFieldItem) {
946
928
  layoutFieldItem.component.disabled = true;
947
929
  }
948
930
  });
931
+ } else {
932
+ dataLinkFieldList.forEach((fieldId) => {
933
+ const layoutFieldItem = updatedLayoutData.find((g) => g.id == fieldId);
934
+ if (layoutFieldItem) {
935
+ layoutFieldItem.component.disabled = false;
936
+ }
937
+ });
949
938
  }
950
939
  });
951
940
  gridLayoutFieldsData.value = updatedLayoutData.filter((item) => !item.hidden);
@@ -961,7 +950,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
961
950
  linkaged = true;
962
951
  }
963
952
  vue.watch(
964
- () => common.cloneDeep(formData.value),
953
+ formData,
965
954
  (newVal, oldVal) => {
966
955
  if (!linkaged) {
967
956
  return;
@@ -970,12 +959,11 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
970
959
  return;
971
960
  }
972
961
  const changedFields = findChangedFields(newVal, prevFormData.value);
973
- console.log("🚀 ~ changedFields:", changedFields);
974
962
  if (changedFields.length > 0) {
975
963
  applyLinkageEffectsForChangedFields(changedFields);
976
- prevFormData.value = { ...newVal };
977
- emit("update:modelValue", getFormData());
978
964
  }
965
+ prevFormData.value = { ...newVal };
966
+ emit("update:modelValue", getFormData());
979
967
  },
980
968
  { deep: true }
981
969
  );
@@ -1101,5 +1089,5 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
1101
1089
  };
1102
1090
  }
1103
1091
  });
1104
- const _Form = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-67c25477"]]);
1092
+ const _Form = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-5e17ab81"]]);
1105
1093
  exports.default = _Form;
@@ -25,11 +25,16 @@ const _sfc_main = {
25
25
  initFormMode: {
26
26
  type: String,
27
27
  default: ""
28
+ },
29
+ initFormData: {
30
+ type: Object,
31
+ default: {}
28
32
  }
29
33
  },
30
34
  emits: ["loaded"],
31
35
  setup(__props, { emit: __emit }) {
32
- const formData = vue.ref({});
36
+ const props = __props;
37
+ const formData = vue.ref(props.initFormData);
33
38
  const emit = __emit;
34
39
  const showCard = vue.ref(false);
35
40
  function loaded(option, formData2) {
@@ -82,5 +87,5 @@ const _sfc_main = {
82
87
  };
83
88
  }
84
89
  };
85
- const _Layout = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-18b8b23a"]]);
90
+ const _Layout = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-09545121"]]);
86
91
  exports.default = _Layout;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fecp/designer",
3
- "version": "5.4.62",
3
+ "version": "5.4.64",
4
4
  "main": "lib/designer/index.js",
5
5
  "module": "es/designer/index.mjs",
6
6
  "files": [