m-eleplus-crud 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/dist/index.full.js +27 -16
  2. package/dist/index.full.min.js +15 -15
  3. package/dist/index.full.min.js.map +1 -1
  4. package/dist/index.full.min.mjs +16 -16
  5. package/dist/index.full.min.mjs.map +1 -1
  6. package/dist/index.full.mjs +28 -17
  7. package/es/components/form/src/form.d.ts +5 -1
  8. package/es/index.mjs +3 -3
  9. package/es/packages/components/form/index.mjs +2 -2
  10. package/es/packages/components/form/src/form.mjs +25 -622
  11. package/es/packages/components/form/src/form.mjs.map +1 -1
  12. package/es/packages/components/form/src/form2.mjs +633 -25
  13. package/es/packages/components/form/src/form2.mjs.map +1 -1
  14. package/es/packages/components/index.mjs +3 -3
  15. package/es/packages/components/picture/index.mjs +2 -2
  16. package/es/packages/components/picture/src/picture.mjs +19 -26
  17. package/es/packages/components/picture/src/picture.mjs.map +1 -1
  18. package/es/packages/components/picture/src/picture2.mjs +26 -19
  19. package/es/packages/components/picture/src/picture2.mjs.map +1 -1
  20. package/es/packages/components/search/index.mjs +2 -2
  21. package/es/packages/components/search/src/search.mjs +423 -25
  22. package/es/packages/components/search/src/search.mjs.map +1 -1
  23. package/es/packages/components/search/src/search2.mjs +25 -423
  24. package/es/packages/components/search/src/search2.mjs.map +1 -1
  25. package/lib/components/form/src/form.d.ts +5 -1
  26. package/lib/index.js +3 -3
  27. package/lib/packages/components/form/index.js +2 -2
  28. package/lib/packages/components/form/src/form.js +26 -622
  29. package/lib/packages/components/form/src/form.js.map +1 -1
  30. package/lib/packages/components/form/src/form2.js +633 -26
  31. package/lib/packages/components/form/src/form2.js.map +1 -1
  32. package/lib/packages/components/index.js +3 -3
  33. package/lib/packages/components/picture/index.js +2 -2
  34. package/lib/packages/components/picture/src/picture.js +20 -26
  35. package/lib/packages/components/picture/src/picture.js.map +1 -1
  36. package/lib/packages/components/picture/src/picture2.js +26 -20
  37. package/lib/packages/components/picture/src/picture2.js.map +1 -1
  38. package/lib/packages/components/search/index.js +2 -2
  39. package/lib/packages/components/search/src/search.js +423 -26
  40. package/lib/packages/components/search/src/search.js.map +1 -1
  41. package/lib/packages/components/search/src/search2.js +26 -423
  42. package/lib/packages/components/search/src/search2.js.map +1 -1
  43. package/package.json +1 -1
  44. package/web-types.json +1 -1
@@ -2,34 +2,641 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var runtime = require('../../../utils/vue/props/runtime.js');
6
- var index = require('../../../hooks/use-size/index.js');
5
+ var vue = require('vue');
6
+ var lodashUnified = require('lodash-unified');
7
+ var form = require('./form.js');
8
+ var pluginVue_exportHelper = require('../../../../_virtual/plugin-vue_export-helper.js');
9
+ var useGlobalConfig = require('../../config-provider/src/hooks/use-global-config.js');
10
+ var error = require('../../../utils/error.js');
7
11
 
8
- const formProps = runtime.buildProps({
9
- size: index.useSizeProp,
10
- model: {
11
- type: Object,
12
- required: true
13
- },
14
- loading: {
15
- type: Boolean,
16
- default: false
17
- },
18
- permission: {
19
- type: Object,
20
- default: {}
21
- },
22
- readonly: {
23
- type: Boolean,
24
- default: false
25
- },
26
- option: {
27
- type: runtime.definePropType(Object),
28
- required: false
12
+ const COMPONENT_NAME = "MForm";
13
+ const __default__ = vue.defineComponent({
14
+ name: COMPONENT_NAME
15
+ });
16
+ const _sfc_main = vue.defineComponent({
17
+ ...__default__,
18
+ props: form.formProps,
19
+ emits: form.formEmits,
20
+ setup(__props, { expose: __expose }) {
21
+ const props = __props;
22
+ const slots = vue.useSlots();
23
+ const globalConfig = useGlobalConfig.useGlobalConfig();
24
+ const formRef = vue.ref();
25
+ const INPUT_TYPES = [
26
+ "input",
27
+ "textarea",
28
+ "number",
29
+ "password",
30
+ "qrcode",
31
+ "barcode"
32
+ ];
33
+ const DATE_TYPES = [
34
+ "year",
35
+ "month",
36
+ "date",
37
+ "datetime",
38
+ "week",
39
+ "datetimerange",
40
+ "daterange",
41
+ "monthrange",
42
+ "yearrange",
43
+ "time",
44
+ "timerange"
45
+ ];
46
+ const NEED_DIC_TYPE = ["select", "checkbox", "radio", "switch"];
47
+ const formOption = vue.ref({
48
+ labelWidth: "80px",
49
+ column: []
50
+ });
51
+ const detailTableRows = vue.computed(() => {
52
+ const rows = [];
53
+ let currentRow = [];
54
+ let currentTotal = 0;
55
+ for (const item of formOption.value.column || []) {
56
+ const req = item.span || 12;
57
+ if (currentTotal + req > 24) {
58
+ rows.push(currentRow);
59
+ currentRow = [];
60
+ currentTotal = 0;
61
+ }
62
+ currentRow.push(item);
63
+ currentTotal += req;
64
+ }
65
+ if (currentRow.length)
66
+ rows.push(currentRow);
67
+ return rows;
68
+ });
69
+ const proxys = new Proxy(props.model, {
70
+ get(target, property) {
71
+ return lodashUnified.get(target, property);
72
+ },
73
+ set(target, property, value) {
74
+ lodashUnified.set(target, property, value);
75
+ return true;
76
+ }
77
+ });
78
+ const initValue = () => {
79
+ var _a;
80
+ if (formOption.value && formOption.value.column) {
81
+ for (let i = 0; i < ((_a = formOption.value.column) == null ? void 0 : _a.length); i++) {
82
+ const column = formOption.value.column[i];
83
+ if (column.prop && proxys[column.prop] === void 0) {
84
+ if (column.value) {
85
+ proxys[column.prop] = column.value;
86
+ } else {
87
+ const ARR_TYPES = [
88
+ "checkbox",
89
+ "datetimerange",
90
+ "daterange",
91
+ "monthrange",
92
+ "yearrange",
93
+ "timerange"
94
+ ];
95
+ if (column.type === "select" && column.multiple || ARR_TYPES.includes(column.type || "")) {
96
+ proxys[column.prop] = [];
97
+ } else {
98
+ proxys[column.prop] = "";
99
+ }
100
+ }
101
+ }
102
+ }
103
+ }
104
+ };
105
+ const getValueFormatByType = (type) => {
106
+ let format = "";
107
+ switch (type) {
108
+ case "yearrange":
109
+ case "year":
110
+ format = "YYYY";
111
+ break;
112
+ case "monthrange":
113
+ case "month":
114
+ format = "YYYY-MM";
115
+ break;
116
+ case "daterange":
117
+ case "week":
118
+ case "date":
119
+ format = "YYYY-MM-DD";
120
+ break;
121
+ case "datetimerange":
122
+ case "datetime":
123
+ format = "YYYY-MM-DD HH:mm:ss";
124
+ break;
125
+ case "time":
126
+ format = "HH:mm:ss";
127
+ break;
128
+ }
129
+ return format;
130
+ };
131
+ const getAllRemoteDics = () => {
132
+ var _a, _b, _c, _d;
133
+ const hasDicUrl = (_b = (_a = formOption.value) == null ? void 0 : _a.column) == null ? void 0 : _b.some((column) => column.dicUrl);
134
+ if (hasDicUrl && !((_c = globalConfig.value) == null ? void 0 : _c.httpGet)) {
135
+ error.debugWarn("MForm", "global config httpGet is null");
136
+ return;
137
+ }
138
+ const updateRemoteDic = (column) => {
139
+ return new Promise((resolve) => {
140
+ let isSuccess = false;
141
+ globalConfig.value.httpGet(column.dicUrl, column.dicQuery, column.dicHeaders).then((e) => {
142
+ const { list, label, value } = column.dicFormatter(e);
143
+ if (list && Array.isArray(list)) {
144
+ column["dicData"] = list.map((item) => {
145
+ const lastLabel = label.replace(/\{(\w+)\}/g, (match, key) => {
146
+ return item[key] || match;
147
+ });
148
+ return {
149
+ label: lastLabel,
150
+ value: item[value]
151
+ };
152
+ });
153
+ isSuccess = true;
154
+ }
155
+ }).finally(() => {
156
+ if (!isSuccess) {
157
+ column["dicData"] = [];
158
+ }
159
+ resolve(null);
160
+ });
161
+ });
162
+ };
163
+ for (let i = 0; i < (((_d = formOption.value) == null ? void 0 : _d.column) || []).length; i++) {
164
+ const column = formOption.value.column[i];
165
+ if (column.dicUrl) {
166
+ if (!column.dicFormatter) {
167
+ error.debugWarn("MForm", "dicUrl and dicFormatter must be used together");
168
+ continue;
169
+ }
170
+ updateRemoteDic(column);
171
+ }
172
+ }
173
+ };
174
+ const getFormItemEventBind = (column) => {
175
+ const result = {};
176
+ for (const key in column) {
177
+ if (key.startsWith("event")) {
178
+ let funName = key.replace("event", "");
179
+ funName = funName.charAt(0).toLowerCase() + funName.slice(1);
180
+ result[funName] = column[key];
181
+ }
182
+ }
183
+ return result;
184
+ };
185
+ const formatDicValue = (row, column) => {
186
+ let dictLabel = "";
187
+ const findLabelByValue = (dicData, value) => {
188
+ const dictItem = (dicData || []).find((dict) => dict.value === value);
189
+ if (dictItem === void 0) {
190
+ return dictLabel;
191
+ }
192
+ return dictItem.label;
193
+ };
194
+ if (column.type === "select" && column.multiple || column.type === "checkbox") {
195
+ let values = [];
196
+ if (row[column.prop || ""] != null && row[column.prop || ""] != void 0 && row[column.prop || ""] !== "") {
197
+ if (Array.isArray(row[column.prop || ""])) {
198
+ values = row[column.prop || ""];
199
+ } else if (typeof row[column.prop || ""] === "string") {
200
+ values = row[column.prop || ""].split(",");
201
+ } else {
202
+ values = [row[column.prop || ""]];
203
+ }
204
+ }
205
+ const result = [];
206
+ for (const value of values) {
207
+ dictLabel = findLabelByValue(column.dicData || [], value);
208
+ if (dictLabel === void 0) {
209
+ break;
210
+ }
211
+ result.push(dictLabel);
212
+ }
213
+ return result.join(",");
214
+ }
215
+ dictLabel = findLabelByValue(column.dicData || [], row[column.prop || ""]);
216
+ return dictLabel;
217
+ };
218
+ const getDetailPic = (row, column) => {
219
+ if (!row || !row[column.prop || ""]) {
220
+ return [];
221
+ }
222
+ const pics = row[column.prop || ""].split(column.imgSuffix || ";").map((pic) => (column.imgPrefix || "") + pic);
223
+ return pics;
224
+ };
225
+ const getValueColspan = (item, rows, index) => {
226
+ const getRemaining = (row) => {
227
+ const used = row.reduce((acc, item2) => acc + (item2.span || 12), 0);
228
+ return 24 - used;
229
+ };
230
+ if (index === rows.length - 1) {
231
+ return (item.span || 12) + getRemaining(rows) - 1;
232
+ }
233
+ return (item.span || 12) - 1;
234
+ };
235
+ const validForm = () => {
236
+ return new Promise((resolve) => {
237
+ formRef.value.validate((valid) => {
238
+ resolve(valid);
239
+ });
240
+ });
241
+ };
242
+ const clear = () => {
243
+ var _a, _b;
244
+ (_a = formRef.value) == null ? void 0 : _a.clearValidate();
245
+ (_b = formRef.value) == null ? void 0 : _b.resetFields();
246
+ };
247
+ vue.watch(
248
+ () => props.option,
249
+ (newVal) => {
250
+ if (newVal) {
251
+ formOption.value = Object.assign({}, formOption.value, newVal);
252
+ if (newVal.column) {
253
+ formOption.value.column = lodashUnified.cloneDeep(
254
+ newVal.column.filter(
255
+ (column) => !(props.permission[column.prop || ""] === false)
256
+ ).sort((a, b) => (b.order || 0) - (a.order || 0))
257
+ );
258
+ getAllRemoteDics();
259
+ if (!props.readonly) {
260
+ initValue();
261
+ }
262
+ }
263
+ }
264
+ },
265
+ {
266
+ immediate: true,
267
+ deep: true
268
+ }
269
+ );
270
+ __expose({
271
+ validForm,
272
+ clear
273
+ });
274
+ return (_ctx, _cache) => {
275
+ const _component_el_input = vue.resolveComponent("el-input");
276
+ const _component_el_option = vue.resolveComponent("el-option");
277
+ const _component_el_select = vue.resolveComponent("el-select");
278
+ const _component_el_radio = vue.resolveComponent("el-radio");
279
+ const _component_el_radio_group = vue.resolveComponent("el-radio-group");
280
+ const _component_el_checkbox = vue.resolveComponent("el-checkbox");
281
+ const _component_el_checkbox_group = vue.resolveComponent("el-checkbox-group");
282
+ const _component_el_switch = vue.resolveComponent("el-switch");
283
+ const _component_el_date_picker = vue.resolveComponent("el-date-picker");
284
+ const _component_el_time_picker = vue.resolveComponent("el-time-picker");
285
+ const _component_el_form_item = vue.resolveComponent("el-form-item");
286
+ const _component_el_col = vue.resolveComponent("el-col");
287
+ const _component_el_row = vue.resolveComponent("el-row");
288
+ const _component_el_form = vue.resolveComponent("el-form");
289
+ const _component_MPicture = vue.resolveComponent("MPicture");
290
+ const _component_MQrcode = vue.resolveComponent("MQrcode");
291
+ const _component_MBarcode = vue.resolveComponent("MBarcode");
292
+ return vue.openBlock(), vue.createElementBlock("div", { class: "m-form" }, [
293
+ vue.createCommentVNode("\u7F16\u8F91\u6A21\u5F0F"),
294
+ !_ctx.readonly ? (vue.openBlock(), vue.createBlock(_component_el_form, {
295
+ key: 0,
296
+ ref_key: "formRef",
297
+ ref: formRef,
298
+ model: vue.unref(proxys),
299
+ disabled: _ctx.loading,
300
+ size: _ctx.size || vue.unref(globalConfig).size,
301
+ "label-width": formOption.value.labelWidth,
302
+ style: { "width": "100%" },
303
+ onSubmit: vue.withModifiers(() => {
304
+ }, ["prevent"])
305
+ }, {
306
+ default: vue.withCtx(() => [
307
+ vue.createVNode(_component_el_row, { gutter: 0 }, {
308
+ default: vue.withCtx(() => [
309
+ (vue.openBlock(true), vue.createElementBlock(
310
+ vue.Fragment,
311
+ null,
312
+ vue.renderList(formOption.value.column, (column, columnIndex) => {
313
+ return vue.openBlock(), vue.createBlock(_component_el_col, {
314
+ key: columnIndex,
315
+ span: column.span || 12
316
+ }, {
317
+ default: vue.withCtx(() => [
318
+ vue.createVNode(_component_el_form_item, {
319
+ style: { "width": "100%" },
320
+ label: column.label + ":",
321
+ prop: column.prop,
322
+ rules: column.rules,
323
+ "label-width": column.labelWidth || formOption.value.labelWidth
324
+ }, {
325
+ default: vue.withCtx(() => [
326
+ vue.createCommentVNode("\u63D2\u69FD\u4FE1\u606F"),
327
+ vue.unref(slots)[column.prop || ""] ? vue.renderSlot(_ctx.$slots, column.prop, vue.mergeProps({
328
+ key: 0,
329
+ ref_for: true
330
+ }, { size: _ctx.size || vue.unref(globalConfig).size, loading: _ctx.loading })) : !column.type || INPUT_TYPES.includes(column.type) ? (vue.openBlock(), vue.createElementBlock(
331
+ vue.Fragment,
332
+ { key: 1 },
333
+ [
334
+ vue.createCommentVNode(""),
335
+ vue.createCommentVNode("\u8F93\u5165\u6846"),
336
+ vue.createVNode(_component_el_input, vue.mergeProps({
337
+ modelValue: vue.unref(proxys)[column.prop || ""],
338
+ "onUpdate:modelValue": ($event) => vue.unref(proxys)[column.prop || ""] = $event,
339
+ modelModifiers: { trim: true },
340
+ style: { "width": "100%" },
341
+ placeholder: column.placeholder,
342
+ maxlength: column.maxlength,
343
+ "show-word-limit": column.showWordLimit,
344
+ "show-password": column.showPassword,
345
+ type: !column.type || column.type === "input" ? "text" : column.type
346
+ }, vue.toHandlers(getFormItemEventBind(column))), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder", "maxlength", "show-word-limit", "show-password", "type"])
347
+ ],
348
+ 2112
349
+ )) : column.type === "select" ? (vue.openBlock(), vue.createElementBlock(
350
+ vue.Fragment,
351
+ { key: 2 },
352
+ [
353
+ vue.createCommentVNode(""),
354
+ vue.createCommentVNode("\u4E0B\u62C9\u6846"),
355
+ vue.createVNode(_component_el_select, vue.mergeProps({
356
+ modelValue: vue.unref(proxys)[column.prop || ""],
357
+ "onUpdate:modelValue": ($event) => vue.unref(proxys)[column.prop || ""] = $event,
358
+ modelModifiers: { trim: true },
359
+ style: { "width": "100%" },
360
+ placeholder: column.placeholder,
361
+ multiple: column.multiple,
362
+ clearable: column.clearable,
363
+ filterable: column.filterable,
364
+ "filter-method": column.filterMethod,
365
+ remote: column.remote,
366
+ "remote-method": column.remoteMethod,
367
+ loading: column.loading
368
+ }, vue.toHandlers(getFormItemEventBind(column))), {
369
+ default: vue.withCtx(() => [
370
+ (vue.openBlock(true), vue.createElementBlock(
371
+ vue.Fragment,
372
+ null,
373
+ vue.renderList(column.dicData || [], (dicItem, dicIndex) => {
374
+ return vue.openBlock(), vue.createBlock(_component_el_option, {
375
+ key: dicIndex,
376
+ label: dicItem.label,
377
+ value: dicItem.value
378
+ }, null, 8, ["label", "value"]);
379
+ }),
380
+ 128
381
+ ))
382
+ ]),
383
+ _: 2
384
+ }, 1040, ["modelValue", "onUpdate:modelValue", "placeholder", "multiple", "clearable", "filterable", "filter-method", "remote", "remote-method", "loading"])
385
+ ],
386
+ 2112
387
+ )) : column.type === "radio" ? (vue.openBlock(), vue.createElementBlock(
388
+ vue.Fragment,
389
+ { key: 3 },
390
+ [
391
+ vue.createCommentVNode(""),
392
+ vue.createCommentVNode("radio"),
393
+ vue.createVNode(_component_el_radio_group, vue.mergeProps({
394
+ modelValue: vue.unref(proxys)[column.prop || ""],
395
+ "onUpdate:modelValue": ($event) => vue.unref(proxys)[column.prop || ""] = $event,
396
+ style: { "width": "100%" }
397
+ }, vue.toHandlers(getFormItemEventBind(column))), {
398
+ default: vue.withCtx(() => [
399
+ (vue.openBlock(true), vue.createElementBlock(
400
+ vue.Fragment,
401
+ null,
402
+ vue.renderList(column.dicData || [], (dicItem, dicIndex) => {
403
+ return vue.openBlock(), vue.createBlock(_component_el_radio, {
404
+ key: dicIndex,
405
+ value: dicItem.value,
406
+ label: dicItem.value
407
+ }, {
408
+ default: vue.withCtx(() => [
409
+ vue.createTextVNode(
410
+ vue.toDisplayString(dicItem.label),
411
+ 1
412
+ )
413
+ ]),
414
+ _: 2
415
+ }, 1032, ["value", "label"]);
416
+ }),
417
+ 128
418
+ ))
419
+ ]),
420
+ _: 2
421
+ }, 1040, ["modelValue", "onUpdate:modelValue"])
422
+ ],
423
+ 2112
424
+ )) : column.type === "checkbox" ? (vue.openBlock(), vue.createElementBlock(
425
+ vue.Fragment,
426
+ { key: 4 },
427
+ [
428
+ vue.createCommentVNode(""),
429
+ vue.createCommentVNode("checkbox"),
430
+ vue.createVNode(_component_el_checkbox_group, vue.mergeProps({
431
+ modelValue: vue.unref(proxys)[column.prop || ""],
432
+ "onUpdate:modelValue": ($event) => vue.unref(proxys)[column.prop || ""] = $event,
433
+ style: { "width": "100%" }
434
+ }, vue.toHandlers(getFormItemEventBind(column))), {
435
+ default: vue.withCtx(() => [
436
+ (vue.openBlock(true), vue.createElementBlock(
437
+ vue.Fragment,
438
+ null,
439
+ vue.renderList(column.dicData || [], (dicItem, dicIndex) => {
440
+ return vue.openBlock(), vue.createBlock(_component_el_checkbox, {
441
+ key: dicIndex,
442
+ label: dicItem.label,
443
+ value: dicItem.value
444
+ }, null, 8, ["label", "value"]);
445
+ }),
446
+ 128
447
+ ))
448
+ ]),
449
+ _: 2
450
+ }, 1040, ["modelValue", "onUpdate:modelValue"])
451
+ ],
452
+ 2112
453
+ )) : column.type === "switch" ? (vue.openBlock(), vue.createElementBlock(
454
+ vue.Fragment,
455
+ { key: 5 },
456
+ [
457
+ vue.createCommentVNode(""),
458
+ vue.createCommentVNode("switch"),
459
+ !column.dicData || column.dicData.length != 2 ? (vue.openBlock(), vue.createElementBlock("span", {
460
+ key: 0,
461
+ style: { "color": "var(--el-text-color-placeholder)", "line-height": "32px", "height": "32px" }
462
+ }, '"dicData/dicUrl\u7684\u7ED3\u679C"\u672A\u8BBE\u7F6E\u6216\u957F\u5EA6\u4E0D\u7B49\u4E8E2')) : (vue.openBlock(), vue.createElementBlock(
463
+ vue.Fragment,
464
+ { key: 1 },
465
+ [
466
+ vue.createVNode(_component_el_switch, vue.mergeProps({
467
+ modelValue: vue.unref(proxys)[column.prop || ""],
468
+ "onUpdate:modelValue": ($event) => vue.unref(proxys)[column.prop || ""] = $event,
469
+ "active-value": column.dicData[0].value,
470
+ "inactive-value": column.dicData[1].value
471
+ }, vue.toHandlers(getFormItemEventBind(column))), null, 16, ["modelValue", "onUpdate:modelValue", "active-value", "inactive-value"]),
472
+ vue.createElementVNode(
473
+ "span",
474
+ { style: { "font-size": "var(--el-font-size-base)", "color": "var(--el-text-color-regular)", "margin-left": "6px" } },
475
+ vue.toDisplayString(vue.unref(proxys)[column.prop || ""] === column.dicData[0].value ? column.dicData[0].label : column.dicData[1].label),
476
+ 1
477
+ )
478
+ ],
479
+ 64
480
+ ))
481
+ ],
482
+ 64
483
+ )) : DATE_TYPES.includes(column.type) ? (vue.openBlock(), vue.createElementBlock(
484
+ vue.Fragment,
485
+ { key: 6 },
486
+ [
487
+ vue.createCommentVNode(""),
488
+ vue.createCommentVNode("\u65F6\u95F4"),
489
+ column.type !== "time" && column.type !== "timerange" ? (vue.openBlock(), vue.createBlock(_component_el_date_picker, vue.mergeProps({
490
+ key: 0,
491
+ modelValue: vue.unref(proxys)[column.prop || ""],
492
+ "onUpdate:modelValue": ($event) => vue.unref(proxys)[column.prop || ""] = $event,
493
+ type: column.type,
494
+ clearable: column.clearable,
495
+ "start-placeholder": column.startPlaceholder,
496
+ "end-placeholder": column.endPlaceholder,
497
+ format: column.format,
498
+ "value-format": column.valueFormat || getValueFormatByType(column.type)
499
+ }, vue.toHandlers(getFormItemEventBind(column))), null, 16, ["modelValue", "onUpdate:modelValue", "type", "clearable", "start-placeholder", "end-placeholder", "format", "value-format"])) : (vue.openBlock(), vue.createBlock(_component_el_time_picker, vue.mergeProps({
500
+ key: 1,
501
+ modelValue: vue.unref(proxys)[column.prop || ""],
502
+ "onUpdate:modelValue": ($event) => vue.unref(proxys)[column.prop || ""] = $event,
503
+ "is-range": column.type === "timerange",
504
+ clearable: column.clearable,
505
+ "start-placeholder": column.startPlaceholder,
506
+ "end-placeholder": column.endPlaceholder,
507
+ "value-format": column.valueFormat || getValueFormatByType(column.type)
508
+ }, vue.toHandlers(getFormItemEventBind(column))), null, 16, ["modelValue", "onUpdate:modelValue", "is-range", "clearable", "start-placeholder", "end-placeholder", "value-format"]))
509
+ ],
510
+ 64
511
+ )) : column.type === "picture" ? (vue.openBlock(), vue.createElementBlock(
512
+ vue.Fragment,
513
+ { key: 7 },
514
+ [
515
+ vue.createCommentVNode(""),
516
+ vue.createCommentVNode("picture"),
517
+ vue.createElementVNode("span", { style: { "color": "var(--el-text-color-regular)", "line-height": "32px", "height": "32px" } }, " \u6682\u4E0D\u652F\u6301picture\uFF0C\u8BF7\u4F7F\u7528\u63D2\u69FD\u81EA\u884C\u5B9E\u73B0 ")
518
+ ],
519
+ 2112
520
+ )) : vue.createCommentVNode("v-if", true),
521
+ vue.createCommentVNode("")
522
+ ]),
523
+ _: 2
524
+ }, 1032, ["label", "prop", "rules", "label-width"])
525
+ ]),
526
+ _: 2
527
+ }, 1032, ["span"]);
528
+ }),
529
+ 128
530
+ ))
531
+ ]),
532
+ _: 3
533
+ })
534
+ ]),
535
+ _: 3
536
+ }, 8, ["model", "disabled", "size", "label-width", "onSubmit"])) : (vue.openBlock(), vue.createElementBlock(
537
+ vue.Fragment,
538
+ { key: 1 },
539
+ [
540
+ vue.createCommentVNode(""),
541
+ vue.createCommentVNode("\u8BE6\u60C5\u6A21\u5F0F"),
542
+ vue.createElementVNode("table", { class: "detail-desc" }, [
543
+ vue.createElementVNode("tbody", null, [
544
+ (vue.openBlock(true), vue.createElementBlock(
545
+ vue.Fragment,
546
+ null,
547
+ vue.renderList(detailTableRows.value, (row, rowIndex) => {
548
+ return vue.openBlock(), vue.createElementBlock("tr", { key: rowIndex }, [
549
+ (vue.openBlock(true), vue.createElementBlock(
550
+ vue.Fragment,
551
+ null,
552
+ vue.renderList(row, (column, index) => {
553
+ return vue.openBlock(), vue.createElementBlock(
554
+ vue.Fragment,
555
+ { key: index },
556
+ [
557
+ vue.createElementVNode(
558
+ "td",
559
+ {
560
+ style: vue.normalizeStyle({ width: column.labelWidth || formOption.value.labelWidth }),
561
+ colspan: "1",
562
+ class: "label"
563
+ },
564
+ vue.toDisplayString(column.label),
565
+ 5
566
+ ),
567
+ vue.createElementVNode("td", {
568
+ colspan: getValueColspan(column, row, index)
569
+ }, [
570
+ column.type === "picture" ? (vue.openBlock(), vue.createBlock(_component_MPicture, {
571
+ key: 0,
572
+ src: getDetailPic(vue.unref(proxys), column)[0],
573
+ "preview-src-list": getDetailPic(vue.unref(proxys), column)[0],
574
+ "img-width": "100px",
575
+ "img-height": "100px"
576
+ }, null, 8, ["src", "preview-src-list"])) : NEED_DIC_TYPE.includes(column.type || "") ? (vue.openBlock(), vue.createElementBlock(
577
+ vue.Fragment,
578
+ { key: 1 },
579
+ [
580
+ vue.createTextVNode(
581
+ vue.toDisplayString(formatDicValue(vue.unref(proxys), column)),
582
+ 1
583
+ )
584
+ ],
585
+ 64
586
+ )) : column.type === "qrcode" ? (vue.openBlock(), vue.createElementBlock(
587
+ vue.Fragment,
588
+ { key: 2 },
589
+ [
590
+ vue.unref(proxys)[column.prop || ""] ? (vue.openBlock(), vue.createBlock(_component_MQrcode, {
591
+ key: 0,
592
+ text: vue.unref(proxys)[column.prop || ""],
593
+ align: "center"
594
+ }, null, 8, ["text"])) : vue.createCommentVNode("v-if", true)
595
+ ],
596
+ 64
597
+ )) : column.type === "barcode" ? (vue.openBlock(), vue.createElementBlock(
598
+ vue.Fragment,
599
+ { key: 3 },
600
+ [
601
+ vue.unref(proxys)[column.prop || ""] ? (vue.openBlock(), vue.createBlock(_component_MBarcode, {
602
+ key: 0,
603
+ text: vue.unref(proxys)[column.prop || ""],
604
+ align: "center"
605
+ }, null, 8, ["text"])) : vue.createCommentVNode("v-if", true)
606
+ ],
607
+ 64
608
+ )) : (vue.openBlock(), vue.createElementBlock(
609
+ vue.Fragment,
610
+ { key: 4 },
611
+ [
612
+ vue.createTextVNode(
613
+ vue.toDisplayString(vue.unref(proxys)[column.prop || ""]),
614
+ 1
615
+ )
616
+ ],
617
+ 64
618
+ ))
619
+ ], 8, ["colspan"])
620
+ ],
621
+ 64
622
+ );
623
+ }),
624
+ 128
625
+ ))
626
+ ]);
627
+ }),
628
+ 128
629
+ ))
630
+ ])
631
+ ])
632
+ ],
633
+ 64
634
+ ))
635
+ ]);
636
+ };
29
637
  }
30
638
  });
31
- const formEmits = {};
639
+ var Form = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "form.vue"]]);
32
640
 
33
- exports.formEmits = formEmits;
34
- exports.formProps = formProps;
641
+ exports["default"] = Form;
35
642
  //# sourceMappingURL=form2.js.map