@fecp/designer 5.5.33 → 5.5.35

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.
@@ -1,4 +1,4 @@
1
- const version = "5.5.33";
1
+ const version = "5.5.35";
2
2
  const packageJson = {
3
3
  version
4
4
  };
@@ -53,7 +53,8 @@ const _sfc_main = {
53
53
  var _a;
54
54
  hiddenFields.value = (((_a = editConfigData.value) == null ? void 0 : _a.hiddenFields) || []).map(
55
55
  (field) => ({
56
- ...field
56
+ ...field,
57
+ value: field.value || field.defaultValue
57
58
  })
58
59
  );
59
60
  };
@@ -166,6 +167,8 @@ const _sfc_main = {
166
167
  let currentY = maxY;
167
168
  selectedRows.value.forEach((field) => {
168
169
  let component = cloneDeep(field);
170
+ component.defaultValue = field.value;
171
+ delete component.value;
169
172
  component.id = component.id + "";
170
173
  component.fieldType = component.fieldType || "text";
171
174
  component.type = component.type || "widgets";
@@ -374,7 +377,7 @@ const _sfc_main = {
374
377
  };
375
378
  }
376
379
  };
377
- const HiddenFieldDialog = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-c3d621bb"]]);
380
+ const HiddenFieldDialog = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-b2acaeb1"]]);
378
381
  export {
379
382
  HiddenFieldDialog as default
380
383
  };
@@ -786,10 +786,7 @@ const _sfc_main = {
786
786
  ]),
787
787
  _: 1
788
788
  }),
789
- unref(currentItem).format !== "percentage" ? (openBlock(), createBlock(_component_el_form_item, {
790
- key: 0,
791
- label: "数值范围"
792
- }, {
789
+ createVNode(_component_el_form_item, { label: "数值范围" }, {
793
790
  default: withCtx(() => [
794
791
  createElementVNode("div", _hoisted_12, [
795
792
  createVNode(_component_el_input_number, {
@@ -814,7 +811,7 @@ const _sfc_main = {
814
811
  ])
815
812
  ]),
816
813
  _: 1
817
- })) : createCommentVNode("", true)
814
+ })
818
815
  ], 64)) : createCommentVNode("", true),
819
816
  unref(currentItem).fieldType === "text" || unref(currentItem).fieldType === "number" ? (openBlock(), createElementBlock(Fragment, { key: 5 }, [
820
817
  createVNode(_component_el_form_item, { label: "前置内容" }, {
@@ -1182,7 +1179,7 @@ const _sfc_main = {
1182
1179
  };
1183
1180
  }
1184
1181
  };
1185
- const widgets = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-7f8b937d"]]);
1182
+ const widgets = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-b6039888"]]);
1186
1183
  export {
1187
1184
  widgets as default
1188
1185
  };
package/es/designer.css CHANGED
@@ -127,37 +127,37 @@
127
127
  }
128
128
  .value-selector-input[data-v-e5b87efa] .el-input-tag__suffix {
129
129
  padding-right: 0;
130
- }.action-bar[data-v-c3d621bb] {
130
+ }.action-bar[data-v-b2acaeb1] {
131
131
  display: flex;
132
132
  justify-content: space-between;
133
133
  align-items: center;
134
134
  margin-bottom: 16px;
135
135
  }
136
- .action-bar .left-buttons[data-v-c3d621bb] {
136
+ .action-bar .left-buttons[data-v-b2acaeb1] {
137
137
  display: flex;
138
138
  gap: 12px;
139
139
  }
140
- .action-bar .count-info[data-v-c3d621bb] {
140
+ .action-bar .count-info[data-v-b2acaeb1] {
141
141
  color: #909399;
142
142
  font-size: 14px;
143
143
  }
144
- .field-list-container[data-v-c3d621bb] {
144
+ .field-list-container[data-v-b2acaeb1] {
145
145
  margin-bottom: 16px;
146
146
  }
147
- .field-name-cell[data-v-c3d621bb] {
147
+ .field-name-cell[data-v-b2acaeb1] {
148
148
  display: flex;
149
149
  align-items: center;
150
150
  gap: 8px;
151
151
  flex: 1;
152
152
  }
153
- .field-name-cell .el-input[data-v-c3d621bb] {
153
+ .field-name-cell .el-input[data-v-b2acaeb1] {
154
154
  flex: 1;
155
155
  }
156
- .dialog-footer[data-v-c3d621bb] {
156
+ .dialog-footer[data-v-b2acaeb1] {
157
157
  display: flex;
158
158
  justify-content: flex-end;
159
159
  }
160
- [data-v-c3d621bb] .el-table--fit .el-table__inner-wrapper:before {
160
+ [data-v-b2acaeb1] .el-table--fit .el-table__inner-wrapper:before {
161
161
  display: none;
162
162
  }.root-aside[data-v-b7e9472b] {
163
163
  width: 300px;
@@ -3249,17 +3249,17 @@ to {
3249
3249
  width: 100%;
3250
3250
  }
3251
3251
 
3252
- .collapse-header[data-v-7f8b937d] {
3252
+ .collapse-header[data-v-b6039888] {
3253
3253
  display: flex;
3254
3254
  align-items: center;
3255
3255
  justify-content: space-between;
3256
3256
  width: 100%;
3257
3257
  padding-right: 20px;
3258
3258
  }
3259
- .setting[data-v-7f8b937d] .el-collapse-item__content {
3259
+ .setting[data-v-b6039888] .el-collapse-item__content {
3260
3260
  position: relative;
3261
3261
  }
3262
- .field-type-select[data-v-7f8b937d] {
3262
+ .field-type-select[data-v-b6039888] {
3263
3263
  position: absolute;
3264
3264
  top: 11px;
3265
3265
  right: 16px;
@@ -3270,41 +3270,41 @@ to {
3270
3270
  transition: all 0.3s;
3271
3271
  border-radius: 4px;
3272
3272
  }
3273
- .field-type-select[data-v-7f8b937d] .el-select__wrapper {
3273
+ .field-type-select[data-v-b6039888] .el-select__wrapper {
3274
3274
  background: transparent;
3275
3275
  box-shadow: none;
3276
3276
  }
3277
- .field-type-select[data-v-7f8b937d] .el-select__selected-item {
3277
+ .field-type-select[data-v-b6039888] .el-select__selected-item {
3278
3278
  text-align: center;
3279
3279
  }
3280
- .width-input[data-v-7f8b937d] {
3280
+ .width-input[data-v-b6039888] {
3281
3281
  width: 100%;
3282
3282
  }
3283
- .data-source-fields[data-v-7f8b937d] {
3283
+ .data-source-fields[data-v-b6039888] {
3284
3284
  display: flex;
3285
3285
  flex-direction: column;
3286
3286
  gap: 8px;
3287
3287
  margin-bottom: 18px;
3288
3288
  }
3289
- .data-source-fields .field-item[data-v-7f8b937d] {
3289
+ .data-source-fields .field-item[data-v-b6039888] {
3290
3290
  display: flex;
3291
3291
  align-items: center;
3292
3292
  gap: 8px;
3293
3293
  }
3294
- .data-source-fields .field-item .field-label[data-v-7f8b937d] {
3294
+ .data-source-fields .field-item .field-label[data-v-b6039888] {
3295
3295
  width: 80px;
3296
3296
  font-size: 13px;
3297
3297
  color: #606266;
3298
3298
  text-align: right;
3299
3299
  flex-shrink: 0;
3300
3300
  }
3301
- .data-source-fields .field-item .field-label[data-v-7f8b937d]::after {
3301
+ .data-source-fields .field-item .field-label[data-v-b6039888]::after {
3302
3302
  content: ":";
3303
3303
  }
3304
- .data-source-fields .field-item .el-input[data-v-7f8b937d] {
3304
+ .data-source-fields .field-item .el-input[data-v-b6039888] {
3305
3305
  flex: 1;
3306
3306
  }
3307
- [data-v-7f8b937d] .el-form-item__content {
3307
+ [data-v-b6039888] .el-form-item__content {
3308
3308
  flex-wrap: wrap !important;
3309
3309
  }
3310
3310
  .buttons-table[data-v-b5400259] {
@@ -5840,21 +5840,22 @@ body,
5840
5840
  outline: none;
5841
5841
  box-shadow: 0 1px 0 0 #c0c4cc inset, 0 -1px 0 0 #c0c4cc inset, -1px 0 0 0 #c0c4cc inset;
5842
5842
  }
5843
- .info-icon[data-v-3a8e5cc4] {
5843
+ .info-icon[data-v-2860c795] {
5844
5844
  margin-left: 4px;
5845
5845
  color: #f5b041;
5846
5846
  cursor: help;
5847
- font-size: 14px;
5847
+ font-size: 14px;
5848
+ pointer-events: all;
5848
5849
  }
5849
- .credit-icon[data-v-3a8e5cc4] {
5850
+ .credit-icon[data-v-2860c795] {
5850
5851
  color: #2e8bff;
5851
5852
  margin-right: 2px;
5852
5853
  }
5853
- .regulation-icon[data-v-3a8e5cc4] {
5854
+ .regulation-icon[data-v-2860c795] {
5854
5855
  color: #f56c6c;
5855
5856
  margin-right: 2px;
5856
5857
  }
5857
- [data-v-3a8e5cc4] .el-form-item__label {
5858
+ [data-v-2860c795] .el-form-item__label {
5858
5859
  padding: 0 8px 0 0;
5859
5860
  }
5860
5861
  .el-page-header.is-contentful .el-page-header__main{border-top:1px solid var(--el-border-color-light);margin-top:16px}.el-page-header__header{justify-content:space-between;align-items:center;line-height:24px;display:flex}.el-page-header__left{align-items:center;margin-right:40px;display:flex;position:relative}.el-page-header__back{cursor:pointer;align-items:center;display:flex}.el-page-header__left .el-divider--vertical{margin:0 16px}.el-page-header__icon{align-items:center;margin-right:10px;font-size:16px;display:flex}.el-page-header__icon .el-icon{font-size:inherit}.el-page-header__title{font-size:14px;font-weight:500}.el-page-header__content{color:var(--el-text-color-primary);font-size:18px}.el-page-header__breadcrumb{margin-bottom:16px}.fec-header[data-v-a55fc4ab] {
@@ -5921,25 +5922,25 @@ body,
5921
5922
  width: 80px;
5922
5923
  font-size: var(--el-font-size-extra-small);
5923
5924
  }
5924
- .fec-form[data-v-df445e35] {
5925
+ .fec-form[data-v-71dda23e] {
5925
5926
  height: 100%;
5926
5927
  }
5927
- [data-v-df445e35] .vgl-layout {
5928
+ [data-v-71dda23e] .vgl-layout {
5928
5929
  position: relative;
5929
5930
  }
5930
- [data-v-df445e35] .vgl-item {
5931
+ [data-v-71dda23e] .vgl-item {
5931
5932
  transition: none;
5932
5933
  }
5933
- [data-v-df445e35] .vgl-item > .el-form-item {
5934
+ [data-v-71dda23e] .vgl-item > .el-form-item {
5934
5935
  width: 100%;
5935
5936
  padding: 6px 8px 0 8px;
5936
5937
  height: calc(100% - 15px);
5937
5938
  display: flex;
5938
5939
  }
5939
- [data-v-df445e35] .vgl-item > .el-form-item.el-form-item--label-top {
5940
+ [data-v-71dda23e] .vgl-item > .el-form-item.el-form-item--label-top {
5940
5941
  flex-direction: column;
5941
5942
  }
5942
- [data-v-df445e35] .vgl-item > .el-form-item .el-form-item__label {
5943
+ [data-v-71dda23e] .vgl-item > .el-form-item .el-form-item__label {
5943
5944
  line-height: 20px;
5944
5945
  display: flex;
5945
5946
  align-items: center;
@@ -5948,12 +5949,12 @@ body,
5948
5949
  flex-wrap: wrap;
5949
5950
  white-space: normal;
5950
5951
  }
5951
- [data-v-df445e35] .vgl-item > .el-form-item {
5952
+ [data-v-71dda23e] .vgl-item > .el-form-item {
5952
5953
  /* .el-form-item__error {
5953
5954
  padding-top: 10px;
5954
5955
  } */
5955
5956
  }
5956
- [data-v-df445e35] .vgl-item > .el-container {
5957
+ [data-v-71dda23e] .vgl-item > .el-container {
5957
5958
  height: auto !important;
5958
5959
  }.table-pagination[data-v-142fdd35] {
5959
5960
  display: flex;
@@ -593,7 +593,15 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
593
593
  const handleCustomButtonClick = (button) => {
594
594
  var _a;
595
595
  handleEvent.value(
596
- formData.value,
596
+ getFormData(),
597
+ button,
598
+ (_a = button.eventConfig) == null ? void 0 : _a.find((item) => item.name == "Click")
599
+ );
600
+ };
601
+ const handleActionClick = (button) => {
602
+ var _a;
603
+ handleEvent.value(
604
+ getFormData(),
597
605
  button,
598
606
  (_a = button.eventConfig) == null ? void 0 : _a.find((item) => item.name == "Click")
599
607
  );
@@ -1022,7 +1030,8 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
1022
1030
  createVNode(unref(header), {
1023
1031
  showBack: !__props.isSubForm && !__props.isDialog,
1024
1032
  isApproval: __props.isApproval,
1025
- pageHeaderConfig: localConfig.value.pageHeaderConfig
1033
+ pageHeaderConfig: localConfig.value.pageHeaderConfig,
1034
+ onActionClick: handleActionClick
1026
1035
  }, null, 8, ["showBack", "isApproval", "pageHeaderConfig"]),
1027
1036
  createVNode(unref(main), {
1028
1037
  scrollbar: !__props.isDialog
@@ -1094,7 +1103,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
1094
1103
  };
1095
1104
  }
1096
1105
  });
1097
- const _Form = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-df445e35"]]);
1106
+ const _Form = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-71dda23e"]]);
1098
1107
  export {
1099
1108
  _Form as default
1100
1109
  };
@@ -205,7 +205,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
205
205
  };
206
206
  }
207
207
  });
208
- const _FormItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-3a8e5cc4"]]);
208
+ const _FormItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-2860c795"]]);
209
209
  export {
210
210
  _FormItem as default
211
211
  };
@@ -81,6 +81,12 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
81
81
  });
82
82
  const parser = (value) => {
83
83
  let result = moneyCheck(value);
84
+ if (precision.value > 0 && result.includes(".")) {
85
+ const [intPart, decPart] = result.split(".");
86
+ if (decPart && decPart.length > precision.value) {
87
+ result = intPart + "." + decPart.slice(0, precision.value);
88
+ }
89
+ }
84
90
  return result;
85
91
  };
86
92
  const compValue = computed({
@@ -126,7 +132,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
126
132
  true
127
133
  );
128
134
  } else {
129
- textValue.value = displayValue;
135
+ textValue.value = Number(displayValue.toFixed(precision.value));
130
136
  }
131
137
  if (!showThousandsSeparator.value) {
132
138
  textValue.value = delcommafy(textValue.value);
@@ -134,44 +140,25 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
134
140
  };
135
141
  watch(
136
142
  () => props.modelValue,
137
- () => {
143
+ (value) => {
138
144
  initTextValue();
139
145
  },
140
146
  { immediate: true }
141
147
  );
148
+ const handleInput = (value) => {
149
+ if (precision.value > 0) {
150
+ const dotIndex = value.indexOf(".");
151
+ if (dotIndex !== -1) {
152
+ const afterDot = value.slice(dotIndex + 1);
153
+ if (afterDot.length > precision.value) {
154
+ textValue.value = value.slice(0, dotIndex + 1 + precision.value);
155
+ }
156
+ }
157
+ }
158
+ };
142
159
  const handleBlur = (event) => {
143
160
  let value = event.target.value;
144
- if (!value && value !== 0) {
145
- compValue.value = value;
146
- return;
147
- }
148
- let cleanValue = delcommafy(value.toString());
149
- let numValue = Number(cleanValue);
150
- if (isNaN(numValue)) return;
151
- numValue = Number(numValue.toFixed(precision.value));
152
- switch (props.format) {
153
- case "wan":
154
- numValue = numMulti(numValue, 1e4);
155
- break;
156
- case "million":
157
- numValue = numMulti(numValue, 1e6);
158
- break;
159
- case "percentage":
160
- numValue = numDiv(numValue, 100);
161
- break;
162
- case "permillage":
163
- numValue = numDiv(numValue, 1e3);
164
- break;
165
- case "permillion":
166
- numValue = numDiv(numValue, 1e4);
167
- break;
168
- }
169
- if (props.format !== "percentage" && props.format !== "permillage" && props.format !== "permillion") {
170
- const effectiveMax = props.maxValue != null ? props.maxValue : 999999999999999;
171
- const effectiveMin = props.minValue != null ? props.minValue : -999999999999999;
172
- numValue = Math.max(effectiveMin, Math.min(effectiveMax, numValue));
173
- }
174
- compValue.value = numValue;
161
+ handlerValue(value);
175
162
  switch (props.format) {
176
163
  case "wan":
177
164
  textValue.value = numDiv(numValue, 1e4);
@@ -200,11 +187,42 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
200
187
  textValue.value = delcommafy(textValue.value);
201
188
  }
202
189
  };
203
- function formatNumberWithComma(numValue) {
204
- if (isNaN(numValue) || numValue === null || numValue === void 0) {
205
- return numValue;
190
+ function handlerValue(value) {
191
+ if (!value && value !== 0) {
192
+ compValue.value = value;
193
+ return;
194
+ }
195
+ let cleanValue = delcommafy(value.toString());
196
+ let numValue2 = Number(cleanValue);
197
+ if (isNaN(numValue2)) return;
198
+ numValue2 = Number(numValue2.toFixed(precision.value));
199
+ switch (props.format) {
200
+ case "wan":
201
+ numValue2 = numMulti(numValue2, 1e4);
202
+ break;
203
+ case "million":
204
+ numValue2 = numMulti(numValue2, 1e6);
205
+ break;
206
+ case "percentage":
207
+ numValue2 = numDiv(numValue2, 100);
208
+ break;
209
+ case "permillage":
210
+ numValue2 = numDiv(numValue2, 1e3);
211
+ break;
212
+ case "permillion":
213
+ numValue2 = numDiv(numValue2, 1e4);
214
+ break;
215
+ }
216
+ const effectiveMax = props.maxValue != null ? props.maxValue : 999999999999999;
217
+ const effectiveMin = props.minValue != null ? props.minValue : -999999999999999;
218
+ numValue2 = Math.max(effectiveMin, Math.min(effectiveMax, numValue2));
219
+ compValue.value = numValue2;
220
+ }
221
+ function formatNumberWithComma(numValue2) {
222
+ if (isNaN(numValue2) || numValue2 === null || numValue2 === void 0) {
223
+ return numValue2;
206
224
  }
207
- let numStr = numValue.toString();
225
+ let numStr = numValue2.toString();
208
226
  const endsWithDot = numStr.endsWith(".");
209
227
  const [integerPart, decimalPart] = numStr.split(".");
210
228
  const formattedInteger = integerPart.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
@@ -313,7 +331,8 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
313
331
  readonly: __props.readonly,
314
332
  formatter,
315
333
  parser,
316
- onBlur: handleBlur
334
+ onBlur: handleBlur,
335
+ onInput: handleInput
317
336
  }, toHandlers(__props.config.eventHandlers), {
318
337
  onChange: handleChange,
319
338
  style: { "width": "100%" }
@@ -477,6 +477,7 @@ async function handleFormSetValue(node, data, fields, context) {
477
477
  delete formData[value];
478
478
  });
479
479
  }
480
+ formData = removeEmptyValues(formData);
480
481
  delete formData.pageNo;
481
482
  delete formData.pageSize;
482
483
  const formComponent = ((_a = context.components) == null ? void 0 : _a.form) || ((_b = context.components) == null ? void 0 : _b.table);
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
- const version = "5.5.33";
3
+ const version = "5.5.35";
4
4
  const packageJson = {
5
5
  version
6
6
  };
@@ -55,7 +55,8 @@ const _sfc_main = {
55
55
  var _a;
56
56
  hiddenFields.value = (((_a = editConfigData.value) == null ? void 0 : _a.hiddenFields) || []).map(
57
57
  (field) => ({
58
- ...field
58
+ ...field,
59
+ value: field.value || field.defaultValue
59
60
  })
60
61
  );
61
62
  };
@@ -168,6 +169,8 @@ const _sfc_main = {
168
169
  let currentY = maxY;
169
170
  selectedRows.value.forEach((field) => {
170
171
  let component = common.cloneDeep(field);
172
+ component.defaultValue = field.value;
173
+ delete component.value;
171
174
  component.id = component.id + "";
172
175
  component.fieldType = component.fieldType || "text";
173
176
  component.type = component.type || "widgets";
@@ -376,5 +379,5 @@ const _sfc_main = {
376
379
  };
377
380
  }
378
381
  };
379
- const HiddenFieldDialog = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-c3d621bb"]]);
382
+ const HiddenFieldDialog = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-b2acaeb1"]]);
380
383
  exports.default = HiddenFieldDialog;
@@ -788,10 +788,7 @@ const _sfc_main = {
788
788
  ]),
789
789
  _: 1
790
790
  }),
791
- vue.unref(currentItem).format !== "percentage" ? (vue.openBlock(), vue.createBlock(_component_el_form_item, {
792
- key: 0,
793
- label: "数值范围"
794
- }, {
791
+ vue.createVNode(_component_el_form_item, { label: "数值范围" }, {
795
792
  default: vue.withCtx(() => [
796
793
  vue.createElementVNode("div", _hoisted_12, [
797
794
  vue.createVNode(_component_el_input_number, {
@@ -816,7 +813,7 @@ const _sfc_main = {
816
813
  ])
817
814
  ]),
818
815
  _: 1
819
- })) : vue.createCommentVNode("", true)
816
+ })
820
817
  ], 64)) : vue.createCommentVNode("", true),
821
818
  vue.unref(currentItem).fieldType === "text" || vue.unref(currentItem).fieldType === "number" ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 5 }, [
822
819
  vue.createVNode(_component_el_form_item, { label: "前置内容" }, {
@@ -1184,5 +1181,5 @@ const _sfc_main = {
1184
1181
  };
1185
1182
  }
1186
1183
  };
1187
- const widgets = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-7f8b937d"]]);
1184
+ const widgets = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-b6039888"]]);
1188
1185
  exports.default = widgets;
package/lib/designer.css CHANGED
@@ -127,37 +127,37 @@
127
127
  }
128
128
  .value-selector-input[data-v-e5b87efa] .el-input-tag__suffix {
129
129
  padding-right: 0;
130
- }.action-bar[data-v-c3d621bb] {
130
+ }.action-bar[data-v-b2acaeb1] {
131
131
  display: flex;
132
132
  justify-content: space-between;
133
133
  align-items: center;
134
134
  margin-bottom: 16px;
135
135
  }
136
- .action-bar .left-buttons[data-v-c3d621bb] {
136
+ .action-bar .left-buttons[data-v-b2acaeb1] {
137
137
  display: flex;
138
138
  gap: 12px;
139
139
  }
140
- .action-bar .count-info[data-v-c3d621bb] {
140
+ .action-bar .count-info[data-v-b2acaeb1] {
141
141
  color: #909399;
142
142
  font-size: 14px;
143
143
  }
144
- .field-list-container[data-v-c3d621bb] {
144
+ .field-list-container[data-v-b2acaeb1] {
145
145
  margin-bottom: 16px;
146
146
  }
147
- .field-name-cell[data-v-c3d621bb] {
147
+ .field-name-cell[data-v-b2acaeb1] {
148
148
  display: flex;
149
149
  align-items: center;
150
150
  gap: 8px;
151
151
  flex: 1;
152
152
  }
153
- .field-name-cell .el-input[data-v-c3d621bb] {
153
+ .field-name-cell .el-input[data-v-b2acaeb1] {
154
154
  flex: 1;
155
155
  }
156
- .dialog-footer[data-v-c3d621bb] {
156
+ .dialog-footer[data-v-b2acaeb1] {
157
157
  display: flex;
158
158
  justify-content: flex-end;
159
159
  }
160
- [data-v-c3d621bb] .el-table--fit .el-table__inner-wrapper:before {
160
+ [data-v-b2acaeb1] .el-table--fit .el-table__inner-wrapper:before {
161
161
  display: none;
162
162
  }.root-aside[data-v-b7e9472b] {
163
163
  width: 300px;
@@ -3249,17 +3249,17 @@ to {
3249
3249
  width: 100%;
3250
3250
  }
3251
3251
 
3252
- .collapse-header[data-v-7f8b937d] {
3252
+ .collapse-header[data-v-b6039888] {
3253
3253
  display: flex;
3254
3254
  align-items: center;
3255
3255
  justify-content: space-between;
3256
3256
  width: 100%;
3257
3257
  padding-right: 20px;
3258
3258
  }
3259
- .setting[data-v-7f8b937d] .el-collapse-item__content {
3259
+ .setting[data-v-b6039888] .el-collapse-item__content {
3260
3260
  position: relative;
3261
3261
  }
3262
- .field-type-select[data-v-7f8b937d] {
3262
+ .field-type-select[data-v-b6039888] {
3263
3263
  position: absolute;
3264
3264
  top: 11px;
3265
3265
  right: 16px;
@@ -3270,41 +3270,41 @@ to {
3270
3270
  transition: all 0.3s;
3271
3271
  border-radius: 4px;
3272
3272
  }
3273
- .field-type-select[data-v-7f8b937d] .el-select__wrapper {
3273
+ .field-type-select[data-v-b6039888] .el-select__wrapper {
3274
3274
  background: transparent;
3275
3275
  box-shadow: none;
3276
3276
  }
3277
- .field-type-select[data-v-7f8b937d] .el-select__selected-item {
3277
+ .field-type-select[data-v-b6039888] .el-select__selected-item {
3278
3278
  text-align: center;
3279
3279
  }
3280
- .width-input[data-v-7f8b937d] {
3280
+ .width-input[data-v-b6039888] {
3281
3281
  width: 100%;
3282
3282
  }
3283
- .data-source-fields[data-v-7f8b937d] {
3283
+ .data-source-fields[data-v-b6039888] {
3284
3284
  display: flex;
3285
3285
  flex-direction: column;
3286
3286
  gap: 8px;
3287
3287
  margin-bottom: 18px;
3288
3288
  }
3289
- .data-source-fields .field-item[data-v-7f8b937d] {
3289
+ .data-source-fields .field-item[data-v-b6039888] {
3290
3290
  display: flex;
3291
3291
  align-items: center;
3292
3292
  gap: 8px;
3293
3293
  }
3294
- .data-source-fields .field-item .field-label[data-v-7f8b937d] {
3294
+ .data-source-fields .field-item .field-label[data-v-b6039888] {
3295
3295
  width: 80px;
3296
3296
  font-size: 13px;
3297
3297
  color: #606266;
3298
3298
  text-align: right;
3299
3299
  flex-shrink: 0;
3300
3300
  }
3301
- .data-source-fields .field-item .field-label[data-v-7f8b937d]::after {
3301
+ .data-source-fields .field-item .field-label[data-v-b6039888]::after {
3302
3302
  content: ":";
3303
3303
  }
3304
- .data-source-fields .field-item .el-input[data-v-7f8b937d] {
3304
+ .data-source-fields .field-item .el-input[data-v-b6039888] {
3305
3305
  flex: 1;
3306
3306
  }
3307
- [data-v-7f8b937d] .el-form-item__content {
3307
+ [data-v-b6039888] .el-form-item__content {
3308
3308
  flex-wrap: wrap !important;
3309
3309
  }
3310
3310
  .buttons-table[data-v-b5400259] {
@@ -5840,21 +5840,22 @@ body,
5840
5840
  outline: none;
5841
5841
  box-shadow: 0 1px 0 0 #c0c4cc inset, 0 -1px 0 0 #c0c4cc inset, -1px 0 0 0 #c0c4cc inset;
5842
5842
  }
5843
- .info-icon[data-v-3a8e5cc4] {
5843
+ .info-icon[data-v-2860c795] {
5844
5844
  margin-left: 4px;
5845
5845
  color: #f5b041;
5846
5846
  cursor: help;
5847
- font-size: 14px;
5847
+ font-size: 14px;
5848
+ pointer-events: all;
5848
5849
  }
5849
- .credit-icon[data-v-3a8e5cc4] {
5850
+ .credit-icon[data-v-2860c795] {
5850
5851
  color: #2e8bff;
5851
5852
  margin-right: 2px;
5852
5853
  }
5853
- .regulation-icon[data-v-3a8e5cc4] {
5854
+ .regulation-icon[data-v-2860c795] {
5854
5855
  color: #f56c6c;
5855
5856
  margin-right: 2px;
5856
5857
  }
5857
- [data-v-3a8e5cc4] .el-form-item__label {
5858
+ [data-v-2860c795] .el-form-item__label {
5858
5859
  padding: 0 8px 0 0;
5859
5860
  }
5860
5861
  .el-page-header.is-contentful .el-page-header__main{border-top:1px solid var(--el-border-color-light);margin-top:16px}.el-page-header__header{justify-content:space-between;align-items:center;line-height:24px;display:flex}.el-page-header__left{align-items:center;margin-right:40px;display:flex;position:relative}.el-page-header__back{cursor:pointer;align-items:center;display:flex}.el-page-header__left .el-divider--vertical{margin:0 16px}.el-page-header__icon{align-items:center;margin-right:10px;font-size:16px;display:flex}.el-page-header__icon .el-icon{font-size:inherit}.el-page-header__title{font-size:14px;font-weight:500}.el-page-header__content{color:var(--el-text-color-primary);font-size:18px}.el-page-header__breadcrumb{margin-bottom:16px}.fec-header[data-v-a55fc4ab] {
@@ -5921,25 +5922,25 @@ body,
5921
5922
  width: 80px;
5922
5923
  font-size: var(--el-font-size-extra-small);
5923
5924
  }
5924
- .fec-form[data-v-df445e35] {
5925
+ .fec-form[data-v-71dda23e] {
5925
5926
  height: 100%;
5926
5927
  }
5927
- [data-v-df445e35] .vgl-layout {
5928
+ [data-v-71dda23e] .vgl-layout {
5928
5929
  position: relative;
5929
5930
  }
5930
- [data-v-df445e35] .vgl-item {
5931
+ [data-v-71dda23e] .vgl-item {
5931
5932
  transition: none;
5932
5933
  }
5933
- [data-v-df445e35] .vgl-item > .el-form-item {
5934
+ [data-v-71dda23e] .vgl-item > .el-form-item {
5934
5935
  width: 100%;
5935
5936
  padding: 6px 8px 0 8px;
5936
5937
  height: calc(100% - 15px);
5937
5938
  display: flex;
5938
5939
  }
5939
- [data-v-df445e35] .vgl-item > .el-form-item.el-form-item--label-top {
5940
+ [data-v-71dda23e] .vgl-item > .el-form-item.el-form-item--label-top {
5940
5941
  flex-direction: column;
5941
5942
  }
5942
- [data-v-df445e35] .vgl-item > .el-form-item .el-form-item__label {
5943
+ [data-v-71dda23e] .vgl-item > .el-form-item .el-form-item__label {
5943
5944
  line-height: 20px;
5944
5945
  display: flex;
5945
5946
  align-items: center;
@@ -5948,12 +5949,12 @@ body,
5948
5949
  flex-wrap: wrap;
5949
5950
  white-space: normal;
5950
5951
  }
5951
- [data-v-df445e35] .vgl-item > .el-form-item {
5952
+ [data-v-71dda23e] .vgl-item > .el-form-item {
5952
5953
  /* .el-form-item__error {
5953
5954
  padding-top: 10px;
5954
5955
  } */
5955
5956
  }
5956
- [data-v-df445e35] .vgl-item > .el-container {
5957
+ [data-v-71dda23e] .vgl-item > .el-container {
5957
5958
  height: auto !important;
5958
5959
  }.table-pagination[data-v-142fdd35] {
5959
5960
  display: flex;
@@ -595,7 +595,15 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
595
595
  const handleCustomButtonClick = (button) => {
596
596
  var _a;
597
597
  handleEvent.value(
598
- formData.value,
598
+ getFormData(),
599
+ button,
600
+ (_a = button.eventConfig) == null ? void 0 : _a.find((item) => item.name == "Click")
601
+ );
602
+ };
603
+ const handleActionClick = (button) => {
604
+ var _a;
605
+ handleEvent.value(
606
+ getFormData(),
599
607
  button,
600
608
  (_a = button.eventConfig) == null ? void 0 : _a.find((item) => item.name == "Click")
601
609
  );
@@ -1024,7 +1032,8 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
1024
1032
  vue.createVNode(vue.unref(index$3.header), {
1025
1033
  showBack: !__props.isSubForm && !__props.isDialog,
1026
1034
  isApproval: __props.isApproval,
1027
- pageHeaderConfig: localConfig.value.pageHeaderConfig
1035
+ pageHeaderConfig: localConfig.value.pageHeaderConfig,
1036
+ onActionClick: handleActionClick
1028
1037
  }, null, 8, ["showBack", "isApproval", "pageHeaderConfig"]),
1029
1038
  vue.createVNode(vue.unref(index$4.main), {
1030
1039
  scrollbar: !__props.isDialog
@@ -1096,5 +1105,5 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
1096
1105
  };
1097
1106
  }
1098
1107
  });
1099
- const _Form = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-df445e35"]]);
1108
+ const _Form = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-71dda23e"]]);
1100
1109
  exports.default = _Form;
@@ -207,5 +207,5 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
207
207
  };
208
208
  }
209
209
  });
210
- const _FormItem = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-3a8e5cc4"]]);
210
+ const _FormItem = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-2860c795"]]);
211
211
  exports.default = _FormItem;
@@ -83,6 +83,12 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
83
83
  });
84
84
  const parser = (value) => {
85
85
  let result = moneyCheck(value);
86
+ if (precision.value > 0 && result.includes(".")) {
87
+ const [intPart, decPart] = result.split(".");
88
+ if (decPart && decPart.length > precision.value) {
89
+ result = intPart + "." + decPart.slice(0, precision.value);
90
+ }
91
+ }
86
92
  return result;
87
93
  };
88
94
  const compValue = vue.computed({
@@ -128,7 +134,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
128
134
  true
129
135
  );
130
136
  } else {
131
- textValue.value = displayValue;
137
+ textValue.value = Number(displayValue.toFixed(precision.value));
132
138
  }
133
139
  if (!showThousandsSeparator.value) {
134
140
  textValue.value = delcommafy(textValue.value);
@@ -136,44 +142,25 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
136
142
  };
137
143
  vue.watch(
138
144
  () => props.modelValue,
139
- () => {
145
+ (value) => {
140
146
  initTextValue();
141
147
  },
142
148
  { immediate: true }
143
149
  );
150
+ const handleInput = (value) => {
151
+ if (precision.value > 0) {
152
+ const dotIndex = value.indexOf(".");
153
+ if (dotIndex !== -1) {
154
+ const afterDot = value.slice(dotIndex + 1);
155
+ if (afterDot.length > precision.value) {
156
+ textValue.value = value.slice(0, dotIndex + 1 + precision.value);
157
+ }
158
+ }
159
+ }
160
+ };
144
161
  const handleBlur = (event) => {
145
162
  let value = event.target.value;
146
- if (!value && value !== 0) {
147
- compValue.value = value;
148
- return;
149
- }
150
- let cleanValue = delcommafy(value.toString());
151
- let numValue = Number(cleanValue);
152
- if (isNaN(numValue)) return;
153
- numValue = Number(numValue.toFixed(precision.value));
154
- switch (props.format) {
155
- case "wan":
156
- numValue = numMulti(numValue, 1e4);
157
- break;
158
- case "million":
159
- numValue = numMulti(numValue, 1e6);
160
- break;
161
- case "percentage":
162
- numValue = numDiv(numValue, 100);
163
- break;
164
- case "permillage":
165
- numValue = numDiv(numValue, 1e3);
166
- break;
167
- case "permillion":
168
- numValue = numDiv(numValue, 1e4);
169
- break;
170
- }
171
- if (props.format !== "percentage" && props.format !== "permillage" && props.format !== "permillion") {
172
- const effectiveMax = props.maxValue != null ? props.maxValue : 999999999999999;
173
- const effectiveMin = props.minValue != null ? props.minValue : -999999999999999;
174
- numValue = Math.max(effectiveMin, Math.min(effectiveMax, numValue));
175
- }
176
- compValue.value = numValue;
163
+ handlerValue(value);
177
164
  switch (props.format) {
178
165
  case "wan":
179
166
  textValue.value = numDiv(numValue, 1e4);
@@ -202,11 +189,42 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
202
189
  textValue.value = delcommafy(textValue.value);
203
190
  }
204
191
  };
205
- function formatNumberWithComma(numValue) {
206
- if (isNaN(numValue) || numValue === null || numValue === void 0) {
207
- return numValue;
192
+ function handlerValue(value) {
193
+ if (!value && value !== 0) {
194
+ compValue.value = value;
195
+ return;
196
+ }
197
+ let cleanValue = delcommafy(value.toString());
198
+ let numValue2 = Number(cleanValue);
199
+ if (isNaN(numValue2)) return;
200
+ numValue2 = Number(numValue2.toFixed(precision.value));
201
+ switch (props.format) {
202
+ case "wan":
203
+ numValue2 = numMulti(numValue2, 1e4);
204
+ break;
205
+ case "million":
206
+ numValue2 = numMulti(numValue2, 1e6);
207
+ break;
208
+ case "percentage":
209
+ numValue2 = numDiv(numValue2, 100);
210
+ break;
211
+ case "permillage":
212
+ numValue2 = numDiv(numValue2, 1e3);
213
+ break;
214
+ case "permillion":
215
+ numValue2 = numDiv(numValue2, 1e4);
216
+ break;
217
+ }
218
+ const effectiveMax = props.maxValue != null ? props.maxValue : 999999999999999;
219
+ const effectiveMin = props.minValue != null ? props.minValue : -999999999999999;
220
+ numValue2 = Math.max(effectiveMin, Math.min(effectiveMax, numValue2));
221
+ compValue.value = numValue2;
222
+ }
223
+ function formatNumberWithComma(numValue2) {
224
+ if (isNaN(numValue2) || numValue2 === null || numValue2 === void 0) {
225
+ return numValue2;
208
226
  }
209
- let numStr = numValue.toString();
227
+ let numStr = numValue2.toString();
210
228
  const endsWithDot = numStr.endsWith(".");
211
229
  const [integerPart, decimalPart] = numStr.split(".");
212
230
  const formattedInteger = integerPart.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
@@ -315,7 +333,8 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
315
333
  readonly: __props.readonly,
316
334
  formatter,
317
335
  parser,
318
- onBlur: handleBlur
336
+ onBlur: handleBlur,
337
+ onInput: handleInput
319
338
  }, vue.toHandlers(__props.config.eventHandlers), {
320
339
  onChange: handleChange,
321
340
  style: { "width": "100%" }
@@ -479,6 +479,7 @@ async function handleFormSetValue(node, data, fields, context) {
479
479
  delete formData[value];
480
480
  });
481
481
  }
482
+ formData = common.removeEmptyValues(formData);
482
483
  delete formData.pageNo;
483
484
  delete formData.pageSize;
484
485
  const formComponent = ((_a = context.components) == null ? void 0 : _a.form) || ((_b = context.components) == null ? void 0 : _b.table);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fecp/designer",
3
- "version": "5.5.33",
3
+ "version": "5.5.35",
4
4
  "main": "lib/designer/index.js",
5
5
  "module": "es/designer/index.mjs",
6
6
  "files": [