@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
@@ -10,11 +10,15 @@ require('../../../hooks/index.js');
10
10
  const index$2 = require('../../render/index.js');
11
11
  const elementPlus = require('element-plus');
12
12
  const useGetOptions = require('../../../hooks/useGetOptions.js');
13
- const is = require('../../utils/is.js');
14
13
  const format = require('../../utils/format.js');
14
+ const is = require('../../utils/is.js');
15
15
 
16
16
  const _hoisted_1 = ["innerHTML"];
17
- const _hoisted_2 = { class: "plus-display-item" };
17
+ const _hoisted_2 = {
18
+ key: 1,
19
+ class: "plus-display-item"
20
+ };
21
+ const _hoisted_3 = { class: "plus-display-item" };
18
22
  const _sfc_main = /* @__PURE__ */ vue.defineComponent({
19
23
  ...{
20
24
  name: "PlusDisplayItem"
@@ -37,9 +41,26 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
37
41
  const columns = vue.ref([]);
38
42
  const subRow = vue.ref(props.row);
39
43
  const customFieldPropsIsReady = vue.ref(false);
44
+ const rawValue = vue.computed(() => index.getValue(subRow.value, props.column.prop));
40
45
  const displayValue = vue.computed({
41
46
  get() {
42
- return index.getValue(subRow.value, props.column.prop);
47
+ var _a, _b;
48
+ const value = rawValue.value;
49
+ const isEmpty = value === "" || value === null || value === void 0;
50
+ if (isEmpty) {
51
+ switch (props.column.valueType) {
52
+ case "progress":
53
+ return 0;
54
+ default:
55
+ return ((_a = props.column.tableColumnProps) == null ? void 0 : _a.emptyText) || "-";
56
+ }
57
+ }
58
+ switch (props.column.valueType) {
59
+ case "date-picker":
60
+ return value ? format.formatDate(value) : ((_b = props.column.tableColumnProps) == null ? void 0 : _b.emptyText) || "-";
61
+ default:
62
+ return value;
63
+ }
43
64
  },
44
65
  set(value) {
45
66
  index.setValue(subRow.value, props.column.prop, value);
@@ -318,7 +339,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
318
339
  ],
319
340
  2112
320
341
  /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
321
- )) : _ctx.column.valueType === "date-picker" && displayValue.value ? (vue.openBlock(), vue.createElementBlock(
342
+ )) : _ctx.column.valueType === "date-picker" ? (vue.openBlock(), vue.createElementBlock(
322
343
  vue.Fragment,
323
344
  { key: 6 },
324
345
  [
@@ -326,7 +347,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
326
347
  vue.createElementVNode(
327
348
  "span",
328
349
  vue.mergeProps({ class: "plus-display-item" }, customFieldProps.value),
329
- vue.toDisplayString(vue.unref(format.formatDate)(displayValue.value)),
350
+ vue.toDisplayString(displayValue.value),
330
351
  17
331
352
  /* TEXT, FULL_PROPS */
332
353
  )
@@ -357,25 +378,45 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
357
378
  "span",
358
379
  vue.mergeProps({ class: "plus-display-item plus-display-item__badge" }, customFieldProps.value),
359
380
  [
360
- getStatus.value.color || getStatus.value.type ? (vue.openBlock(), vue.createElementBlock(
361
- "span",
362
- {
363
- key: 0,
364
- class: vue.normalizeClass([
365
- "plus-display-item__badge__dot",
366
- getStatus.value.type && !getStatus.value.color ? "plus-display-item__badge__dot--" + getStatus.value.type : ""
367
- ]),
368
- style: vue.normalizeStyle({ backgroundColor: getStatus.value.color })
369
- },
370
- null,
371
- 6
372
- /* CLASS, STYLE */
373
- )) : vue.createCommentVNode("v-if", true),
374
- vue.createTextVNode(
375
- " " + vue.toDisplayString(getStatus.value.label),
376
- 1
377
- /* TEXT */
378
- )
381
+ rawValue.value !== "" && rawValue.value !== null && rawValue.value !== void 0 ? (vue.openBlock(), vue.createElementBlock(
382
+ vue.Fragment,
383
+ { key: 0 },
384
+ [
385
+ getStatus.value.color || getStatus.value.type ? (vue.openBlock(), vue.createElementBlock(
386
+ "span",
387
+ {
388
+ key: 0,
389
+ class: vue.normalizeClass([
390
+ "plus-display-item__badge__dot",
391
+ getStatus.value.type && !getStatus.value.color ? "plus-display-item__badge__dot--" + getStatus.value.type : ""
392
+ ]),
393
+ style: vue.normalizeStyle({ backgroundColor: getStatus.value.color })
394
+ },
395
+ null,
396
+ 6
397
+ /* CLASS, STYLE */
398
+ )) : vue.createCommentVNode("v-if", true),
399
+ vue.createTextVNode(
400
+ " " + vue.toDisplayString(getStatus.value.label),
401
+ 1
402
+ /* TEXT */
403
+ )
404
+ ],
405
+ 64
406
+ /* STABLE_FRAGMENT */
407
+ )) : (vue.openBlock(), vue.createElementBlock(
408
+ vue.Fragment,
409
+ { key: 1 },
410
+ [
411
+ vue.createTextVNode(
412
+ vue.toDisplayString(displayValue.value),
413
+ 1
414
+ /* TEXT */
415
+ )
416
+ ],
417
+ 64
418
+ /* STABLE_FRAGMENT */
419
+ ))
379
420
  ],
380
421
  16
381
422
  /* FULL_PROPS */
@@ -383,14 +424,17 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
383
424
  ],
384
425
  2112
385
426
  /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
386
- )) : _ctx.column.valueType === "tag" && displayValue.value ? (vue.openBlock(), vue.createElementBlock(
427
+ )) : _ctx.column.valueType === "tag" ? (vue.openBlock(), vue.createElementBlock(
387
428
  vue.Fragment,
388
429
  { key: 9 },
389
430
  [
390
431
  vue.createCommentVNode(" \u6807\u7B7E "),
391
- vue.createVNode(
432
+ rawValue.value !== "" && rawValue.value !== null && rawValue.value !== void 0 ? (vue.openBlock(), vue.createBlock(
392
433
  vue.unref(elementPlus.ElTag),
393
- vue.mergeProps({ class: "plus-display-item" }, customFieldProps.value),
434
+ vue.mergeProps({
435
+ key: 0,
436
+ class: "plus-display-item"
437
+ }, customFieldProps.value),
394
438
  vue.createSlots({
395
439
  default: vue.withCtx(() => [
396
440
  vue.createTextVNode(
@@ -419,10 +463,16 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
419
463
  ]),
420
464
  1040
421
465
  /* FULL_PROPS, DYNAMIC_SLOTS */
422
- )
466
+ )) : (vue.openBlock(), vue.createElementBlock(
467
+ "span",
468
+ _hoisted_2,
469
+ vue.toDisplayString(displayValue.value),
470
+ 1
471
+ /* TEXT */
472
+ ))
423
473
  ],
424
- 2112
425
- /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
474
+ 64
475
+ /* STABLE_FRAGMENT */
426
476
  )) : _ctx.column.valueType === "progress" ? (vue.openBlock(), vue.createElementBlock(
427
477
  vue.Fragment,
428
478
  { key: 10 },
@@ -458,7 +508,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
458
508
  { key: 11 },
459
509
  [
460
510
  vue.createCommentVNode(" \u590D\u5236 "),
461
- vue.createElementVNode("span", _hoisted_2, [
511
+ vue.createElementVNode("span", _hoisted_3, [
462
512
  vue.createTextVNode(
463
513
  vue.toDisplayString(displayValue.value) + " ",
464
514
  1