bm-admin-ui 1.0.50-alpha → 1.0.52-alpha

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 (103) hide show
  1. package/es/components/button/index.d.ts +1 -1
  2. package/es/components/button/src/button.vue.d.ts +1 -1
  3. package/es/components/edit-form/index.d.ts +150 -0
  4. package/es/components/edit-form/index.js +1186 -0
  5. package/es/components/edit-form/src/composables/api.d.ts +13 -0
  6. package/es/components/edit-form/src/composables/config.d.ts +13 -0
  7. package/es/components/edit-form/src/composables/event.d.ts +10 -0
  8. package/es/components/edit-form/src/composables/utils.d.ts +12 -0
  9. package/es/components/edit-form/src/edit-form.vue.d.ts +148 -0
  10. package/es/components/edit-form/src/group.vue.d.ts +6 -0
  11. package/es/components/edit-form/src/props.d.ts +17 -0
  12. package/es/components/edit-form/src/types.d.ts +77 -0
  13. package/es/components/editor/index.d.ts +9 -9
  14. package/es/components/editor/src/editor.vue.d.ts +9 -9
  15. package/es/components/feedback/index.d.ts +7 -7
  16. package/es/components/feedback/src/bmAlert.vue.d.ts +4 -4
  17. package/es/components/feedback/src/bmModal.vue.d.ts +3 -3
  18. package/es/components/flow-designer/src/bm-nodes/BmConditionNode.vue.d.ts +4 -4
  19. package/es/components/form-create/index.js +17 -11
  20. package/es/components/form-designer/index.js +39 -20
  21. package/es/components/index.d.ts +1 -0
  22. package/es/components/index.js +1 -0
  23. package/es/components/input-tags-display/index.d.ts +3 -3
  24. package/es/components/input-tags-display/src/input-tags-display.vue.d.ts +3 -3
  25. package/es/components/search-filter/index.d.ts +4 -4
  26. package/es/components/search-filter/src/search-filter.vue.d.ts +4 -4
  27. package/es/components/select-all/index.d.ts +13 -13
  28. package/es/components/select-all/src/selectAll.vue.d.ts +13 -13
  29. package/es/components/shops-filter/index.d.ts +1 -1
  30. package/es/components/shops-filter/src/shops-filter.vue.d.ts +1 -1
  31. package/es/components/staffs-selector/index.d.ts +3 -3
  32. package/es/components/staffs-selector/index.js +2 -2
  33. package/es/components/staffs-selector/src/staffs-selector.vue.d.ts +3 -3
  34. package/es/components/timeline/index.d.ts +1 -1
  35. package/es/components/timeline/src/timeline-item.vue.d.ts +1 -1
  36. package/lib/components/button/index.d.ts +1 -1
  37. package/lib/components/button/src/button.vue.d.ts +1 -1
  38. package/lib/components/edit-form/index.d.ts +150 -0
  39. package/lib/components/edit-form/index.js +1195 -0
  40. package/lib/components/edit-form/src/composables/api.d.ts +13 -0
  41. package/lib/components/edit-form/src/composables/config.d.ts +13 -0
  42. package/lib/components/edit-form/src/composables/event.d.ts +10 -0
  43. package/lib/components/edit-form/src/composables/utils.d.ts +12 -0
  44. package/lib/components/edit-form/src/edit-form.vue.d.ts +148 -0
  45. package/lib/components/edit-form/src/group.vue.d.ts +6 -0
  46. package/lib/components/edit-form/src/props.d.ts +17 -0
  47. package/lib/components/edit-form/src/types.d.ts +77 -0
  48. package/lib/components/editor/index.d.ts +9 -9
  49. package/lib/components/editor/src/editor.vue.d.ts +9 -9
  50. package/lib/components/feedback/index.d.ts +7 -7
  51. package/lib/components/feedback/src/bmAlert.vue.d.ts +4 -4
  52. package/lib/components/feedback/src/bmModal.vue.d.ts +3 -3
  53. package/lib/components/flow-designer/src/bm-nodes/BmConditionNode.vue.d.ts +4 -4
  54. package/lib/components/form-create/index.js +17 -11
  55. package/lib/components/form-designer/index.js +29 -10
  56. package/lib/components/index.d.ts +1 -0
  57. package/lib/components/index.js +7 -0
  58. package/lib/components/input-tags-display/index.d.ts +3 -3
  59. package/lib/components/input-tags-display/src/input-tags-display.vue.d.ts +3 -3
  60. package/lib/components/search-filter/index.d.ts +4 -4
  61. package/lib/components/search-filter/src/search-filter.vue.d.ts +4 -4
  62. package/lib/components/select-all/index.d.ts +13 -13
  63. package/lib/components/select-all/src/selectAll.vue.d.ts +13 -13
  64. package/lib/components/shops-filter/index.d.ts +1 -1
  65. package/lib/components/shops-filter/src/shops-filter.vue.d.ts +1 -1
  66. package/lib/components/staffs-selector/index.d.ts +3 -3
  67. package/lib/components/staffs-selector/index.js +1 -1
  68. package/lib/components/staffs-selector/src/staffs-selector.vue.d.ts +3 -3
  69. package/lib/components/timeline/index.d.ts +1 -1
  70. package/lib/components/timeline/src/timeline-item.vue.d.ts +1 -1
  71. package/package.json +1 -1
  72. package/theme-chalk/edit-form.css +1 -0
  73. package/theme-chalk/index.css +1 -1
  74. package/types/components/button/index.d.ts +1 -1
  75. package/types/components/button/src/button.vue.d.ts +1 -1
  76. package/types/components/edit-form/index.d.ts +150 -0
  77. package/types/components/edit-form/src/composables/api.d.ts +13 -0
  78. package/types/components/edit-form/src/composables/config.d.ts +13 -0
  79. package/types/components/edit-form/src/composables/event.d.ts +10 -0
  80. package/types/components/edit-form/src/composables/utils.d.ts +12 -0
  81. package/types/components/edit-form/src/edit-form.vue.d.ts +148 -0
  82. package/types/components/edit-form/src/group.vue.d.ts +6 -0
  83. package/types/components/edit-form/src/props.d.ts +17 -0
  84. package/types/components/edit-form/src/types.d.ts +77 -0
  85. package/types/components/editor/index.d.ts +9 -9
  86. package/types/components/editor/src/editor.vue.d.ts +9 -9
  87. package/types/components/feedback/index.d.ts +7 -7
  88. package/types/components/feedback/src/bmAlert.vue.d.ts +4 -4
  89. package/types/components/feedback/src/bmModal.vue.d.ts +3 -3
  90. package/types/components/flow-designer/src/bm-nodes/BmConditionNode.vue.d.ts +4 -4
  91. package/types/components/index.d.ts +1 -0
  92. package/types/components/input-tags-display/index.d.ts +3 -3
  93. package/types/components/input-tags-display/src/input-tags-display.vue.d.ts +3 -3
  94. package/types/components/search-filter/index.d.ts +4 -4
  95. package/types/components/search-filter/src/search-filter.vue.d.ts +4 -4
  96. package/types/components/select-all/index.d.ts +13 -13
  97. package/types/components/select-all/src/selectAll.vue.d.ts +13 -13
  98. package/types/components/shops-filter/index.d.ts +1 -1
  99. package/types/components/shops-filter/src/shops-filter.vue.d.ts +1 -1
  100. package/types/components/staffs-selector/index.d.ts +3 -3
  101. package/types/components/staffs-selector/src/staffs-selector.vue.d.ts +3 -3
  102. package/types/components/timeline/index.d.ts +1 -1
  103. package/types/components/timeline/src/timeline-item.vue.d.ts +1 -1
@@ -0,0 +1,1195 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var withInstall = require('bm-admin-ui/lib/utils/with-install');
6
+ var vue = require('vue');
7
+ var iconsVue = require('@ant-design/icons-vue');
8
+ var antDesignVue = require('ant-design-vue');
9
+ var BmOverTooltips = require('bm-admin-ui/lib/components/over-tooltips');
10
+
11
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
12
+
13
+ var BmOverTooltips__default = /*#__PURE__*/_interopDefaultLegacy(BmOverTooltips);
14
+
15
+ const editFormProps = () => ({
16
+ config: {
17
+ type: Object,
18
+ default() {
19
+ return {};
20
+ },
21
+ },
22
+ form: {
23
+ type: Object,
24
+ default() {
25
+ return {};
26
+ },
27
+ },
28
+ groupRules: {
29
+ type: Object,
30
+ default() {
31
+ return [];
32
+ },
33
+ },
34
+ });
35
+
36
+ function isNil(value) {
37
+ return value == null;
38
+ }
39
+ function useUtils(props, colCount, tmpForm) {
40
+ function getValueOfOption(key, defaultKey, option) {
41
+ return key && !isNil(option[key]) ? option[key] : option[defaultKey];
42
+ }
43
+ function getPopupContainer(e) {
44
+ while (e.parentNode && !e.classList.contains('ant-form-item')) {
45
+ e = e.parentNode;
46
+ }
47
+ return e;
48
+ }
49
+ const defaultCol = {
50
+ labelCol: { flex: '82px' },
51
+ };
52
+ function getColConfigFromCols(type, positionIndex, index) {
53
+ var _a, _b, _c;
54
+ let cols = ((_b = (_a = props.config) === null || _a === void 0 ? void 0 : _a.global) === null || _b === void 0 ? void 0 : _b.cols) || [];
55
+ if (cols.length === 0) {
56
+ cols = [defaultCol];
57
+ }
58
+ let tempIndex = cols.length - 1;
59
+ if (positionIndex !== undefined && positionIndex < cols.length) {
60
+ tempIndex = positionIndex;
61
+ }
62
+ else if (index !== undefined && index < cols.length) {
63
+ tempIndex = index;
64
+ }
65
+ return Object.assign(Object.assign({}, defaultCol[type]), (_c = cols[tempIndex]) === null || _c === void 0 ? void 0 : _c[type]);
66
+ }
67
+ function getWidthFromFlexString(text) {
68
+ const reg = /\d+(px|%)/;
69
+ const regRet = text.match(reg);
70
+ if (regRet) {
71
+ return regRet[0].replace('width:', '').trim();
72
+ }
73
+ else {
74
+ return '';
75
+ }
76
+ }
77
+ function getSpecialWrapperColConfig(item) {
78
+ var _a, _b;
79
+ if (colCount.value <= 1 || !item.specialRow || item.wrapperCol) {
80
+ return;
81
+ }
82
+ let width = '100%';
83
+ let cols = ((_b = (_a = props.config) === null || _a === void 0 ? void 0 : _a.global) === null || _b === void 0 ? void 0 : _b.cols) || [];
84
+ if (cols.length === 0) {
85
+ cols = [defaultCol];
86
+ }
87
+ const positionIndex = item.positionIndex !== undefined ? item.positionIndex : cols.length - 1;
88
+ const startLabelCol = getColConfigFromCols('labelCol', positionIndex);
89
+ const endLabelCol = getColConfigFromCols('labelCol', positionIndex + 1);
90
+ const endWrapperCol = getColConfigFromCols('wrapperCol', positionIndex + 1);
91
+ const startLabelWidth = getWidthFromFlexString((startLabelCol.flex || '') + '');
92
+ const endLabelWidth = getWidthFromFlexString((endLabelCol.flex || '') + '');
93
+ const endWrapperWidth = getWidthFromFlexString((endWrapperCol.flex || '') + '');
94
+ if (startLabelWidth && endLabelWidth && endWrapperWidth) {
95
+ width = `calc(50% - ${startLabelWidth} + ${endLabelWidth} + ${endWrapperWidth})`;
96
+ return { flex: '0 0 ' + width };
97
+ }
98
+ return;
99
+ }
100
+ function getColsConfig(type, item, index) {
101
+ var _a, _b;
102
+ if (((_b = (_a = props.config) === null || _a === void 0 ? void 0 : _a.global) === null || _b === void 0 ? void 0 : _b.layout) === 'vertical') {
103
+ return;
104
+ }
105
+ if (item[type]) {
106
+ return item[type];
107
+ }
108
+ else {
109
+ if (colCount.value > 1) {
110
+ if (type === 'wrapperCol') {
111
+ if (item.wholeRow) {
112
+ return;
113
+ }
114
+ else if (item.specialRow) {
115
+ return getSpecialWrapperColConfig(item);
116
+ }
117
+ }
118
+ }
119
+ return getColConfigFromCols(type, item.positionIndex, index);
120
+ }
121
+ }
122
+ function getControlWidth(item) {
123
+ let width = 100 / colCount.value;
124
+ if (item.wholeRow) {
125
+ width = 100;
126
+ }
127
+ else if (item.specialRow) {
128
+ width *= 2;
129
+ }
130
+ return Math.floor(width * 100) / 100 + '%';
131
+ }
132
+ function getShowValue(item) {
133
+ var _a;
134
+ if (item.textFormatter && typeof item.textFormatter === 'function') {
135
+ const res = item.textFormatter(tmpForm.value);
136
+ if (res === false) {
137
+ return item.placeholder || '-';
138
+ }
139
+ return res;
140
+ }
141
+ else {
142
+ return ((_a = tmpForm.value) === null || _a === void 0 ? void 0 : _a[item.prop]) || item.placeholder || '-';
143
+ }
144
+ }
145
+ return {
146
+ getValueOfOption,
147
+ getPopupContainer,
148
+ getColsConfig,
149
+ getControlWidth,
150
+ getShowValue,
151
+ };
152
+ }
153
+
154
+ function useConfig(props, colCount) {
155
+ const config = vue.computed(() => {
156
+ var _a;
157
+ const config = ((_a = props.config) === null || _a === void 0 ? void 0 : _a.config) || [];
158
+ const ret = config.map((item) => {
159
+ const newRows = [[]];
160
+ const rows = item.rows || [];
161
+ rows.forEach((item) => {
162
+ item.positionIndex = 0;
163
+ const lastRow = newRows[newRows.length - 1];
164
+ const lastRowSpan = lastRow.reduce((pre, cur) => pre +
165
+ (cur.hide
166
+ ? 0
167
+ : cur.singleRow || cur.wholeRow
168
+ ? colCount.value
169
+ : cur.specialRow
170
+ ? 2
171
+ : 1), 0);
172
+ const curSpan = item.hide ? 0 : item.specialRow ? 2 : 1;
173
+ if (item.singleRow || item.wholeRow || item.newRow) {
174
+ if (lastRowSpan === 0) {
175
+ lastRow.push(item);
176
+ }
177
+ else {
178
+ newRows.push([item]);
179
+ }
180
+ }
181
+ else {
182
+ if (lastRowSpan === 0 || lastRowSpan + curSpan <= colCount.value) {
183
+ item.positionIndex = lastRowSpan;
184
+ lastRow.push(item);
185
+ }
186
+ else {
187
+ newRows.push([item]);
188
+ }
189
+ }
190
+ });
191
+ return Object.assign(Object.assign({}, item), { rows: newRows });
192
+ });
193
+ return ret;
194
+ });
195
+ return { config };
196
+ }
197
+
198
+ function useApi(formRef) {
199
+ function clearValidate(nameList) {
200
+ var _a;
201
+ (_a = formRef.value) === null || _a === void 0 ? void 0 : _a.clearValidate(nameList);
202
+ }
203
+ function resetFields(nameList) {
204
+ var _a;
205
+ (_a = formRef.value) === null || _a === void 0 ? void 0 : _a.resetFields(nameList);
206
+ }
207
+ function scrollToField(name, options) {
208
+ var _a;
209
+ (_a = formRef.value) === null || _a === void 0 ? void 0 : _a.scrollToField(name, options);
210
+ }
211
+ function validate(nameList) {
212
+ var _a;
213
+ if (formRef.value) {
214
+ return (_a = formRef.value) === null || _a === void 0 ? void 0 : _a.validate(nameList);
215
+ }
216
+ else {
217
+ return Promise.reject(new Error('获取表单失败'));
218
+ }
219
+ }
220
+ function validateFields(nameList) {
221
+ var _a;
222
+ if (formRef.value) {
223
+ return (_a = formRef.value) === null || _a === void 0 ? void 0 : _a.validate(nameList);
224
+ }
225
+ else {
226
+ return Promise.reject(new Error('获取表单失败'));
227
+ }
228
+ }
229
+ return { clearValidate, resetFields, scrollToField, validate, validateFields };
230
+ }
231
+
232
+ function useEvent(tmpForm, emits) {
233
+ function onFormItemChange(e, item, selectedOptions) {
234
+ emits('update:form', tmpForm.value || {});
235
+ emits(`change:formItem`, e, item.prop, selectedOptions);
236
+ if (item.onChange) {
237
+ item.onChange(e, tmpForm.value, selectedOptions);
238
+ }
239
+ }
240
+ function onFormItemClick(e, item) {
241
+ emits(`click:formItem`, e, item.prop);
242
+ if (item.onClick) {
243
+ item.onClick(e, tmpForm.value);
244
+ }
245
+ }
246
+ function onFormItemBlur(e, item) {
247
+ emits(`blur:formItem`, e, item.prop);
248
+ if (item.onBlur) {
249
+ item.onBlur(e, tmpForm.value);
250
+ }
251
+ }
252
+ function onFormItemPressEnter(e, item) {
253
+ emits(`pressEnter:formItem`, e, item.prop);
254
+ if (item.onPressEnter) {
255
+ item.onPressEnter(e, tmpForm.value);
256
+ }
257
+ }
258
+ function onFormItemKeyup(e, item) {
259
+ emits(`keyup:formItem`, e, item.prop);
260
+ if (item.onKeyup) {
261
+ item.onKeyup(e, tmpForm.value);
262
+ }
263
+ }
264
+ function onFormItemFocus(e, item) {
265
+ emits(`focus:formItem`, e, item.prop);
266
+ if (item.onFocus) {
267
+ item.onFocus(e, tmpForm.value);
268
+ }
269
+ }
270
+ return {
271
+ onFormItemChange,
272
+ onFormItemClick,
273
+ onFormItemBlur,
274
+ onFormItemPressEnter,
275
+ onFormItemKeyup,
276
+ onFormItemFocus,
277
+ };
278
+ }
279
+
280
+ var _export_sfc = (sfc, props) => {
281
+ const target = sfc.__vccOpts || sfc;
282
+ for (const [key, val] of props) {
283
+ target[key] = val;
284
+ }
285
+ return target;
286
+ };
287
+
288
+ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
289
+ __name: "group",
290
+ setup(__props) {
291
+ const formItemContext = antDesignVue.Form.useInjectFormItemContext();
292
+ function onFieldChange() {
293
+ formItemContext.onFieldChange();
294
+ }
295
+ function onFieldBlur() {
296
+ formItemContext.onFieldBlur();
297
+ }
298
+ return (_ctx, _cache) => {
299
+ const _component_a_input_group = vue.resolveComponent("a-input-group");
300
+ return vue.openBlock(), vue.createBlock(_component_a_input_group, { compact: "" }, {
301
+ default: vue.withCtx(() => [
302
+ vue.renderSlot(_ctx.$slots, "default", {
303
+ onFieldChange,
304
+ onFieldBlur
305
+ })
306
+ ]),
307
+ _: 3
308
+ });
309
+ };
310
+ }
311
+ });
312
+ var Group = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__file", "group.vue"]]);
313
+
314
+ const _hoisted_1 = {
315
+ key: 1,
316
+ class: "block-inner"
317
+ };
318
+ const _hoisted_2 = {
319
+ key: 0,
320
+ class: "block-title"
321
+ };
322
+ const _hoisted_3 = { class: "block-main" };
323
+ const __default__ = {
324
+ name: "BmEditForm"
325
+ };
326
+ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
327
+ ...__default__,
328
+ props: editFormProps(),
329
+ emits: ["update:form", "change:formItem", "click:formItem", "blur:formItem", "pressEnter:formItem", "keyup:formItem", "focus:formItem"],
330
+ setup(__props, { expose, emit: emits }) {
331
+ const props = __props;
332
+ const tmpForm = vue.ref({});
333
+ const formRef = vue.ref(null);
334
+ const colCount = vue.computed(() => {
335
+ return props.config?.global?.colCount || 1;
336
+ });
337
+ vue.watch(
338
+ () => props.form,
339
+ (val = {}) => {
340
+ tmpForm.value = val || {};
341
+ },
342
+ { deep: true, immediate: true }
343
+ );
344
+ const {
345
+ getValueOfOption,
346
+ getPopupContainer,
347
+ getColsConfig,
348
+ getControlWidth,
349
+ getShowValue
350
+ } = useUtils(props, colCount, tmpForm);
351
+ const { config } = useConfig(props, colCount);
352
+ const {
353
+ onFormItemChange,
354
+ onFormItemClick,
355
+ onFormItemBlur,
356
+ onFormItemPressEnter,
357
+ onFormItemKeyup,
358
+ onFormItemFocus
359
+ } = useEvent(tmpForm, emits);
360
+ const { clearValidate, resetFields, scrollToField, validate, validateFields } = useApi(formRef);
361
+ function updateSlot(key, value) {
362
+ tmpForm.value[key] = value;
363
+ emits("update:form", tmpForm.value || {});
364
+ }
365
+ expose({
366
+ clearValidate,
367
+ resetFields,
368
+ scrollToField,
369
+ validate,
370
+ validateFields
371
+ });
372
+ return (_ctx, _cache) => {
373
+ const _component_a_tooltip = vue.resolveComponent("a-tooltip");
374
+ const _component_a_space = vue.resolveComponent("a-space");
375
+ const _component_a_switch = vue.resolveComponent("a-switch");
376
+ const _component_a_select_option = vue.resolveComponent("a-select-option");
377
+ const _component_a_select = vue.resolveComponent("a-select");
378
+ const _component_a_input = vue.resolveComponent("a-input");
379
+ const _component_a_input_number = vue.resolveComponent("a-input-number");
380
+ const _component_a_textarea = vue.resolveComponent("a-textarea");
381
+ const _component_a_checkbox = vue.resolveComponent("a-checkbox");
382
+ const _component_a_checkbox_group = vue.resolveComponent("a-checkbox-group");
383
+ const _component_a_radio = vue.resolveComponent("a-radio");
384
+ const _component_a_radio_group = vue.resolveComponent("a-radio-group");
385
+ const _component_a_cascader = vue.resolveComponent("a-cascader");
386
+ const _component_a_date_picker = vue.resolveComponent("a-date-picker");
387
+ const _component_a_time_picker = vue.resolveComponent("a-time-picker");
388
+ const _component_a_range_picker = vue.resolveComponent("a-range-picker");
389
+ const _component_a_form_item = vue.resolveComponent("a-form-item");
390
+ const _component_a_form = vue.resolveComponent("a-form");
391
+ return vue.openBlock(), vue.createBlock(_component_a_form, {
392
+ ref_key: "formRef",
393
+ ref: formRef,
394
+ class: "edit-form",
395
+ model: tmpForm.value,
396
+ rules: { ...props.config?.rules, ...props.groupRules },
397
+ layout: props.config?.global?.layout || "horizontal",
398
+ autocomplete: props.config?.global?.autocomplete || "off"
399
+ }, {
400
+ default: vue.withCtx(() => [
401
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(config), (block, blockIndex) => {
402
+ return vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: blockIndex }, [
403
+ !block.hide && (block.visibleControl ? block.visibleControl(tmpForm.value) : true) ? (vue.openBlock(), vue.createElementBlock("div", {
404
+ key: 0,
405
+ class: vue.normalizeClass(["block", [
406
+ block.class || "",
407
+ block.slot ? "block--slot" : "",
408
+ block.slot ? "block--slot--" + block.slot : ""
409
+ ]])
410
+ }, [
411
+ block.slot ? vue.renderSlot(_ctx.$slots, block.slot, {
412
+ key: 0,
413
+ update: updateSlot,
414
+ tmpForm: tmpForm.value
415
+ }) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
416
+ block.title ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2, vue.toDisplayString(block.title), 1)) : vue.createCommentVNode("v-if", true),
417
+ vue.createElementVNode("div", _hoisted_3, [
418
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(block.rows, (row, rowIndex) => {
419
+ return vue.openBlock(), vue.createElementBlock("div", {
420
+ key: rowIndex,
421
+ class: "row"
422
+ }, [
423
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(row, (item, itemIndex) => {
424
+ return vue.openBlock(), vue.createElementBlock(vue.Fragment, {
425
+ key: item.prop
426
+ }, [
427
+ !item.hide && (item.visibleControl ? item.visibleControl(tmpForm.value) : true) ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
428
+ item.slot ? vue.renderSlot(_ctx.$slots, item.slot, {
429
+ key: 0,
430
+ update: updateSlot,
431
+ tmpForm: tmpForm.value,
432
+ injectProps: {
433
+ id: item.slot,
434
+ class: [
435
+ "row-item",
436
+ item.formItemClass || "",
437
+ item.align === "right" ? "row-item--right" : "",
438
+ item.type === "text" ? "row-item--text" : "",
439
+ item.type === "placeholder" ? "row-item--placeholder" : "",
440
+ item.prop ? "row-item--" + item.prop : ""
441
+ ],
442
+ name: item.slot,
443
+ required: item.required,
444
+ colon: item.colon,
445
+ labelCol: vue.unref(getColsConfig)("labelCol", item, itemIndex),
446
+ wrapperCol: vue.unref(getColsConfig)("wrapperCol", item, itemIndex),
447
+ style: { width: vue.unref(getControlWidth)(item) }
448
+ },
449
+ config: item
450
+ }) : (vue.openBlock(), vue.createBlock(_component_a_form_item, {
451
+ key: 1,
452
+ id: item.prop,
453
+ class: vue.normalizeClass(["row-item", [
454
+ item.formItemClass || "",
455
+ item.align === "right" ? "row-item--right" : "",
456
+ item.type === "text" ? "row-item--text" : "",
457
+ item.type === "placeholder" ? "row-item--placeholder" : "",
458
+ item.prop ? "row-item--" + item.prop : ""
459
+ ]]),
460
+ name: item.prop,
461
+ required: item.required,
462
+ colon: item.colon,
463
+ "label-col": vue.unref(getColsConfig)("labelCol", item, itemIndex),
464
+ "wrapper-col": vue.unref(getColsConfig)("wrapperCol", item, itemIndex),
465
+ style: vue.normalizeStyle({ width: vue.unref(getControlWidth)(item) })
466
+ }, {
467
+ label: vue.withCtx(() => [
468
+ item.tip ? (vue.openBlock(), vue.createBlock(_component_a_space, {
469
+ key: 0,
470
+ size: 4
471
+ }, {
472
+ default: vue.withCtx(() => [
473
+ vue.createTextVNode(vue.toDisplayString(item.label) + " ", 1),
474
+ vue.createVNode(_component_a_tooltip, {
475
+ placement: item.tipPlacement || "top",
476
+ "get-popup-container": props.config?.global?.getPopupContainer || vue.unref(getPopupContainer),
477
+ "arrow-point-at-center": true,
478
+ "overlay-style": {
479
+ width: item.tipWidth,
480
+ "max-width": item.tipWidth
481
+ }
482
+ }, {
483
+ title: vue.withCtx(() => [
484
+ vue.createElementVNode("div", null, vue.toDisplayString(item.tip), 1)
485
+ ]),
486
+ default: vue.withCtx(() => [
487
+ vue.createVNode(vue.unref(iconsVue.QuestionCircleOutlined), { style: { "color": "#9393a3", "margin-right": "5px" } })
488
+ ]),
489
+ _: 2
490
+ }, 1032, ["placement", "get-popup-container", "overlay-style"])
491
+ ]),
492
+ _: 2
493
+ }, 1024)) : (vue.openBlock(), vue.createBlock(_component_a_space, { key: 1 }, {
494
+ default: vue.withCtx(() => [
495
+ vue.createTextVNode(vue.toDisplayString(item.label), 1)
496
+ ]),
497
+ _: 2
498
+ }, 1024))
499
+ ]),
500
+ default: vue.withCtx(() => [
501
+ item.slotBefore ? vue.renderSlot(_ctx.$slots, item.slotBefore, {
502
+ key: 0,
503
+ update: updateSlot,
504
+ tmpForm: tmpForm.value,
505
+ validate: (nameList = [item.prop]) => vue.unref(validate)(nameList)
506
+ }) : vue.createCommentVNode("v-if", true),
507
+ item.type === "slot" ? vue.renderSlot(_ctx.$slots, item.prop, {
508
+ key: 1,
509
+ update: updateSlot,
510
+ tmpForm: tmpForm.value,
511
+ validate: (nameList = [item.prop]) => vue.unref(validate)(nameList)
512
+ }) : vue.createCommentVNode("v-if", true),
513
+ item.type === "switch" ? (vue.openBlock(), vue.createBlock(_component_a_switch, {
514
+ key: 2,
515
+ checked: tmpForm.value[item.prop],
516
+ "onUpdate:checked": ($event) => tmpForm.value[item.prop] = $event,
517
+ class: vue.normalizeClass([
518
+ item.class || "",
519
+ item.getClass ? item.getClass(tmpForm.value, item.prop) : ""
520
+ ]),
521
+ style: vue.normalizeStyle({
522
+ ...item.style,
523
+ ...item.getStyle?.(tmpForm.value, item.prop)
524
+ }),
525
+ disabled: item.disabled || item.disabledControl?.(tmpForm.value),
526
+ onChange: (checked) => vue.unref(onFormItemChange)(checked, item),
527
+ onClick: (checked) => vue.unref(onFormItemClick)(checked, item),
528
+ onFocus: (e) => vue.unref(onFormItemFocus)(e, item)
529
+ }, null, 8, ["checked", "onUpdate:checked", "class", "style", "disabled", "onChange", "onClick", "onFocus"])) : vue.createCommentVNode("v-if", true),
530
+ item.type === "select" ? (vue.openBlock(), vue.createBlock(_component_a_select, {
531
+ key: 3,
532
+ value: tmpForm.value[item.prop],
533
+ "onUpdate:value": ($event) => tmpForm.value[item.prop] = $event,
534
+ class: vue.normalizeClass([
535
+ item.class || "",
536
+ item.getClass ? item.getClass(tmpForm.value, item.prop) : ""
537
+ ]),
538
+ style: vue.normalizeStyle({
539
+ ...item.style,
540
+ ...item.getStyle?.(tmpForm.value, item.prop)
541
+ }),
542
+ mode: item.mode,
543
+ "max-tag-count": item.maxTagCount,
544
+ "max-tag-placeholder": (omittedValues) => "+ " + omittedValues.length,
545
+ "show-search": item.showSearch,
546
+ disabled: item.disabled || item.disabledControl?.(tmpForm.value),
547
+ "allow-clear": item.allowClear,
548
+ "show-arrow": "",
549
+ "option-filter-prop": item.optionFilterProp || "label",
550
+ placeholder: item.placeholder || "\u8BF7\u9009\u62E9",
551
+ "get-popup-container": props.config?.global?.getPopupContainer || item.getPopupContainer || void 0,
552
+ onChange: (e) => vue.unref(onFormItemChange)(e, item),
553
+ onFocus: (e) => vue.unref(onFormItemFocus)(e, item)
554
+ }, {
555
+ default: vue.withCtx(() => [
556
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(item.options, (option) => {
557
+ return vue.openBlock(), vue.createBlock(_component_a_select_option, {
558
+ key: vue.unref(getValueOfOption)(
559
+ item.optionValueName,
560
+ "value",
561
+ option
562
+ ),
563
+ value: vue.unref(getValueOfOption)(
564
+ item.optionValueName,
565
+ "value",
566
+ option
567
+ ),
568
+ label: vue.unref(getValueOfOption)(
569
+ item.optionLabelName,
570
+ "label",
571
+ option
572
+ ),
573
+ disabled: option?.disabled,
574
+ class: vue.normalizeClass([
575
+ option.class || "",
576
+ option.getClass ? option.getClass(tmpForm.value, item.prop, option) : ""
577
+ ])
578
+ }, {
579
+ default: vue.withCtx(() => [
580
+ vue.createVNode(vue.unref(BmOverTooltips__default["default"]), {
581
+ title: vue.unref(getValueOfOption)(
582
+ item.optionLabelName,
583
+ "label",
584
+ option
585
+ )
586
+ }, null, 8, ["title"])
587
+ ]),
588
+ _: 2
589
+ }, 1032, ["value", "label", "disabled", "class"]);
590
+ }), 128))
591
+ ]),
592
+ _: 2
593
+ }, 1032, ["value", "onUpdate:value", "class", "style", "mode", "max-tag-count", "max-tag-placeholder", "show-search", "disabled", "allow-clear", "option-filter-prop", "placeholder", "get-popup-container", "onChange", "onFocus"])) : vue.createCommentVNode("v-if", true),
594
+ item.type === "input" ? (vue.openBlock(), vue.createBlock(_component_a_input, {
595
+ key: 4,
596
+ value: tmpForm.value[item.prop],
597
+ "onUpdate:value": ($event) => tmpForm.value[item.prop] = $event,
598
+ class: vue.normalizeClass([
599
+ item.class || "",
600
+ item.getClass ? item.getClass(tmpForm.value, item.prop) : ""
601
+ ]),
602
+ style: vue.normalizeStyle({
603
+ ...item.style,
604
+ ...item.getStyle?.(tmpForm.value, item.prop)
605
+ }),
606
+ maxlength: item.maxlength,
607
+ disabled: item.disabled || item.disabledControl?.(tmpForm.value),
608
+ "allow-clear": item.allowClear,
609
+ type: item.inputType,
610
+ placeholder: item.placeholder || "\u8BF7\u8F93\u5165",
611
+ prefix: item.prefix || "",
612
+ suffix: item.suffix || "",
613
+ "addon-before": item.addonBefore || "",
614
+ "addon-after": item.addonAfter || "",
615
+ onChange: (e) => vue.unref(onFormItemChange)(e, item),
616
+ onBlur: (e) => vue.unref(onFormItemBlur)(e, item),
617
+ onPressEnter: (e) => vue.unref(onFormItemPressEnter)(e, item),
618
+ onKeyup: (e) => vue.unref(onFormItemKeyup)(e, item),
619
+ onFocus: (e) => vue.unref(onFormItemFocus)(e, item)
620
+ }, null, 8, ["value", "onUpdate:value", "class", "style", "maxlength", "disabled", "allow-clear", "type", "placeholder", "prefix", "suffix", "addon-before", "addon-after", "onChange", "onBlur", "onPressEnter", "onKeyup", "onFocus"])) : vue.createCommentVNode("v-if", true),
621
+ item.type === "inputNumber" ? (vue.openBlock(), vue.createBlock(_component_a_input_number, {
622
+ key: 5,
623
+ value: tmpForm.value[item.prop],
624
+ "onUpdate:value": ($event) => tmpForm.value[item.prop] = $event,
625
+ class: vue.normalizeClass([
626
+ item.class || "",
627
+ item.getClass ? item.getClass(tmpForm.value, item.prop) : ""
628
+ ]),
629
+ style: vue.normalizeStyle({
630
+ ...item.style,
631
+ ...item.getStyle?.(tmpForm.value, item.prop)
632
+ }),
633
+ disabled: item.disabled || item.disabledControl?.(tmpForm.value),
634
+ precision: item.precision || 0,
635
+ parser: item.parser,
636
+ placeholder: item.placeholder || "\u8BF7\u8F93\u5165",
637
+ prefix: item.prefix || "",
638
+ suffix: item.suffix || "",
639
+ "addon-before": item.addonBefore || "",
640
+ "addon-after": item.addonAfter || "",
641
+ "allow-clear": item.allowClear,
642
+ formatter: item.formatter,
643
+ min: item.min || 0,
644
+ max: item.max || 99999.99,
645
+ step: item.step || 1,
646
+ onChange: (e) => vue.unref(onFormItemChange)(e, item),
647
+ onBlur: (e) => vue.unref(onFormItemBlur)(e, item),
648
+ onPressEnter: (e) => vue.unref(onFormItemPressEnter)(e, item),
649
+ onKeyup: (e) => vue.unref(onFormItemKeyup)(e, item),
650
+ onFocus: (e) => vue.unref(onFormItemFocus)(e, item)
651
+ }, null, 8, ["value", "onUpdate:value", "class", "style", "disabled", "precision", "parser", "placeholder", "prefix", "suffix", "addon-before", "addon-after", "allow-clear", "formatter", "min", "max", "step", "onChange", "onBlur", "onPressEnter", "onKeyup", "onFocus"])) : vue.createCommentVNode("v-if", true),
652
+ item.type === "textarea" ? (vue.openBlock(), vue.createBlock(_component_a_textarea, {
653
+ key: 6,
654
+ value: tmpForm.value[item.prop],
655
+ "onUpdate:value": ($event) => tmpForm.value[item.prop] = $event,
656
+ class: vue.normalizeClass([
657
+ item.class || "",
658
+ item.getClass ? item.getClass(tmpForm.value, item.prop) : ""
659
+ ]),
660
+ style: vue.normalizeStyle([{
661
+ ...item.style,
662
+ ...item.getStyle?.(tmpForm.value, item.prop)
663
+ }, { "min-height": "88px" }]),
664
+ disabled: item.disabled || item.disabledControl?.(tmpForm.value),
665
+ maxlength: item.maxlength,
666
+ "show-count": item.showCount,
667
+ placeholder: item.placeholder || "\u8BF7\u8F93\u5165",
668
+ "allow-clear": item.allowClear,
669
+ "auto-size": item.autoSize,
670
+ onChange: (e) => vue.unref(onFormItemChange)(e, item),
671
+ onBlur: (e) => vue.unref(onFormItemBlur)(e, item),
672
+ onPressEnter: (e) => vue.unref(onFormItemPressEnter)(e, item),
673
+ onKeyup: (e) => vue.unref(onFormItemKeyup)(e, item),
674
+ onFocus: (e) => vue.unref(onFormItemFocus)(e, item)
675
+ }, null, 8, ["value", "onUpdate:value", "class", "style", "disabled", "maxlength", "show-count", "placeholder", "allow-clear", "auto-size", "onChange", "onBlur", "onPressEnter", "onKeyup", "onFocus"])) : vue.createCommentVNode("v-if", true),
676
+ item.type === "checkbox" ? (vue.openBlock(), vue.createBlock(_component_a_checkbox_group, {
677
+ key: 7,
678
+ value: tmpForm.value[item.prop],
679
+ "onUpdate:value": ($event) => tmpForm.value[item.prop] = $event,
680
+ class: vue.normalizeClass([
681
+ item.class || "",
682
+ item.getClass ? item.getClass(tmpForm.value, item.prop) : ""
683
+ ]),
684
+ style: vue.normalizeStyle({
685
+ ...item.style,
686
+ ...item.getStyle?.(tmpForm.value, item.prop)
687
+ }),
688
+ disabled: item.disabled || item.disabledControl?.(tmpForm.value),
689
+ onChange: (e) => vue.unref(onFormItemChange)(e, item),
690
+ onFocus: (e) => vue.unref(onFormItemFocus)(e, item)
691
+ }, {
692
+ default: vue.withCtx(() => [
693
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(item.options, (option) => {
694
+ return vue.openBlock(), vue.createBlock(_component_a_checkbox, {
695
+ key: vue.unref(getValueOfOption)(
696
+ item.optionValueName,
697
+ "value",
698
+ option
699
+ ),
700
+ value: vue.unref(getValueOfOption)(
701
+ item.optionValueName,
702
+ "value",
703
+ option
704
+ ),
705
+ label: vue.unref(getValueOfOption)(
706
+ item.optionLabelName,
707
+ "label",
708
+ option
709
+ ),
710
+ disabled: option?.disabled,
711
+ class: vue.normalizeClass([
712
+ option.class || "",
713
+ option.getClass ? option.getClass(tmpForm.value, item.prop, option) : ""
714
+ ])
715
+ }, {
716
+ default: vue.withCtx(() => [
717
+ vue.createTextVNode(vue.toDisplayString(vue.unref(getValueOfOption)(
718
+ item.optionLabelName,
719
+ "label",
720
+ option
721
+ )), 1)
722
+ ]),
723
+ _: 2
724
+ }, 1032, ["value", "label", "disabled", "class"]);
725
+ }), 128))
726
+ ]),
727
+ _: 2
728
+ }, 1032, ["value", "onUpdate:value", "class", "style", "disabled", "onChange", "onFocus"])) : vue.createCommentVNode("v-if", true),
729
+ item.type === "radio" ? (vue.openBlock(), vue.createBlock(_component_a_radio_group, {
730
+ key: 8,
731
+ value: tmpForm.value[item.prop],
732
+ "onUpdate:value": ($event) => tmpForm.value[item.prop] = $event,
733
+ class: vue.normalizeClass([
734
+ item.class || "",
735
+ item.getClass ? item.getClass(tmpForm.value, item.prop) : ""
736
+ ]),
737
+ style: vue.normalizeStyle({
738
+ ...item.style,
739
+ ...item.getStyle?.(tmpForm.value, item.prop)
740
+ }),
741
+ disabled: item.disabled || item.disabledControl?.(tmpForm.value),
742
+ onChange: (e) => vue.unref(onFormItemChange)(e, item),
743
+ onFocus: (e) => vue.unref(onFormItemFocus)(e, item)
744
+ }, {
745
+ default: vue.withCtx(() => [
746
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(item.options, (option) => {
747
+ return vue.openBlock(), vue.createBlock(_component_a_radio, {
748
+ key: vue.unref(getValueOfOption)(
749
+ item.optionValueName,
750
+ "value",
751
+ option
752
+ ),
753
+ value: vue.unref(getValueOfOption)(
754
+ item.optionValueName,
755
+ "value",
756
+ option
757
+ ),
758
+ label: vue.unref(getValueOfOption)(
759
+ item.optionLabelName,
760
+ "label",
761
+ option
762
+ ),
763
+ disabled: option?.disabled,
764
+ class: vue.normalizeClass([
765
+ option.class || "",
766
+ option.getClass ? option.getClass(tmpForm.value, item.prop, option) : ""
767
+ ])
768
+ }, {
769
+ default: vue.withCtx(() => [
770
+ vue.createTextVNode(vue.toDisplayString(vue.unref(getValueOfOption)(
771
+ item.optionLabelName,
772
+ "label",
773
+ option
774
+ )), 1)
775
+ ]),
776
+ _: 2
777
+ }, 1032, ["value", "label", "disabled", "class"]);
778
+ }), 128))
779
+ ]),
780
+ _: 2
781
+ }, 1032, ["value", "onUpdate:value", "class", "style", "disabled", "onChange", "onFocus"])) : vue.createCommentVNode("v-if", true),
782
+ item.type === "cascader" ? (vue.openBlock(), vue.createBlock(_component_a_cascader, {
783
+ key: 9,
784
+ value: tmpForm.value[item.prop],
785
+ "onUpdate:value": ($event) => tmpForm.value[item.prop] = $event,
786
+ class: vue.normalizeClass([
787
+ item.class || "",
788
+ item.getClass ? item.getClass(tmpForm.value, item.prop) : ""
789
+ ]),
790
+ style: vue.normalizeStyle({
791
+ ...item.style,
792
+ ...item.getStyle?.(tmpForm.value, item.prop)
793
+ }),
794
+ "field-names": {
795
+ label: item.optionLabelName || "label",
796
+ value: item.optionValueName || "value",
797
+ children: item.optionChildrenName || "children"
798
+ },
799
+ "show-search": item.showSearch,
800
+ disabled: item.disabled || item.disabledControl?.(tmpForm.value),
801
+ placeholder: item.placeholder || "\u8BF7\u9009\u62E9",
802
+ options: item.options,
803
+ "change-on-select": item.changeOnSelect,
804
+ "expand-trigger": item.expandTrigger || "click",
805
+ "get-popup-container": props.config?.global?.getPopupContainer || item.getPopupContainer || void 0,
806
+ onChange: (e, selectedOptions) => vue.unref(onFormItemChange)(e, item, selectedOptions),
807
+ onFocus: (e) => vue.unref(onFormItemFocus)(e, item)
808
+ }, null, 8, ["value", "onUpdate:value", "class", "style", "field-names", "show-search", "disabled", "placeholder", "options", "change-on-select", "expand-trigger", "get-popup-container", "onChange", "onFocus"])) : vue.createCommentVNode("v-if", true),
809
+ item.type === "datePicker" ? (vue.openBlock(), vue.createBlock(_component_a_date_picker, {
810
+ key: 10,
811
+ value: tmpForm.value[item.prop],
812
+ "onUpdate:value": ($event) => tmpForm.value[item.prop] = $event,
813
+ class: vue.normalizeClass([
814
+ item.class || "",
815
+ item.getClass ? item.getClass(tmpForm.value, item.prop) : ""
816
+ ]),
817
+ style: vue.normalizeStyle([{
818
+ ...item.style,
819
+ ...item.getStyle?.(tmpForm.value, item.prop)
820
+ }, { "width": "100%" }]),
821
+ disabled: item.disabled || item.disabledControl?.(tmpForm.value),
822
+ "show-time": item.showTime,
823
+ "value-format": item.valueFormat,
824
+ "disabled-date": item.disabledDate,
825
+ "disabled-time": item.disabledTime,
826
+ "allow-clear": item.allowClear,
827
+ type: "date",
828
+ placeholder: item.placeholder || "\u8BF7\u9009\u62E9",
829
+ "get-popup-container": props.config?.global?.getPopupContainer || item.getPopupContainer || void 0,
830
+ onChange: (e) => vue.unref(onFormItemChange)(e, item),
831
+ onFocus: (e) => vue.unref(onFormItemFocus)(e, item)
832
+ }, vue.createSlots({ _: 2 }, [
833
+ item.showTime ? {
834
+ name: "suffixIcon",
835
+ fn: vue.withCtx(() => [
836
+ vue.createVNode(vue.unref(iconsVue.ClockCircleOutlined))
837
+ ]),
838
+ key: "0"
839
+ } : void 0
840
+ ]), 1032, ["value", "onUpdate:value", "class", "style", "disabled", "show-time", "value-format", "disabled-date", "disabled-time", "allow-clear", "placeholder", "get-popup-container", "onChange", "onFocus"])) : vue.createCommentVNode("v-if", true),
841
+ item.type === "timePicker" ? (vue.openBlock(), vue.createBlock(_component_a_time_picker, {
842
+ key: 11,
843
+ value: tmpForm.value[item.prop],
844
+ "onUpdate:value": ($event) => tmpForm.value[item.prop] = $event,
845
+ class: vue.normalizeClass([
846
+ item.class || "",
847
+ item.getClass ? item.getClass(tmpForm.value, item.prop) : ""
848
+ ]),
849
+ style: vue.normalizeStyle([{
850
+ ...item.style,
851
+ ...item.getStyle?.(tmpForm.value, item.prop)
852
+ }, { "width": "100%" }]),
853
+ disabled: item.disabled || item.disabledControl?.(tmpForm.value),
854
+ format: item.format,
855
+ "value-format": item.valueFormat,
856
+ "hour-step": item.hourStep,
857
+ "minute-step": item.minuteStep,
858
+ "second-step": item.secondStep,
859
+ "allow-clear": item.allowClear,
860
+ "use12-hours": item.use12Hours,
861
+ placeholder: item.placeholder || "\u8BF7\u9009\u62E9",
862
+ "get-popup-container": props.config?.global?.getPopupContainer || item.getPopupContainer || void 0,
863
+ onChange: (e) => vue.unref(onFormItemChange)(e, item),
864
+ onFocus: (e) => vue.unref(onFormItemFocus)(e, item)
865
+ }, vue.createSlots({ _: 2 }, [
866
+ item.showTime ? {
867
+ name: "suffixIcon",
868
+ fn: vue.withCtx(() => [
869
+ vue.createVNode(vue.unref(iconsVue.ClockCircleOutlined))
870
+ ]),
871
+ key: "0"
872
+ } : void 0
873
+ ]), 1032, ["value", "onUpdate:value", "class", "style", "disabled", "format", "value-format", "hour-step", "minute-step", "second-step", "allow-clear", "use12-hours", "placeholder", "get-popup-container", "onChange", "onFocus"])) : vue.createCommentVNode("v-if", true),
874
+ item.type === "rangePicker" ? (vue.openBlock(), vue.createBlock(_component_a_range_picker, {
875
+ key: 12,
876
+ value: tmpForm.value[item.prop],
877
+ "onUpdate:value": ($event) => tmpForm.value[item.prop] = $event,
878
+ class: vue.normalizeClass([
879
+ item.class || "",
880
+ item.getClass ? item.getClass(tmpForm.value, item.prop) : ""
881
+ ]),
882
+ style: vue.normalizeStyle([{
883
+ ...item.style,
884
+ ...item.getStyle?.(tmpForm.value, item.prop)
885
+ }, { "width": "100%" }]),
886
+ disabled: item.disabled || item.disabledControl?.(tmpForm.value),
887
+ "show-time": item.showTime,
888
+ "value-format": item.valueFormat,
889
+ "disabled-date": item.disabledDate,
890
+ "disabled-time": item.disabledTime,
891
+ "allow-clear": item.allowClear,
892
+ type: "date",
893
+ placeholder: item.placeholder || "\u8BF7\u9009\u62E9",
894
+ "get-popup-container": props.config?.global?.getPopupContainer || item.getPopupContainer || void 0,
895
+ onChange: (e) => vue.unref(onFormItemChange)(e, item),
896
+ onFocus: (e) => vue.unref(onFormItemFocus)(e, item)
897
+ }, {
898
+ suffixIcon: vue.withCtx(() => [
899
+ vue.createVNode(vue.unref(iconsVue.CalendarOutlined))
900
+ ]),
901
+ _: 2
902
+ }, 1032, ["value", "onUpdate:value", "class", "style", "disabled", "show-time", "value-format", "disabled-date", "disabled-time", "allow-clear", "placeholder", "get-popup-container", "onChange", "onFocus"])) : vue.createCommentVNode("v-if", true),
903
+ item.type === "group" ? (vue.openBlock(), vue.createBlock(Group, {
904
+ key: 13,
905
+ fields: item.group?.map((i) => i.prop)
906
+ }, {
907
+ default: vue.withCtx(({ onFieldChange, onFieldBlur }) => [
908
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(item.group || [], (groupItem) => {
909
+ return vue.openBlock(), vue.createElementBlock(vue.Fragment, {
910
+ key: groupItem.prop
911
+ }, [
912
+ groupItem.type === "slot" ? vue.renderSlot(_ctx.$slots, groupItem.prop, {
913
+ key: 0,
914
+ update: updateSlot,
915
+ tmpForm: tmpForm.value,
916
+ validate: (nameList = [item.prop, groupItem.prop]) => vue.unref(validate)(nameList)
917
+ }) : vue.createCommentVNode("v-if", true),
918
+ groupItem.type === "select" ? (vue.openBlock(), vue.createBlock(_component_a_select, {
919
+ key: 1,
920
+ value: tmpForm.value[groupItem.prop],
921
+ "onUpdate:value": ($event) => tmpForm.value[groupItem.prop] = $event,
922
+ class: vue.normalizeClass([
923
+ groupItem.class || "",
924
+ groupItem.getClass ? groupItem.getClass(tmpForm.value, groupItem.prop) : ""
925
+ ]),
926
+ style: vue.normalizeStyle({
927
+ ...groupItem.style,
928
+ ...groupItem.getStyle?.(
929
+ tmpForm.value,
930
+ groupItem.prop
931
+ )
932
+ }),
933
+ mode: groupItem.mode,
934
+ "max-tag-count": groupItem.maxTagCount,
935
+ "max-tag-placeholder": (omittedValues) => "+ " + omittedValues.length,
936
+ "show-search": groupItem.showSearch,
937
+ disabled: groupItem.disabled || groupItem.disabledControl?.(tmpForm.value),
938
+ "allow-clear": groupItem.allowClear,
939
+ "show-arrow": "",
940
+ "option-filter-prop": groupItem.optionFilterProp || "label",
941
+ placeholder: groupItem.placeholder || "\u8BF7\u9009\u62E9",
942
+ "get-popup-container": props.config?.global?.getPopupContainer || item.getPopupContainer || void 0,
943
+ onChange: (e) => {
944
+ onFieldChange();
945
+ vue.unref(onFormItemChange)(e, item);
946
+ },
947
+ onFocus: (e) => vue.unref(onFormItemFocus)(e, item)
948
+ }, {
949
+ default: vue.withCtx(() => [
950
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(groupItem.options, (option) => {
951
+ return vue.openBlock(), vue.createBlock(_component_a_select_option, {
952
+ key: vue.unref(getValueOfOption)(
953
+ groupItem.optionValueName,
954
+ "value",
955
+ option
956
+ ),
957
+ value: vue.unref(getValueOfOption)(
958
+ groupItem.optionValueName,
959
+ "value",
960
+ option
961
+ ),
962
+ label: vue.unref(getValueOfOption)(
963
+ groupItem.optionLabelName,
964
+ "label",
965
+ option
966
+ ),
967
+ disabled: option?.disabled,
968
+ class: vue.normalizeClass([
969
+ option.class || "",
970
+ option.getClass ? option.getClass(
971
+ tmpForm.value,
972
+ groupItem.prop,
973
+ option
974
+ ) : ""
975
+ ])
976
+ }, {
977
+ default: vue.withCtx(() => [
978
+ vue.createVNode(vue.unref(BmOverTooltips__default["default"]), {
979
+ title: vue.unref(getValueOfOption)(
980
+ groupItem.optionLabelName,
981
+ "label",
982
+ option
983
+ )
984
+ }, null, 8, ["title"])
985
+ ]),
986
+ _: 2
987
+ }, 1032, ["value", "label", "disabled", "class"]);
988
+ }), 128))
989
+ ]),
990
+ _: 2
991
+ }, 1032, ["value", "onUpdate:value", "class", "style", "mode", "max-tag-count", "max-tag-placeholder", "show-search", "disabled", "allow-clear", "option-filter-prop", "placeholder", "get-popup-container", "onChange", "onFocus"])) : vue.createCommentVNode("v-if", true),
992
+ groupItem.type === "input" ? (vue.openBlock(), vue.createBlock(_component_a_input, {
993
+ key: 2,
994
+ value: tmpForm.value[groupItem.prop],
995
+ "onUpdate:value": ($event) => tmpForm.value[groupItem.prop] = $event,
996
+ class: vue.normalizeClass([
997
+ groupItem.class || "",
998
+ groupItem.getClass ? groupItem.getClass(tmpForm.value, groupItem.prop) : ""
999
+ ]),
1000
+ style: vue.normalizeStyle({
1001
+ ...groupItem.style,
1002
+ ...groupItem.getStyle?.(tmpForm.value, groupItem.prop)
1003
+ }),
1004
+ maxlength: groupItem.maxlength,
1005
+ disabled: groupItem.disabled || groupItem.disabledControl?.(tmpForm.value),
1006
+ "allow-clear": groupItem.allowClear,
1007
+ type: groupItem.inputType,
1008
+ placeholder: groupItem.placeholder || "\u8BF7\u8F93\u5165",
1009
+ prefix: groupItem.prefix || "",
1010
+ suffix: groupItem.suffix || "",
1011
+ "addon-before": groupItem.addonBefore || "",
1012
+ "addon-after": groupItem.addonAfter || "",
1013
+ onChange: (e) => {
1014
+ onFieldChange();
1015
+ vue.unref(onFormItemChange)(e, item);
1016
+ },
1017
+ onBlur: (e) => {
1018
+ onFieldBlur();
1019
+ vue.unref(onFormItemBlur)(e, item);
1020
+ },
1021
+ onPressEnter: (e) => vue.unref(onFormItemPressEnter)(e, item),
1022
+ onKeyup: (e) => vue.unref(onFormItemKeyup)(e, item),
1023
+ onFocus: (e) => vue.unref(onFormItemFocus)(e, item)
1024
+ }, null, 8, ["value", "onUpdate:value", "class", "style", "maxlength", "disabled", "allow-clear", "type", "placeholder", "prefix", "suffix", "addon-before", "addon-after", "onChange", "onBlur", "onPressEnter", "onKeyup", "onFocus"])) : vue.createCommentVNode("v-if", true),
1025
+ groupItem.type === "inputNumber" ? (vue.openBlock(), vue.createBlock(_component_a_input_number, {
1026
+ key: 3,
1027
+ value: tmpForm.value[groupItem.prop],
1028
+ "onUpdate:value": ($event) => tmpForm.value[groupItem.prop] = $event,
1029
+ class: vue.normalizeClass([
1030
+ groupItem.class || "",
1031
+ groupItem.getClass ? groupItem.getClass(tmpForm.value, groupItem.prop) : ""
1032
+ ]),
1033
+ style: vue.normalizeStyle({
1034
+ ...groupItem.style,
1035
+ ...groupItem.getStyle?.(tmpForm.value, groupItem.prop)
1036
+ }),
1037
+ disabled: groupItem.disabled || groupItem.disabledControl?.(tmpForm.value),
1038
+ precision: groupItem.precision,
1039
+ parser: groupItem.parser,
1040
+ placeholder: groupItem.placeholder || "\u8BF7\u8F93\u5165",
1041
+ prefix: groupItem.prefix || "",
1042
+ suffix: groupItem.suffix || "",
1043
+ "addon-before": groupItem.addonBefore || "",
1044
+ "addon-after": groupItem.addonAfter || "",
1045
+ "allow-clear": groupItem.allowClear,
1046
+ formatter: groupItem.formatter,
1047
+ min: groupItem.min || 0,
1048
+ max: groupItem.max || 99999,
1049
+ onChange: (e) => {
1050
+ onFieldChange();
1051
+ vue.unref(onFormItemChange)(e, item);
1052
+ },
1053
+ onBlur: (e) => {
1054
+ onFieldBlur();
1055
+ vue.unref(onFormItemBlur)(e, item);
1056
+ },
1057
+ onPressEnter: (e) => vue.unref(onFormItemPressEnter)(e, item),
1058
+ onKeyup: (e) => vue.unref(onFormItemKeyup)(e, item),
1059
+ onFocus: (e) => vue.unref(onFormItemFocus)(e, item)
1060
+ }, null, 8, ["value", "onUpdate:value", "class", "style", "disabled", "precision", "parser", "placeholder", "prefix", "suffix", "addon-before", "addon-after", "allow-clear", "formatter", "min", "max", "onChange", "onBlur", "onPressEnter", "onKeyup", "onFocus"])) : vue.createCommentVNode("v-if", true)
1061
+ ], 64);
1062
+ }), 128))
1063
+ ]),
1064
+ _: 2
1065
+ }, 1032, ["fields"])) : vue.createCommentVNode("v-if", true),
1066
+ item.type === "text" ? (vue.openBlock(), vue.createElementBlock("div", {
1067
+ key: 14,
1068
+ class: vue.normalizeClass([
1069
+ "row-text",
1070
+ item.class || "",
1071
+ item.getClass ? item.getClass(tmpForm.value, item.prop) : ""
1072
+ ]),
1073
+ style: vue.normalizeStyle({
1074
+ ...item.style,
1075
+ ...item.getStyle?.(tmpForm.value, item.prop)
1076
+ })
1077
+ }, [
1078
+ vue.createVNode(vue.unref(BmOverTooltips__default["default"]), {
1079
+ title: vue.unref(getShowValue)(item) || tmpForm.value[item.prop]
1080
+ }, null, 8, ["title"]),
1081
+ vue.createCommentVNode(' <AutoTooltip\n :tooltip="getShowValue(item) || tmpForm[item.prop]"\n /> ')
1082
+ ], 6)) : vue.createCommentVNode("v-if", true),
1083
+ item.type === "multiText" ? (vue.openBlock(), vue.createElementBlock("div", {
1084
+ key: 15,
1085
+ class: vue.normalizeClass([
1086
+ "row-multiText",
1087
+ item.class || "",
1088
+ item.getClass ? item.getClass(tmpForm.value, item.prop) : ""
1089
+ ]),
1090
+ style: vue.normalizeStyle({
1091
+ ...item.style,
1092
+ ...item.getStyle?.(tmpForm.value, item.prop)
1093
+ })
1094
+ }, vue.toDisplayString(vue.unref(getShowValue)(item) || tmpForm.value[item.prop]), 7)) : vue.createCommentVNode("v-if", true),
1095
+ item.type === "placeholder" ? (vue.openBlock(), vue.createElementBlock("div", {
1096
+ key: 16,
1097
+ class: vue.normalizeClass([
1098
+ "row-placeholder",
1099
+ item.class || "",
1100
+ item.getClass ? item.getClass(tmpForm.value, item.prop) : ""
1101
+ ]),
1102
+ style: vue.normalizeStyle({
1103
+ ...item.style,
1104
+ ...item.getStyle?.(tmpForm.value, item.prop)
1105
+ })
1106
+ }, vue.toDisplayString(vue.unref(getShowValue)(item) || tmpForm.value[item.prop]), 7)) : vue.createCommentVNode("v-if", true),
1107
+ item.type === "selectText" ? (vue.openBlock(), vue.createBlock(_component_a_select, {
1108
+ key: 17,
1109
+ value: tmpForm.value[item.prop],
1110
+ "onUpdate:value": ($event) => tmpForm.value[item.prop] = $event,
1111
+ class: vue.normalizeClass([
1112
+ "select-text",
1113
+ item.class || "",
1114
+ item.getClass ? item.getClass(tmpForm.value, item.prop) : ""
1115
+ ]),
1116
+ style: vue.normalizeStyle({
1117
+ ...item.style,
1118
+ ...item.getStyle?.(tmpForm.value, item.prop)
1119
+ }),
1120
+ disabled: "",
1121
+ bordered: false,
1122
+ "show-arrow": false,
1123
+ "option-filter-prop": item.optionFilterProp || "label",
1124
+ placeholder: item.placeholder || "\u8BF7\u9009\u62E9"
1125
+ }, {
1126
+ default: vue.withCtx(() => [
1127
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(item.options, (option) => {
1128
+ return vue.openBlock(), vue.createBlock(_component_a_select_option, {
1129
+ key: vue.unref(getValueOfOption)(
1130
+ item.optionValueName,
1131
+ "value",
1132
+ option
1133
+ ),
1134
+ value: vue.unref(getValueOfOption)(
1135
+ item.optionValueName,
1136
+ "value",
1137
+ option
1138
+ ),
1139
+ label: vue.unref(getValueOfOption)(
1140
+ item.optionLabelName,
1141
+ "label",
1142
+ option
1143
+ ),
1144
+ disabled: option?.disabled,
1145
+ class: vue.normalizeClass([
1146
+ option.class || "",
1147
+ option.getClass ? option.getClass(tmpForm.value, item.prop, option) : ""
1148
+ ])
1149
+ }, {
1150
+ default: vue.withCtx(() => [
1151
+ vue.createVNode(vue.unref(BmOverTooltips__default["default"]), {
1152
+ title: vue.unref(getValueOfOption)(
1153
+ item.optionLabelName,
1154
+ "label",
1155
+ option
1156
+ )
1157
+ }, null, 8, ["title"])
1158
+ ]),
1159
+ _: 2
1160
+ }, 1032, ["value", "label", "disabled", "class"]);
1161
+ }), 128))
1162
+ ]),
1163
+ _: 2
1164
+ }, 1032, ["value", "onUpdate:value", "class", "style", "option-filter-prop", "placeholder"])) : vue.createCommentVNode("v-if", true),
1165
+ item.slotAfter ? vue.renderSlot(_ctx.$slots, item.slotAfter, {
1166
+ key: 18,
1167
+ update: updateSlot,
1168
+ tmpForm: tmpForm.value,
1169
+ validate: (nameList = [item.prop]) => vue.unref(validate)(nameList)
1170
+ }) : vue.createCommentVNode("v-if", true)
1171
+ ]),
1172
+ _: 2
1173
+ }, 1032, ["id", "class", "name", "required", "colon", "label-col", "wrapper-col", "style"]))
1174
+ ], 64)) : vue.createCommentVNode("v-if", true)
1175
+ ], 64);
1176
+ }), 128))
1177
+ ]);
1178
+ }), 128))
1179
+ ])
1180
+ ]))
1181
+ ], 2)) : vue.createCommentVNode("v-if", true)
1182
+ ], 64);
1183
+ }), 128))
1184
+ ]),
1185
+ _: 3
1186
+ }, 8, ["model", "rules", "layout", "autocomplete"]);
1187
+ };
1188
+ }
1189
+ });
1190
+ var EditForm = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "edit-form.vue"]]);
1191
+
1192
+ const BmEditForm = withInstall.withInstall(EditForm);
1193
+
1194
+ exports.BmEditForm = BmEditForm;
1195
+ exports["default"] = BmEditForm;