hy-dispatch-ui-v3 0.2.84 → 0.2.86

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 (38) hide show
  1. package/dist/tailwind.css +54 -0
  2. package/es/bussiness/hyDeviceTree/deviceTree.vue.mjs +5 -0
  3. package/es/bussiness/hyDeviceTree/js/index.mjs +15 -5
  4. package/es/bussiness/hySelectDeviceTree/cpns/deviceItem.install.mjs +6 -0
  5. package/es/bussiness/hySelectDeviceTree/cpns/deviceItem.vue.mjs +113 -0
  6. package/es/bussiness/hySelectDeviceTree/index.mjs +7 -0
  7. package/es/bussiness/hySelectDeviceTree/js/index.mjs +35 -0
  8. package/es/bussiness/hySelectDeviceTree/selectDeviceTree.install.mjs +6 -0
  9. package/es/bussiness/hySelectDeviceTree/selectDeviceTree.vue.mjs +163 -0
  10. package/es/bussiness/hySelectDeviceTree/style/selectDeviceTree.scss +0 -0
  11. package/es/bussiness/index.mjs +1 -0
  12. package/es/components/hyForm/cpns/formItem.vue.mjs +493 -426
  13. package/es/components/hyForm/form.vue.mjs +12 -0
  14. package/es/components/hyIcon/icon.vue.mjs +10 -4
  15. package/es/components-map.mjs +1 -0
  16. package/es/index.mjs +2 -0
  17. package/es/utils/device.mjs +42 -0
  18. package/es/utils/index.mjs +1 -0
  19. package/es/version.mjs +1 -1
  20. package/lib/bussiness/hyDeviceTree/deviceTree.vue.js +5 -0
  21. package/lib/bussiness/hyDeviceTree/js/index.js +15 -5
  22. package/lib/bussiness/hySelectDeviceTree/cpns/deviceItem.install.js +6 -0
  23. package/lib/bussiness/hySelectDeviceTree/cpns/deviceItem.vue.js +117 -0
  24. package/lib/bussiness/hySelectDeviceTree/index.js +12 -0
  25. package/lib/bussiness/hySelectDeviceTree/js/index.js +37 -0
  26. package/lib/bussiness/hySelectDeviceTree/selectDeviceTree.install.js +6 -0
  27. package/lib/bussiness/hySelectDeviceTree/selectDeviceTree.vue.js +167 -0
  28. package/lib/bussiness/hySelectDeviceTree/style/selectDeviceTree.scss +0 -0
  29. package/lib/bussiness/index.js +4 -2
  30. package/lib/components/hyForm/cpns/formItem.vue.js +492 -425
  31. package/lib/components/hyForm/form.vue.js +12 -0
  32. package/lib/components/hyIcon/icon.vue.js +10 -4
  33. package/lib/components-map.js +1 -0
  34. package/lib/index.js +24 -20
  35. package/lib/utils/device.js +44 -0
  36. package/lib/utils/index.js +2 -0
  37. package/lib/version.js +1 -1
  38. package/package.json +7 -1
@@ -1,4 +1,4 @@
1
- import { inject, useTemplateRef, computed, unref, reactive, toRefs, onMounted, watch, onBeforeUnmount, openBlock, createElementBlock, normalizeClass, normalizeStyle, createBlock, createSlots, withCtx, createElementVNode, renderSlot, createTextVNode, toDisplayString, createCommentVNode, createVNode, Fragment, mergeProps } from 'vue';
1
+ import { inject, useTemplateRef, computed, unref, reactive, toRefs, onMounted, watch, onBeforeUnmount, openBlock, createElementBlock, normalizeClass, normalizeStyle, createBlock, createSlots, withCtx, createElementVNode, createCommentVNode, renderSlot, createVNode, toDisplayString, Fragment, mergeProps } from 'vue';
2
2
  import { ElFormItem, ElSelect, ElIcon, ElSelectV2, ElRadioGroup, ElCheckboxGroup, ElSwitch, ElInputNumber, ElCascader } from 'element-plus';
3
3
  import { Loading } from '@element-plus/icons-vue';
4
4
  import '../../../utils/index.mjs';
@@ -265,441 +265,508 @@ const _sfc_main = {
265
265
  createElementVNode(
266
266
  "div",
267
267
  {
268
- class: normalizeClass(["w-full flex justify-between text-main", __props.column.labelClass])
269
- },
270
- [
271
- createElementVNode("div", { class: "flex items-center" }, [
272
- createElementVNode("span", { class: "text-main whitespace-nowrap" }, [
273
- renderSlot(_ctx.$slots, __props.column.labelSlot, {
274
- column: columnConfig.value,
275
- model: __props.model,
276
- required: unref(isRequired)(props, __props.column)
277
- }, () => [
278
- createTextVNode(
279
- toDisplayString(unref(columnLabelHandler)(__props.column, props.model) || "\xA0"),
280
- 1
281
- /* TEXT */
282
- )
283
- ])
284
- ]),
285
- unref(isRequired)(props, __props.column) ? (openBlock(), createElementBlock("span", {
286
- key: 0,
287
- class: "label-required"
288
- })) : createCommentVNode("v-if", true),
289
- unref(columnHelpHandler)(props, __props.column) || __props.column.tooltipContentSlot ? (openBlock(), createBlock(unref(HyTooltip), {
290
- key: 1,
291
- "is-always": "",
292
- overLine: 1
293
- }, {
294
- content: withCtx(() => [
295
- !__props.column.tooltipContentSlot ? (openBlock(), createElementBlock(
296
- "span",
297
- { key: 0 },
298
- toDisplayString(unref(columnHelpHandler)(props, __props.column)),
299
- 1
300
- /* TEXT */
301
- )) : createCommentVNode("v-if", true),
302
- renderSlot(_ctx.$slots, __props.column.tooltipContentSlot, {
303
- column: columnConfig.value,
304
- model: __props.model,
305
- required: unref(isRequired)(props, __props.column)
306
- })
307
- ]),
308
- default: withCtx(() => [
309
- createElementVNode("span", { class: "text-xs text-theme ml-2" }, [
310
- createVNode(unref(HyIcon), {
311
- "svg-name": "dispatch-share-v3-base-help",
312
- class: "!w-3 !h-3 mr-1"
313
- }),
314
- createElementVNode(
315
- "span",
316
- null,
317
- toDisplayString(unref($t)("hy.help")),
318
- 1
319
- /* TEXT */
320
- )
321
- ])
322
- ]),
323
- _: 3
324
- /* FORWARDED */
325
- })) : createCommentVNode("v-if", true)
326
- ]),
327
- __props.column.rightSlot && _ctx.$slots[__props.column.rightSlot] ? (openBlock(), createElementBlock("div", {
328
- key: 0,
329
- class: "ml-2 flex items-center"
330
- }, [
331
- renderSlot(_ctx.$slots, __props.column.rightSlot, {
332
- column: columnConfig.value,
333
- model: __props.model,
334
- required: unref(isRequired)(props, __props.column)
335
- })
336
- ])) : createCommentVNode("v-if", true)
337
- ],
338
- 2
339
- /* CLASS */
340
- ),
341
- unref(isReadonly)(props, __props.column) || !__props.column.type && !__props.column.slot ? (openBlock(), createElementBlock(
342
- "div",
343
- {
344
- key: 0,
345
- class: normalizeClass(["w-full flex items-center text-main px-2 box-border", {
346
- "min-h-[40px]": __props.size === "large",
347
- "min-h-[32px]": __props.size === "default",
348
- "min-h-[24px]": __props.size === "small",
349
- "bg-background": __props.level === 1,
350
- "bg-background-2": __props.level === 2,
351
- "bg-background-3": __props.level === 3,
352
- "bg-background-4": __props.level === 4
268
+ class: normalizeClass(["w-full flex relative", {
269
+ "flex-col": unref(formContext).labelPosition === "top",
270
+ "items-center": unref(formContext).labelPosition !== "top"
353
271
  }])
354
272
  },
355
273
  [
356
- unref(renderText)(props, __props.column) ? (openBlock(), createElementBlock(
357
- "span",
274
+ createCommentVNode(" \u8868\u5355\u9879label "),
275
+ createElementVNode(
276
+ "div",
358
277
  {
359
- key: 0,
360
- class: "break-all"
278
+ class: normalizeClass(["flex justify-between text-main", [
279
+ { "w-full": unref(formContext).labelPosition === "top" },
280
+ { "max-w-full mr-2": unref(formContext).labelPosition !== "top" },
281
+ __props.column.labelClass
282
+ ]]),
283
+ style: normalizeStyle({ width: unref(formContext).labelPosition !== "top" ? unref(formContext).labelWidth || null : null })
361
284
  },
362
- toDisplayString(unref(renderText)(props, __props.column)),
363
- 1
364
- /* TEXT */
365
- )) : (openBlock(), createElementBlock("span", {
366
- key: 1,
367
- class: "text-auxiliary"
368
- }, "- -"))
369
- ],
370
- 2
371
- /* CLASS */
372
- )) : (openBlock(), createElementBlock(
373
- Fragment,
374
- { key: 1 },
375
- [
376
- createCommentVNode(" \u8868\u5355\u9879 "),
377
- createCommentVNode(" \u81EA\u5B9A\u4E49\u5177\u540D\u63D2\u69FD "),
378
- __props.column.slot && _ctx.$slots[__props.column.slot] ? renderSlot(_ctx.$slots, __props.column.slot, {
379
- column: columnConfig.value,
380
- model: __props.model,
381
- required: unref(isRequired)(props, __props.column)
382
- }, void 0, void 0, 0) : __props.column.type === "input" ? (openBlock(), createElementBlock(
383
- Fragment,
384
- { key: 1 },
385
- [
386
- createCommentVNode(" \u8F93\u5165\u6846 "),
387
- createVNode(unref(HyInput), mergeProps({
388
- modelValue: bindValue.value,
389
- "onUpdate:modelValue": ($event) => bindValue.value = $event
390
- }, columnAttrs.value, {
391
- disabled: unref(isDisabled)(props, __props.column),
392
- onChange: onChangeHandler
393
- }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])
394
- ],
395
- 2112
396
- /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
397
- )) : __props.column.type === "select" ? (openBlock(), createElementBlock(
398
- Fragment,
399
- { key: 2 },
400
- [
401
- createCommentVNode(" \u9009\u62E9\u6846 "),
402
- createVNode(unref(ElSelect), mergeProps({
403
- modelValue: bindValue.value,
404
- "onUpdate:modelValue": ($event) => bindValue.value = $event
405
- }, columnAttrs.value, {
406
- disabled: unref(isDisabled)(props, __props.column),
407
- options: getOptionsHandler(props, __props.column),
408
- onChange: onChangeHandler
409
- }), createSlots({
410
- _: 2
411
- /* DYNAMIC */
412
- }, [
413
- __props.column.optionsLoading ? {
414
- name: "empty",
415
- fn: withCtx(() => [
416
- createElementVNode("div", { class: "w-full flex items-center justify-center py-2 gap-1.5 text-main text-xs whitespace-nowrap" }, [
417
- createVNode(unref(ElIcon), {
418
- size: "16",
419
- class: "is-loading text-theme"
420
- }, {
421
- default: withCtx(() => [
422
- createVNode(unref(Loading))
423
- ]),
424
- _: 1
425
- /* STABLE */
426
- }),
427
- createElementVNode("span", null, "\u6570\u636E\u6B63\u5728\u52A0\u8F7D\u4E2D")
428
- ])
429
- ]),
430
- key: "0"
431
- } : void 0
432
- ]), 1040, ["modelValue", "onUpdate:modelValue", "disabled", "options"])
433
- ],
434
- 2112
435
- /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
436
- )) : __props.column.type === "select-v2" ? (openBlock(), createElementBlock(
437
- Fragment,
438
- { key: 3 },
439
- [
440
- createCommentVNode(" \u865A\u62DF\u5316\u9009\u62E9\u6846 "),
441
- createVNode(unref(ElSelectV2), mergeProps({
442
- modelValue: bindValue.value,
443
- "onUpdate:modelValue": ($event) => bindValue.value = $event
444
- }, columnAttrs.value, {
445
- disabled: unref(isDisabled)(props, __props.column),
446
- options: getOptionsHandler(props, __props.column),
447
- onChange: onChangeHandler
448
- }), createSlots({
449
- _: 2
450
- /* DYNAMIC */
451
- }, [
452
- __props.column.optionsLoading ? {
453
- name: "empty",
454
- fn: withCtx(() => [
455
- createElementVNode("div", { class: "w-full flex items-center justify-center py-2 gap-1.5 text-main text-xs whitespace-nowrap" }, [
456
- createVNode(unref(ElIcon), {
457
- size: "16",
458
- class: "is-loading text-theme"
459
- }, {
460
- default: withCtx(() => [
461
- createVNode(unref(Loading))
462
- ]),
463
- _: 1
464
- /* STABLE */
465
- }),
466
- createElementVNode("span", null, "\u6570\u636E\u6B63\u5728\u52A0\u8F7D\u4E2D")
467
- ])
468
- ]),
469
- key: "0"
470
- } : void 0
471
- ]), 1040, ["modelValue", "onUpdate:modelValue", "disabled", "options"])
472
- ],
473
- 2112
474
- /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
475
- )) : __props.column.type === "date-picker" ? (openBlock(), createElementBlock(
476
- Fragment,
477
- { key: 4 },
478
- [
479
- createCommentVNode(" \u65E5\u671F\u9009\u62E9\u6846 "),
480
- ["datetimerange", "daterange", "monthrange", "yearrange"].includes(columnAttrs.value?.type) && unref(isArray)(__props.column.field) ? (openBlock(), createBlock(unref(HyDatePicker), mergeProps({
481
- key: 0,
482
- start: bindValue.value,
483
- "onUpdate:start": ($event) => bindValue.value = $event,
484
- end: bindValue2.value,
485
- "onUpdate:end": ($event) => bindValue2.value = $event,
486
- "is-range": true,
487
- style: { "width": "100%" },
488
- teleported: true
489
- }, columnAttrs.value, {
490
- disabled: unref(isDisabled)(props, __props.column),
491
- onChange: onChangeHandler
492
- }), null, 16, ["start", "onUpdate:start", "end", "onUpdate:end", "disabled"])) : (openBlock(), createBlock(unref(HyDatePicker), mergeProps({
493
- key: 1,
494
- modelValue: bindValue.value,
495
- "onUpdate:modelValue": ($event) => bindValue.value = $event,
496
- "is-range": false,
497
- style: { "width": "100%" },
498
- teleported: true
499
- }, columnAttrs.value, {
500
- disabled: unref(isDisabled)(props, __props.column),
501
- onChange: onChangeHandler
502
- }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"]))
503
- ],
504
- 64
505
- /* STABLE_FRAGMENT */
506
- )) : __props.column.type === "time-picker" ? (openBlock(), createElementBlock(
507
- Fragment,
508
- { key: 5 },
509
285
  [
510
- createCommentVNode(" \u65F6\u95F4\u9009\u62E9\u6846 "),
511
- columnAttrs.value.isRange ? (openBlock(), createBlock(unref(HyTimePicker), mergeProps({
512
- key: 0,
513
- start: bindValue.value,
514
- "onUpdate:start": ($event) => bindValue.value = $event,
515
- end: bindValue2.value,
516
- "onUpdate:end": ($event) => bindValue2.value = $event,
517
- "is-range": true,
518
- style: { "width": "100%" },
519
- teleported: true
520
- }, columnAttrs.value, {
521
- disabled: unref(isDisabled)(props, __props.column),
522
- onChange: onChangeHandler
523
- }), null, 16, ["start", "onUpdate:start", "end", "onUpdate:end", "disabled"])) : (openBlock(), createBlock(unref(HyTimePicker), mergeProps({
524
- key: 1,
525
- modelValue: bindValue.value,
526
- "onUpdate:modelValue": ($event) => bindValue.value = $event,
527
- "is-range": false,
528
- style: { "width": "100%" },
529
- teleported: true
530
- }, columnAttrs.value, {
531
- disabled: unref(isDisabled)(props, __props.column),
532
- onChange: onChangeHandler
533
- }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"]))
534
- ],
535
- 64
536
- /* STABLE_FRAGMENT */
537
- )) : __props.column.type === "radio" ? (openBlock(), createElementBlock(
538
- Fragment,
539
- { key: 6 },
540
- [
541
- createCommentVNode(" \u5355\u9009 "),
542
- createVNode(unref(ElRadioGroup), mergeProps({
543
- modelValue: bindValue.value,
544
- "onUpdate:modelValue": ($event) => bindValue.value = $event
545
- }, columnAttrs.value, {
546
- disabled: unref(isDisabled)(props, __props.column),
547
- options: getOptionsHandler(props, __props.column),
548
- onChange: onChangeHandler
549
- }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled", "options"])
550
- ],
551
- 2112
552
- /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
553
- )) : __props.column.type === "radio-group" ? (openBlock(), createElementBlock(
554
- Fragment,
555
- { key: 7 },
556
- [
557
- createCommentVNode(" \u5355\u9009\u6309\u94AE "),
558
- createVNode(unref(HyRadioGroup), mergeProps({
559
- modelValue: bindValue.value,
560
- "onUpdate:modelValue": ($event) => bindValue.value = $event
561
- }, columnAttrs.value, {
562
- disabled: unref(isDisabled)(props, __props.column),
563
- options: getOptionsHandler(props, __props.column),
564
- size: __props.size,
565
- onChange: onChangeHandler
566
- }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled", "options", "size"])
567
- ],
568
- 2112
569
- /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
570
- )) : __props.column.type === "checkbox" ? (openBlock(), createElementBlock(
571
- Fragment,
572
- { key: 8 },
573
- [
574
- createCommentVNode(" \u591A\u9009 "),
575
- createVNode(unref(ElCheckboxGroup), mergeProps({
576
- modelValue: bindValue.value,
577
- "onUpdate:modelValue": ($event) => bindValue.value = $event
578
- }, columnAttrs.value, {
579
- disabled: unref(isDisabled)(props, __props.column),
580
- options: getOptionsHandler(props, __props.column),
581
- onChange: onChangeHandler
582
- }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled", "options"])
583
- ],
584
- 2112
585
- /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
586
- )) : __props.column.type === "checkbox-group" ? (openBlock(), createElementBlock(
587
- Fragment,
588
- { key: 9 },
589
- [
590
- createCommentVNode(" \u591A\u9009\u6309\u94AE "),
591
- createVNode(unref(HyCheckboxGroup), mergeProps({
592
- modelValue: bindValue.value,
593
- "onUpdate:modelValue": ($event) => bindValue.value = $event
594
- }, columnAttrs.value, {
595
- disabled: unref(isDisabled)(props, __props.column),
596
- options: getOptionsHandler(props, __props.column),
597
- size: __props.size,
598
- onChange: onChangeHandler
599
- }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled", "options", "size"])
600
- ],
601
- 2112
602
- /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
603
- )) : __props.column.type === "switch" ? (openBlock(), createElementBlock(
604
- Fragment,
605
- { key: 10 },
606
- [
607
- createCommentVNode(" \u5F00\u5173 "),
608
- createVNode(unref(ElSwitch), mergeProps({
609
- modelValue: bindValue.value,
610
- "onUpdate:modelValue": ($event) => bindValue.value = $event,
611
- "inline-prompt": "",
612
- width: "80",
613
- style: { "--hy-el-switch-on-color": "#5ab95f", "--hy-el-switch-off-color": "rgba(var(--hy-background), 1)" }
614
- }, columnAttrs.value, {
615
- disabled: unref(isDisabled)(props, __props.column),
616
- onChange: onChangeHandler
617
- }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])
618
- ],
619
- 2112
620
- /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
621
- )) : __props.column.type === "input-number" ? (openBlock(), createElementBlock(
622
- Fragment,
623
- { key: 11 },
624
- [
625
- createCommentVNode(" \u6570\u5B57\u8F93\u5165\u6846 "),
626
- createVNode(unref(ElInputNumber), mergeProps({
627
- modelValue: bindValue.value,
628
- "onUpdate:modelValue": ($event) => bindValue.value = $event
629
- }, columnAttrs.value, {
630
- disabled: unref(isDisabled)(props, __props.column),
631
- onChange: onChangeHandler
632
- }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])
633
- ],
634
- 2112
635
- /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
636
- )) : __props.column.type === "org-cascader" ? (openBlock(), createElementBlock(
637
- Fragment,
638
- { key: 12 },
639
- [
640
- createCommentVNode(" \u90E8\u95E8\u7EA7\u8054\u9009\u62E9\u6846 "),
641
- createVNode(unref(HyOrgCascader), mergeProps({
642
- ref_key: "orgCascaderRef",
643
- ref: orgCascaderRef,
644
- modelValue: bindValue.value,
645
- "onUpdate:modelValue": ($event) => bindValue.value = $event,
646
- class: "w-full"
647
- }, columnAttrs.value, {
648
- disabled: unref(isDisabled)(props, __props.column),
649
- defaultGetData: false,
650
- onRequesting,
651
- onFulfilled,
652
- onRejected,
653
- onChange: onChangeHandler
654
- }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])
286
+ createElementVNode(
287
+ "div",
288
+ {
289
+ class: normalizeClass(["flex items-center", {
290
+ "w-full justify-end": unref(formContext).labelPosition !== "top"
291
+ }])
292
+ },
293
+ [
294
+ createElementVNode(
295
+ "div",
296
+ {
297
+ class: normalizeClass(["text-main inline-flex items-center", {
298
+ "w-0 flex-1": unref(formContext).labelPosition !== "top",
299
+ "justify-end": unref(formContext).labelPosition === "right"
300
+ }])
301
+ },
302
+ [
303
+ renderSlot(_ctx.$slots, __props.column.labelSlot, {
304
+ column: columnConfig.value,
305
+ model: __props.model,
306
+ required: unref(isRequired)(props, __props.column)
307
+ }, () => [
308
+ createVNode(unref(HyTooltip), {
309
+ "is-always": false,
310
+ "over-line": 1,
311
+ class: normalizeClass({
312
+ "block": unref(formContext).labelPosition !== "top"
313
+ }),
314
+ disabled: !unref(columnLabelHandler)(__props.column, props.model),
315
+ content: unref(columnLabelHandler)(__props.column, props.model) || "\xA0"
316
+ }, null, 8, ["class", "disabled", "content"])
317
+ ]),
318
+ unref(isRequired)(props, __props.column) ? (openBlock(), createElementBlock("span", {
319
+ key: 0,
320
+ class: "label-required"
321
+ })) : createCommentVNode("v-if", true)
322
+ ],
323
+ 2
324
+ /* CLASS */
325
+ ),
326
+ unref(columnHelpHandler)(props, __props.column) || __props.column.tooltipContentSlot ? (openBlock(), createBlock(unref(HyTooltip), {
327
+ key: 0,
328
+ "is-always": "",
329
+ overLine: 1
330
+ }, {
331
+ content: withCtx(() => [
332
+ !__props.column.tooltipContentSlot ? (openBlock(), createElementBlock(
333
+ "span",
334
+ { key: 0 },
335
+ toDisplayString(unref(columnHelpHandler)(props, __props.column)),
336
+ 1
337
+ /* TEXT */
338
+ )) : createCommentVNode("v-if", true),
339
+ renderSlot(_ctx.$slots, __props.column.tooltipContentSlot, {
340
+ column: columnConfig.value,
341
+ model: __props.model,
342
+ required: unref(isRequired)(props, __props.column)
343
+ })
344
+ ]),
345
+ default: withCtx(() => [
346
+ createElementVNode("span", { class: "text-xs text-theme ml-2" }, [
347
+ createVNode(unref(HyIcon), {
348
+ "svg-name": "dispatch-share-v3-base-help",
349
+ class: "!w-3 !h-3 mr-1"
350
+ }),
351
+ createElementVNode(
352
+ "span",
353
+ null,
354
+ toDisplayString(unref($t)("hy.help")),
355
+ 1
356
+ /* TEXT */
357
+ )
358
+ ])
359
+ ]),
360
+ _: 3
361
+ /* FORWARDED */
362
+ })) : createCommentVNode("v-if", true)
363
+ ],
364
+ 2
365
+ /* CLASS */
366
+ ),
367
+ __props.column.rightSlot && _ctx.$slots[__props.column.rightSlot] ? (openBlock(), createElementBlock(
368
+ "div",
369
+ {
370
+ key: 0,
371
+ class: normalizeClass(["flex items-center", {
372
+ "ml-2": unref(formContext).labelPosition === "top",
373
+ "leading-6 absolute right-0 top-0 transform -translate-y-full": unref(formContext).labelPosition !== "top"
374
+ }])
375
+ },
376
+ [
377
+ renderSlot(_ctx.$slots, __props.column.rightSlot, {
378
+ column: columnConfig.value,
379
+ model: __props.model,
380
+ required: unref(isRequired)(props, __props.column)
381
+ })
382
+ ],
383
+ 2
384
+ /* CLASS */
385
+ )) : createCommentVNode("v-if", true)
655
386
  ],
656
- 2112
657
- /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
658
- )) : __props.column.type === "cascader" ? (openBlock(), createElementBlock(
659
- Fragment,
660
- { key: 13 },
387
+ 6
388
+ /* CLASS, STYLE */
389
+ ),
390
+ createElementVNode(
391
+ "div",
392
+ {
393
+ class: normalizeClass({
394
+ "w-full": unref(formContext).labelPosition === "top",
395
+ "w-0 flex-1": unref(formContext).labelPosition !== "top"
396
+ })
397
+ },
661
398
  [
662
- createCommentVNode(" \u7EA7\u8054\u9009\u62E9\u6846 "),
663
- createVNode(unref(ElCascader), mergeProps({
664
- modelValue: bindValue.value,
665
- "onUpdate:modelValue": ($event) => bindValue.value = $event
666
- }, columnAttrs.value, {
667
- class: "w-full",
668
- disabled: unref(isDisabled)(props, __props.column),
669
- options: getOptionsHandler(props, __props.column),
670
- onChange: onChangeHandler
671
- }), createSlots({
672
- _: 2
673
- /* DYNAMIC */
674
- }, [
675
- __props.column.optionsLoading ? {
676
- name: "empty",
677
- fn: withCtx(() => [
678
- createElementVNode("div", { class: "w-full flex items-center justify-center py-2 gap-1.5 text-main text-xs whitespace-nowrap" }, [
679
- createVNode(unref(ElIcon), {
680
- size: "16",
681
- class: "is-loading text-theme"
682
- }, {
683
- default: withCtx(() => [
684
- createVNode(unref(Loading))
685
- ]),
686
- _: 1
687
- /* STABLE */
688
- }),
689
- createElementVNode("span", null, "\u6570\u636E\u6B63\u5728\u52A0\u8F7D\u4E2D")
690
- ])
691
- ]),
692
- key: "0"
693
- } : void 0
694
- ]), 1040, ["modelValue", "onUpdate:modelValue", "disabled", "options"])
399
+ createCommentVNode(" \u5185\u5BB9\u4EC5\u67E5\u770B "),
400
+ unref(isReadonly)(props, __props.column) || !__props.column.type && !__props.column.slot ? (openBlock(), createElementBlock(
401
+ "div",
402
+ {
403
+ key: 0,
404
+ class: normalizeClass(["w-full flex items-center text-main px-2 box-border", {
405
+ "min-h-[40px]": __props.size === "large",
406
+ "min-h-[32px]": __props.size === "default",
407
+ "min-h-[24px]": __props.size === "small",
408
+ "bg-background": __props.level === 1,
409
+ "bg-background-2": __props.level === 2,
410
+ "bg-background-3": __props.level === 3,
411
+ "bg-background-4": __props.level === 4
412
+ }])
413
+ },
414
+ [
415
+ unref(renderText)(props, __props.column) ? (openBlock(), createElementBlock(
416
+ "span",
417
+ {
418
+ key: 0,
419
+ class: "break-all"
420
+ },
421
+ toDisplayString(unref(renderText)(props, __props.column)),
422
+ 1
423
+ /* TEXT */
424
+ )) : (openBlock(), createElementBlock("span", {
425
+ key: 1,
426
+ class: "text-auxiliary"
427
+ }, "- -"))
428
+ ],
429
+ 2
430
+ /* CLASS */
431
+ )) : (openBlock(), createElementBlock(
432
+ Fragment,
433
+ { key: 1 },
434
+ [
435
+ createCommentVNode(" \u8868\u5355\u9879 "),
436
+ createCommentVNode(" \u81EA\u5B9A\u4E49\u5177\u540D\u63D2\u69FD "),
437
+ __props.column.slot && _ctx.$slots[__props.column.slot] ? renderSlot(_ctx.$slots, __props.column.slot, {
438
+ column: columnConfig.value,
439
+ model: __props.model,
440
+ required: unref(isRequired)(props, __props.column)
441
+ }, void 0, void 0, 0) : __props.column.type === "input" ? (openBlock(), createElementBlock(
442
+ Fragment,
443
+ { key: 1 },
444
+ [
445
+ createCommentVNode(" \u8F93\u5165\u6846 "),
446
+ createVNode(unref(HyInput), mergeProps({
447
+ modelValue: bindValue.value,
448
+ "onUpdate:modelValue": ($event) => bindValue.value = $event
449
+ }, columnAttrs.value, {
450
+ disabled: unref(isDisabled)(props, __props.column),
451
+ onChange: onChangeHandler
452
+ }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])
453
+ ],
454
+ 2112
455
+ /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
456
+ )) : __props.column.type === "select" ? (openBlock(), createElementBlock(
457
+ Fragment,
458
+ { key: 2 },
459
+ [
460
+ createCommentVNode(" \u9009\u62E9\u6846 "),
461
+ createVNode(unref(ElSelect), mergeProps({
462
+ modelValue: bindValue.value,
463
+ "onUpdate:modelValue": ($event) => bindValue.value = $event
464
+ }, columnAttrs.value, {
465
+ disabled: unref(isDisabled)(props, __props.column),
466
+ options: getOptionsHandler(props, __props.column),
467
+ onChange: onChangeHandler
468
+ }), createSlots({
469
+ _: 2
470
+ /* DYNAMIC */
471
+ }, [
472
+ __props.column.optionsLoading ? {
473
+ name: "empty",
474
+ fn: withCtx(() => [
475
+ createElementVNode("div", { class: "w-full flex items-center justify-center py-2 gap-1.5 text-main text-xs whitespace-nowrap" }, [
476
+ createVNode(unref(ElIcon), {
477
+ size: "16",
478
+ class: "is-loading text-theme"
479
+ }, {
480
+ default: withCtx(() => [
481
+ createVNode(unref(Loading))
482
+ ]),
483
+ _: 1
484
+ /* STABLE */
485
+ }),
486
+ createElementVNode("span", null, "\u6570\u636E\u6B63\u5728\u52A0\u8F7D\u4E2D")
487
+ ])
488
+ ]),
489
+ key: "0"
490
+ } : void 0
491
+ ]), 1040, ["modelValue", "onUpdate:modelValue", "disabled", "options"])
492
+ ],
493
+ 2112
494
+ /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
495
+ )) : __props.column.type === "select-v2" ? (openBlock(), createElementBlock(
496
+ Fragment,
497
+ { key: 3 },
498
+ [
499
+ createCommentVNode(" \u865A\u62DF\u5316\u9009\u62E9\u6846 "),
500
+ createVNode(unref(ElSelectV2), mergeProps({
501
+ modelValue: bindValue.value,
502
+ "onUpdate:modelValue": ($event) => bindValue.value = $event
503
+ }, columnAttrs.value, {
504
+ disabled: unref(isDisabled)(props, __props.column),
505
+ options: getOptionsHandler(props, __props.column),
506
+ onChange: onChangeHandler
507
+ }), createSlots({
508
+ _: 2
509
+ /* DYNAMIC */
510
+ }, [
511
+ __props.column.optionsLoading ? {
512
+ name: "empty",
513
+ fn: withCtx(() => [
514
+ createElementVNode("div", { class: "w-full flex items-center justify-center py-2 gap-1.5 text-main text-xs whitespace-nowrap" }, [
515
+ createVNode(unref(ElIcon), {
516
+ size: "16",
517
+ class: "is-loading text-theme"
518
+ }, {
519
+ default: withCtx(() => [
520
+ createVNode(unref(Loading))
521
+ ]),
522
+ _: 1
523
+ /* STABLE */
524
+ }),
525
+ createElementVNode("span", null, "\u6570\u636E\u6B63\u5728\u52A0\u8F7D\u4E2D")
526
+ ])
527
+ ]),
528
+ key: "0"
529
+ } : void 0
530
+ ]), 1040, ["modelValue", "onUpdate:modelValue", "disabled", "options"])
531
+ ],
532
+ 2112
533
+ /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
534
+ )) : __props.column.type === "date-picker" ? (openBlock(), createElementBlock(
535
+ Fragment,
536
+ { key: 4 },
537
+ [
538
+ createCommentVNode(" \u65E5\u671F\u9009\u62E9\u6846 "),
539
+ ["datetimerange", "daterange", "monthrange", "yearrange"].includes(columnAttrs.value?.type) && unref(isArray)(__props.column.field) ? (openBlock(), createBlock(unref(HyDatePicker), mergeProps({
540
+ key: 0,
541
+ start: bindValue.value,
542
+ "onUpdate:start": ($event) => bindValue.value = $event,
543
+ end: bindValue2.value,
544
+ "onUpdate:end": ($event) => bindValue2.value = $event,
545
+ "is-range": true,
546
+ style: { "width": "100%" },
547
+ teleported: true
548
+ }, columnAttrs.value, {
549
+ disabled: unref(isDisabled)(props, __props.column),
550
+ onChange: onChangeHandler
551
+ }), null, 16, ["start", "onUpdate:start", "end", "onUpdate:end", "disabled"])) : (openBlock(), createBlock(unref(HyDatePicker), mergeProps({
552
+ key: 1,
553
+ modelValue: bindValue.value,
554
+ "onUpdate:modelValue": ($event) => bindValue.value = $event,
555
+ "is-range": false,
556
+ style: { "width": "100%" },
557
+ teleported: true
558
+ }, columnAttrs.value, {
559
+ disabled: unref(isDisabled)(props, __props.column),
560
+ onChange: onChangeHandler
561
+ }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"]))
562
+ ],
563
+ 64
564
+ /* STABLE_FRAGMENT */
565
+ )) : __props.column.type === "time-picker" ? (openBlock(), createElementBlock(
566
+ Fragment,
567
+ { key: 5 },
568
+ [
569
+ createCommentVNode(" \u65F6\u95F4\u9009\u62E9\u6846 "),
570
+ columnAttrs.value.isRange ? (openBlock(), createBlock(unref(HyTimePicker), mergeProps({
571
+ key: 0,
572
+ start: bindValue.value,
573
+ "onUpdate:start": ($event) => bindValue.value = $event,
574
+ end: bindValue2.value,
575
+ "onUpdate:end": ($event) => bindValue2.value = $event,
576
+ "is-range": true,
577
+ style: { "width": "100%" },
578
+ teleported: true
579
+ }, columnAttrs.value, {
580
+ disabled: unref(isDisabled)(props, __props.column),
581
+ onChange: onChangeHandler
582
+ }), null, 16, ["start", "onUpdate:start", "end", "onUpdate:end", "disabled"])) : (openBlock(), createBlock(unref(HyTimePicker), mergeProps({
583
+ key: 1,
584
+ modelValue: bindValue.value,
585
+ "onUpdate:modelValue": ($event) => bindValue.value = $event,
586
+ "is-range": false,
587
+ style: { "width": "100%" },
588
+ teleported: true
589
+ }, columnAttrs.value, {
590
+ disabled: unref(isDisabled)(props, __props.column),
591
+ onChange: onChangeHandler
592
+ }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"]))
593
+ ],
594
+ 64
595
+ /* STABLE_FRAGMENT */
596
+ )) : __props.column.type === "radio" ? (openBlock(), createElementBlock(
597
+ Fragment,
598
+ { key: 6 },
599
+ [
600
+ createCommentVNode(" \u5355\u9009 "),
601
+ createVNode(unref(ElRadioGroup), mergeProps({
602
+ modelValue: bindValue.value,
603
+ "onUpdate:modelValue": ($event) => bindValue.value = $event
604
+ }, columnAttrs.value, {
605
+ disabled: unref(isDisabled)(props, __props.column),
606
+ options: getOptionsHandler(props, __props.column),
607
+ onChange: onChangeHandler
608
+ }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled", "options"])
609
+ ],
610
+ 2112
611
+ /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
612
+ )) : __props.column.type === "radio-group" ? (openBlock(), createElementBlock(
613
+ Fragment,
614
+ { key: 7 },
615
+ [
616
+ createCommentVNode(" \u5355\u9009\u6309\u94AE "),
617
+ createVNode(unref(HyRadioGroup), mergeProps({
618
+ modelValue: bindValue.value,
619
+ "onUpdate:modelValue": ($event) => bindValue.value = $event
620
+ }, columnAttrs.value, {
621
+ disabled: unref(isDisabled)(props, __props.column),
622
+ options: getOptionsHandler(props, __props.column),
623
+ size: __props.size,
624
+ onChange: onChangeHandler
625
+ }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled", "options", "size"])
626
+ ],
627
+ 2112
628
+ /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
629
+ )) : __props.column.type === "checkbox" ? (openBlock(), createElementBlock(
630
+ Fragment,
631
+ { key: 8 },
632
+ [
633
+ createCommentVNode(" \u591A\u9009 "),
634
+ createVNode(unref(ElCheckboxGroup), mergeProps({
635
+ modelValue: bindValue.value,
636
+ "onUpdate:modelValue": ($event) => bindValue.value = $event
637
+ }, columnAttrs.value, {
638
+ disabled: unref(isDisabled)(props, __props.column),
639
+ options: getOptionsHandler(props, __props.column),
640
+ onChange: onChangeHandler
641
+ }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled", "options"])
642
+ ],
643
+ 2112
644
+ /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
645
+ )) : __props.column.type === "checkbox-group" ? (openBlock(), createElementBlock(
646
+ Fragment,
647
+ { key: 9 },
648
+ [
649
+ createCommentVNode(" \u591A\u9009\u6309\u94AE "),
650
+ createVNode(unref(HyCheckboxGroup), mergeProps({
651
+ modelValue: bindValue.value,
652
+ "onUpdate:modelValue": ($event) => bindValue.value = $event
653
+ }, columnAttrs.value, {
654
+ disabled: unref(isDisabled)(props, __props.column),
655
+ options: getOptionsHandler(props, __props.column),
656
+ size: __props.size,
657
+ onChange: onChangeHandler
658
+ }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled", "options", "size"])
659
+ ],
660
+ 2112
661
+ /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
662
+ )) : __props.column.type === "switch" ? (openBlock(), createElementBlock(
663
+ Fragment,
664
+ { key: 10 },
665
+ [
666
+ createCommentVNode(" \u5F00\u5173 "),
667
+ createVNode(unref(ElSwitch), mergeProps({
668
+ modelValue: bindValue.value,
669
+ "onUpdate:modelValue": ($event) => bindValue.value = $event,
670
+ "inline-prompt": "",
671
+ width: "80",
672
+ style: { "--hy-el-switch-on-color": "#5ab95f", "--hy-el-switch-off-color": "rgba(var(--hy-background), 1)" }
673
+ }, columnAttrs.value, {
674
+ disabled: unref(isDisabled)(props, __props.column),
675
+ onChange: onChangeHandler
676
+ }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])
677
+ ],
678
+ 2112
679
+ /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
680
+ )) : __props.column.type === "input-number" ? (openBlock(), createElementBlock(
681
+ Fragment,
682
+ { key: 11 },
683
+ [
684
+ createCommentVNode(" \u6570\u5B57\u8F93\u5165\u6846 "),
685
+ createVNode(unref(ElInputNumber), mergeProps({
686
+ modelValue: bindValue.value,
687
+ "onUpdate:modelValue": ($event) => bindValue.value = $event
688
+ }, columnAttrs.value, {
689
+ disabled: unref(isDisabled)(props, __props.column),
690
+ onChange: onChangeHandler
691
+ }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])
692
+ ],
693
+ 2112
694
+ /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
695
+ )) : __props.column.type === "org-cascader" ? (openBlock(), createElementBlock(
696
+ Fragment,
697
+ { key: 12 },
698
+ [
699
+ createCommentVNode(" \u90E8\u95E8\u7EA7\u8054\u9009\u62E9\u6846 "),
700
+ createVNode(unref(HyOrgCascader), mergeProps({
701
+ ref_key: "orgCascaderRef",
702
+ ref: orgCascaderRef,
703
+ modelValue: bindValue.value,
704
+ "onUpdate:modelValue": ($event) => bindValue.value = $event,
705
+ class: "w-full"
706
+ }, columnAttrs.value, {
707
+ disabled: unref(isDisabled)(props, __props.column),
708
+ defaultGetData: false,
709
+ onRequesting,
710
+ onFulfilled,
711
+ onRejected,
712
+ onChange: onChangeHandler
713
+ }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])
714
+ ],
715
+ 2112
716
+ /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
717
+ )) : __props.column.type === "cascader" ? (openBlock(), createElementBlock(
718
+ Fragment,
719
+ { key: 13 },
720
+ [
721
+ createCommentVNode(" \u7EA7\u8054\u9009\u62E9\u6846 "),
722
+ createVNode(unref(ElCascader), mergeProps({
723
+ modelValue: bindValue.value,
724
+ "onUpdate:modelValue": ($event) => bindValue.value = $event
725
+ }, columnAttrs.value, {
726
+ class: "w-full",
727
+ disabled: unref(isDisabled)(props, __props.column),
728
+ options: getOptionsHandler(props, __props.column),
729
+ onChange: onChangeHandler
730
+ }), createSlots({
731
+ _: 2
732
+ /* DYNAMIC */
733
+ }, [
734
+ __props.column.optionsLoading ? {
735
+ name: "empty",
736
+ fn: withCtx(() => [
737
+ createElementVNode("div", { class: "w-full flex items-center justify-center py-2 gap-1.5 text-main text-xs whitespace-nowrap" }, [
738
+ createVNode(unref(ElIcon), {
739
+ size: "16",
740
+ class: "is-loading text-theme"
741
+ }, {
742
+ default: withCtx(() => [
743
+ createVNode(unref(Loading))
744
+ ]),
745
+ _: 1
746
+ /* STABLE */
747
+ }),
748
+ createElementVNode("span", null, "\u6570\u636E\u6B63\u5728\u52A0\u8F7D\u4E2D")
749
+ ])
750
+ ]),
751
+ key: "0"
752
+ } : void 0
753
+ ]), 1040, ["modelValue", "onUpdate:modelValue", "disabled", "options"])
754
+ ],
755
+ 2112
756
+ /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
757
+ )) : createCommentVNode("v-if", true)
758
+ ],
759
+ 64
760
+ /* STABLE_FRAGMENT */
761
+ ))
695
762
  ],
696
- 2112
697
- /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
698
- )) : createCommentVNode("v-if", true)
763
+ 2
764
+ /* CLASS */
765
+ )
699
766
  ],
700
- 64
701
- /* STABLE_FRAGMENT */
702
- ))
767
+ 2
768
+ /* CLASS */
769
+ )
703
770
  ]),
704
771
  _: 2
705
772
  /* DYNAMIC */