@wlydfe/pro-ui 0.2.5 → 0.2.6

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 (91) hide show
  1. package/es/components/date-picker/index.d.ts +25 -25
  2. package/es/components/date-picker/src/index.vue.d.ts +25 -25
  3. package/es/components/descriptions/index.d.ts +119 -119
  4. package/es/components/descriptions/src/index.vue.d.ts +119 -119
  5. package/es/components/dialog/index.d.ts +2 -2
  6. package/es/components/dialog/src/index.vue.d.ts +2 -2
  7. package/es/components/dialog-form/index.d.ts +102 -102
  8. package/es/components/dialog-form/src/index.vue.d.ts +102 -102
  9. package/es/components/display-item/index.d.ts +112 -112
  10. package/es/components/display-item/src/index.vue.d.ts +119 -113
  11. package/es/components/display-item/src/index.vue2.mjs +81 -31
  12. package/es/components/drawer-form/index.d.ts +110 -110
  13. package/es/components/drawer-form/src/index.vue.d.ts +110 -110
  14. package/es/components/form/index.d.ts +98 -98
  15. package/es/components/form/src/form-content.vue.d.ts +72 -72
  16. package/es/components/form/src/index.vue.d.ts +98 -98
  17. package/es/components/form-item/index.d.ts +65 -65
  18. package/es/components/form-item/src/index.vue.d.ts +65 -65
  19. package/es/components/header/index.d.ts +1 -1
  20. package/es/components/header/src/index.vue.d.ts +1 -1
  21. package/es/components/input-tag/index.d.ts +10 -10
  22. package/es/components/input-tag/src/index.vue.d.ts +10 -10
  23. package/es/components/layout/index.d.ts +56 -56
  24. package/es/components/layout/src/index.vue.d.ts +56 -56
  25. package/es/components/page/index.d.ts +1 -0
  26. package/es/components/page/src/index.vue.d.ts +1 -0
  27. package/es/components/page/src/index.vue2.mjs +9 -2
  28. package/es/components/pagination/index.d.ts +1 -1
  29. package/es/components/pagination/src/index.vue.d.ts +1 -1
  30. package/es/components/radio/index.d.ts +8 -8
  31. package/es/components/radio/src/index.vue.d.ts +8 -8
  32. package/es/components/search/index.d.ts +107 -107
  33. package/es/components/search/src/index.vue.d.ts +107 -107
  34. package/es/components/sidebar/index.d.ts +14 -14
  35. package/es/components/sidebar/src/index.vue.d.ts +14 -14
  36. package/es/components/steps-form/index.d.ts +104 -104
  37. package/es/components/steps-form/src/index.vue.d.ts +104 -104
  38. package/es/components/table/src/index.vue2.mjs +2 -1
  39. package/es/index.css +13 -13
  40. package/index.js +92 -34
  41. package/index.min.js +3 -3
  42. package/index.min.mjs +3 -3
  43. package/index.mjs +92 -34
  44. package/lib/components/date-picker/index.d.ts +25 -25
  45. package/lib/components/date-picker/src/index.vue.d.ts +25 -25
  46. package/lib/components/descriptions/index.d.ts +119 -119
  47. package/lib/components/descriptions/src/index.vue.d.ts +119 -119
  48. package/lib/components/dialog/index.d.ts +2 -2
  49. package/lib/components/dialog/src/index.vue.d.ts +2 -2
  50. package/lib/components/dialog-form/index.d.ts +102 -102
  51. package/lib/components/dialog-form/src/index.vue.d.ts +102 -102
  52. package/lib/components/display-item/index.d.ts +112 -112
  53. package/lib/components/display-item/src/index.vue.d.ts +119 -113
  54. package/lib/components/display-item/src/index.vue2.js +81 -31
  55. package/lib/components/drawer-form/index.d.ts +110 -110
  56. package/lib/components/drawer-form/src/index.vue.d.ts +110 -110
  57. package/lib/components/form/index.d.ts +98 -98
  58. package/lib/components/form/src/form-content.vue.d.ts +72 -72
  59. package/lib/components/form/src/index.vue.d.ts +98 -98
  60. package/lib/components/form-item/index.d.ts +65 -65
  61. package/lib/components/form-item/src/index.vue.d.ts +65 -65
  62. package/lib/components/header/index.d.ts +1 -1
  63. package/lib/components/header/src/index.vue.d.ts +1 -1
  64. package/lib/components/input-tag/index.d.ts +10 -10
  65. package/lib/components/input-tag/src/index.vue.d.ts +10 -10
  66. package/lib/components/layout/index.d.ts +56 -56
  67. package/lib/components/layout/src/index.vue.d.ts +56 -56
  68. package/lib/components/page/index.d.ts +1 -0
  69. package/lib/components/page/src/index.vue.d.ts +1 -0
  70. package/lib/components/page/src/index.vue2.js +9 -2
  71. package/lib/components/pagination/index.d.ts +1 -1
  72. package/lib/components/pagination/src/index.vue.d.ts +1 -1
  73. package/lib/components/radio/index.d.ts +8 -8
  74. package/lib/components/radio/src/index.vue.d.ts +8 -8
  75. package/lib/components/search/index.d.ts +107 -107
  76. package/lib/components/search/src/index.vue.d.ts +107 -107
  77. package/lib/components/sidebar/index.d.ts +14 -14
  78. package/lib/components/sidebar/src/index.vue.d.ts +14 -14
  79. package/lib/components/steps-form/index.d.ts +104 -104
  80. package/lib/components/steps-form/src/index.vue.d.ts +104 -104
  81. package/lib/components/table/src/index.vue2.js +2 -1
  82. package/lib/{page.css → index.css} +12 -12
  83. package/locale/en.js +1 -1
  84. package/locale/en.min.js +1 -1
  85. package/locale/en.min.mjs +1 -1
  86. package/locale/en.mjs +1 -1
  87. package/locale/zh-cn.js +1 -1
  88. package/locale/zh-cn.min.js +1 -1
  89. package/locale/zh-cn.min.mjs +1 -1
  90. package/locale/zh-cn.mjs +1 -1
  91. package/package.json +1 -1
@@ -6,11 +6,15 @@ import '../../../hooks/index.mjs';
6
6
  import { PlusRender } from '../../render/index.mjs';
7
7
  import { ElImage, ElLink, ElTag, ElProgress, ElIcon } from 'element-plus';
8
8
  import { useGetOptions } from '../../../hooks/useGetOptions.mjs';
9
- import { isArray, isFunction } from '../../utils/is.mjs';
10
9
  import { formatDate, formatMoney } from '../../utils/format.mjs';
10
+ import { isArray, isFunction } from '../../utils/is.mjs';
11
11
 
12
12
  const _hoisted_1 = ["innerHTML"];
13
- const _hoisted_2 = { class: "plus-display-item" };
13
+ const _hoisted_2 = {
14
+ key: 1,
15
+ class: "plus-display-item"
16
+ };
17
+ const _hoisted_3 = { class: "plus-display-item" };
14
18
  const _sfc_main = /* @__PURE__ */ defineComponent({
15
19
  ...{
16
20
  name: "PlusDisplayItem"
@@ -33,9 +37,26 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
33
37
  const columns = ref([]);
34
38
  const subRow = ref(props.row);
35
39
  const customFieldPropsIsReady = ref(false);
40
+ const rawValue = computed(() => getValue(subRow.value, props.column.prop));
36
41
  const displayValue = computed({
37
42
  get() {
38
- return getValue(subRow.value, props.column.prop);
43
+ var _a, _b;
44
+ const value = rawValue.value;
45
+ const isEmpty = value === "" || value === null || value === void 0;
46
+ if (isEmpty) {
47
+ switch (props.column.valueType) {
48
+ case "progress":
49
+ return 0;
50
+ default:
51
+ return ((_a = props.column.tableColumnProps) == null ? void 0 : _a.emptyText) || "-";
52
+ }
53
+ }
54
+ switch (props.column.valueType) {
55
+ case "date-picker":
56
+ return value ? formatDate(value) : ((_b = props.column.tableColumnProps) == null ? void 0 : _b.emptyText) || "-";
57
+ default:
58
+ return value;
59
+ }
39
60
  },
40
61
  set(value) {
41
62
  setValue(subRow.value, props.column.prop, value);
@@ -314,7 +335,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
314
335
  ],
315
336
  2112
316
337
  /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
317
- )) : _ctx.column.valueType === "date-picker" && displayValue.value ? (openBlock(), createElementBlock(
338
+ )) : _ctx.column.valueType === "date-picker" ? (openBlock(), createElementBlock(
318
339
  Fragment,
319
340
  { key: 6 },
320
341
  [
@@ -322,7 +343,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
322
343
  createElementVNode(
323
344
  "span",
324
345
  mergeProps({ class: "plus-display-item" }, customFieldProps.value),
325
- toDisplayString(unref(formatDate)(displayValue.value)),
346
+ toDisplayString(displayValue.value),
326
347
  17
327
348
  /* TEXT, FULL_PROPS */
328
349
  )
@@ -353,25 +374,45 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
353
374
  "span",
354
375
  mergeProps({ class: "plus-display-item plus-display-item__badge" }, customFieldProps.value),
355
376
  [
356
- getStatus.value.color || getStatus.value.type ? (openBlock(), createElementBlock(
357
- "span",
358
- {
359
- key: 0,
360
- class: normalizeClass([
361
- "plus-display-item__badge__dot",
362
- getStatus.value.type && !getStatus.value.color ? "plus-display-item__badge__dot--" + getStatus.value.type : ""
363
- ]),
364
- style: normalizeStyle({ backgroundColor: getStatus.value.color })
365
- },
366
- null,
367
- 6
368
- /* CLASS, STYLE */
369
- )) : createCommentVNode("v-if", true),
370
- createTextVNode(
371
- " " + toDisplayString(getStatus.value.label),
372
- 1
373
- /* TEXT */
374
- )
377
+ rawValue.value !== "" && rawValue.value !== null && rawValue.value !== void 0 ? (openBlock(), createElementBlock(
378
+ Fragment,
379
+ { key: 0 },
380
+ [
381
+ getStatus.value.color || getStatus.value.type ? (openBlock(), createElementBlock(
382
+ "span",
383
+ {
384
+ key: 0,
385
+ class: normalizeClass([
386
+ "plus-display-item__badge__dot",
387
+ getStatus.value.type && !getStatus.value.color ? "plus-display-item__badge__dot--" + getStatus.value.type : ""
388
+ ]),
389
+ style: normalizeStyle({ backgroundColor: getStatus.value.color })
390
+ },
391
+ null,
392
+ 6
393
+ /* CLASS, STYLE */
394
+ )) : createCommentVNode("v-if", true),
395
+ createTextVNode(
396
+ " " + toDisplayString(getStatus.value.label),
397
+ 1
398
+ /* TEXT */
399
+ )
400
+ ],
401
+ 64
402
+ /* STABLE_FRAGMENT */
403
+ )) : (openBlock(), createElementBlock(
404
+ Fragment,
405
+ { key: 1 },
406
+ [
407
+ createTextVNode(
408
+ toDisplayString(displayValue.value),
409
+ 1
410
+ /* TEXT */
411
+ )
412
+ ],
413
+ 64
414
+ /* STABLE_FRAGMENT */
415
+ ))
375
416
  ],
376
417
  16
377
418
  /* FULL_PROPS */
@@ -379,14 +420,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
379
420
  ],
380
421
  2112
381
422
  /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
382
- )) : _ctx.column.valueType === "tag" && displayValue.value ? (openBlock(), createElementBlock(
423
+ )) : _ctx.column.valueType === "tag" ? (openBlock(), createElementBlock(
383
424
  Fragment,
384
425
  { key: 9 },
385
426
  [
386
427
  createCommentVNode(" \u6807\u7B7E "),
387
- createVNode(
428
+ rawValue.value !== "" && rawValue.value !== null && rawValue.value !== void 0 ? (openBlock(), createBlock(
388
429
  unref(ElTag),
389
- mergeProps({ class: "plus-display-item" }, customFieldProps.value),
430
+ mergeProps({
431
+ key: 0,
432
+ class: "plus-display-item"
433
+ }, customFieldProps.value),
390
434
  createSlots({
391
435
  default: withCtx(() => [
392
436
  createTextVNode(
@@ -415,10 +459,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
415
459
  ]),
416
460
  1040
417
461
  /* FULL_PROPS, DYNAMIC_SLOTS */
418
- )
462
+ )) : (openBlock(), createElementBlock(
463
+ "span",
464
+ _hoisted_2,
465
+ toDisplayString(displayValue.value),
466
+ 1
467
+ /* TEXT */
468
+ ))
419
469
  ],
420
- 2112
421
- /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
470
+ 64
471
+ /* STABLE_FRAGMENT */
422
472
  )) : _ctx.column.valueType === "progress" ? (openBlock(), createElementBlock(
423
473
  Fragment,
424
474
  { key: 10 },
@@ -454,7 +504,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
454
504
  { key: 11 },
455
505
  [
456
506
  createCommentVNode(" \u590D\u5236 "),
457
- createElementVNode("span", _hoisted_2, [
507
+ createElementVNode("span", _hoisted_3, [
458
508
  createTextVNode(
459
509
  toDisplayString(displayValue.value) + " ",
460
510
  1