knt-shared 1.8.3 → 1.8.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.
@@ -1,4 +1,4 @@
1
- import { BasicDescriptionProps, DescriptionMethods } from './types';
1
+ import { BasicDescriptionProps, DescriptionAlignConfig, DescriptionMethods } from './types';
2
2
 
3
3
  declare function __VLS_template(): {
4
4
  title?(_: {}): any;
@@ -9,9 +9,10 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
9
9
  size: string;
10
10
  bordered: boolean;
11
11
  layout: string;
12
- labelAlign: string;
13
12
  align: string;
14
13
  colon: boolean;
14
+ showEmptyText: boolean;
15
+ emptyText: string;
15
16
  }>>, {
16
17
  setDescriptionProps: (props: Partial<BasicDescriptionProps>) => void;
17
18
  getDescriptionProps: () => BasicDescriptionProps;
@@ -22,19 +23,21 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
22
23
  size: string;
23
24
  bordered: boolean;
24
25
  layout: string;
25
- labelAlign: string;
26
26
  align: string;
27
27
  colon: boolean;
28
+ showEmptyText: boolean;
29
+ emptyText: string;
28
30
  }>>> & Readonly<{
29
31
  onRegister?: ((instance: DescriptionMethods) => any) | undefined;
30
32
  }>, {
31
33
  column: number | Partial<Record<"xxl" | "xl" | "lg" | "md" | "sm" | "xs", number>>;
32
- labelAlign: "left" | "center" | "right";
33
34
  size: "mini" | "small" | "medium" | "large";
34
35
  bordered: boolean;
35
36
  layout: "horizontal" | "vertical" | "inline-horizontal" | "inline-vertical";
36
37
  colon: boolean;
37
- align: "left" | "center" | "right";
38
+ align: import('./types').DescriptionTextAlign | DescriptionAlignConfig;
39
+ showEmptyText: boolean;
40
+ emptyText: string;
38
41
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
39
42
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
40
43
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"Bas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AC,CAAC,CAAC,GAAG;QACxE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;KACb,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CACT,CAAC;AACN,KAAK,cAAc,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC;AACxD,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAAE,QAAO;QAClD,MAAM,EAAE,CAAC,CAAC;KACT,CAAA;CAAE,CAAC"}
@@ -1,5 +1,10 @@
1
1
  import { CSSProperties, VNodeChild } from 'vue';
2
2
 
3
+ export type DescriptionTextAlign = 'left' | 'center' | 'right';
4
+ export interface DescriptionAlignConfig {
5
+ label?: DescriptionTextAlign;
6
+ value?: DescriptionTextAlign;
7
+ }
3
8
  /**
4
9
  * Description 数据项配置(基于 Arco Design Vue Descriptions)
5
10
  */
@@ -21,7 +26,7 @@ export interface DescItem {
21
26
  /** 动态判断当前项是否显示 */
22
27
  show?: (data: Recordable) => boolean;
23
28
  /** 自定义渲染内容 */
24
- render?: (val: any, data: Recordable) => VNodeChild | undefined | Element | string | number;
29
+ render?: (val: any, data: Recordable) => VNodeChild | undefined | null | Element | string | number;
25
30
  }
26
31
  /**
27
32
  * 帮助信息配置
@@ -44,8 +49,11 @@ export interface BasicDescriptionProps {
44
49
  data?: Recordable;
45
50
  /** 帮助信息配置 */
46
51
  helpMessageOptions?: HelpMessageOptions;
47
- /** 设置标签的对齐方式 */
48
- labelAlign?: 'left' | 'center' | 'right';
52
+ /**
53
+ * 设置标签的对齐方式
54
+ * @deprecated 请优先使用 align={{ label: 'left' }} 的形式
55
+ */
56
+ labelAlign?: DescriptionTextAlign;
49
57
  /** Descriptions 的尺寸 */
50
58
  size?: 'mini' | 'small' | 'medium' | 'large';
51
59
  /** 是否显示边框 */
@@ -55,7 +63,7 @@ export interface BasicDescriptionProps {
55
63
  /** 是否显示冒号 */
56
64
  colon?: boolean;
57
65
  /** 标签的文本对齐方式 */
58
- align?: 'left' | 'center' | 'right';
66
+ align?: DescriptionTextAlign | DescriptionAlignConfig;
59
67
  /** 自定义样式 */
60
68
  style?: CSSProperties;
61
69
  /** 自定义类名 */
@@ -63,11 +71,15 @@ export interface BasicDescriptionProps {
63
71
  /** 标题额外内容 */
64
72
  extra?: string;
65
73
  /** 描述中表格样式的 layout-fixed,当设置成 fixed 时,宽度会均分 */
66
- tableLayout?: string;
74
+ tableLayout?: 'auto' | 'fixed';
67
75
  /** 数据标签的样式 */
68
76
  labelStyle?: CSSProperties;
69
77
  /** 数据内容的样式 */
70
78
  valueStyle?: CSSProperties;
79
+ /** 是否在空值时显示默认占位文本 */
80
+ showEmptyText?: boolean;
81
+ /** 空值时展示的占位文本 */
82
+ emptyText?: string;
71
83
  }
72
84
  /**
73
85
  * Description 组件事件
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/Description/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAErD;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB,UAAU;IACV,KAAK,EAAE,MAAM,CAAC;IACd,UAAU;IACV,KAAK,EAAE,MAAM,CAAC;IACd,aAAa;IACb,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,aAAa;IACb,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,WAAW;IACX,UAAU,CAAC,EAAE,aAAa,CAAC;IAC3B,WAAW;IACX,YAAY,CAAC,EAAE,aAAa,CAAC;IAC7B,aAAa;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,kBAAkB;IAClB,IAAI,CAAC,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,OAAO,CAAC;IACrC,cAAc;IACd,MAAM,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,K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qB,CAAC;KAClD;CACF,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,UAAU,CAAC,CAAC,GAAG,GAAG,IAAI,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC"}
@@ -1187,6 +1187,10 @@ export declare const componentMap: {
1187
1187
  data: {
1188
1188
  type: import('vue').PropType<Record<string, any>>;
1189
1189
  };
1190
+ emptyText: {
1191
+ type: import('vue').PropType<string>;
1192
+ default: string;
1193
+ };
1190
1194
  onError: {
1191
1195
  type: import('vue').PropType<(error: Error, fileItem: import('..').UploadFileItem) => void>;
1192
1196
  };
@@ -1343,10 +1347,6 @@ export declare const componentMap: {
1343
1347
  preload: string;
1344
1348
  };
1345
1349
  };
1346
- emptyText: {
1347
- type: import('vue').PropType<string>;
1348
- default: string;
1349
- };
1350
1350
  showEmptyState: {
1351
1351
  type: import('vue').PropType<boolean>;
1352
1352
  default: boolean;
@@ -1390,6 +1390,7 @@ export declare const componentMap: {
1390
1390
  sortChange: (fileList: import('..').UploadFileItem[]) => void;
1391
1391
  }, import('vue').PublicProps, {
1392
1392
  name: string;
1393
+ emptyText: string;
1393
1394
  multiple: boolean;
1394
1395
  disabled: boolean;
1395
1396
  accept: string;
@@ -1417,7 +1418,6 @@ export declare const componentMap: {
1417
1418
  videoPreview: boolean;
1418
1419
  videoPreviewMode: import('..').VideoPreviewMode;
1419
1420
  videoPlayerOptions: import('..').VideoPlayerOptions;
1420
- emptyText: string;
1421
1421
  showEmptyState: boolean;
1422
1422
  }, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
1423
1423
  P: {};
@@ -1434,6 +1434,10 @@ export declare const componentMap: {
1434
1434
  data: {
1435
1435
  type: import('vue').PropType<Record<string, any>>;
1436
1436
  };
1437
+ emptyText: {
1438
+ type: import('vue').PropType<string>;
1439
+ default: string;
1440
+ };
1437
1441
  onError: {
1438
1442
  type: import('vue').PropType<(error: Error, fileItem: import('..').UploadFileItem) => void>;
1439
1443
  };
@@ -1590,10 +1594,6 @@ export declare const componentMap: {
1590
1594
  preload: string;
1591
1595
  };
1592
1596
  };
1593
- emptyText: {
1594
- type: import('vue').PropType<string>;
1595
- default: string;
1596
- };
1597
1597
  showEmptyState: {
1598
1598
  type: import('vue').PropType<boolean>;
1599
1599
  default: boolean;
@@ -1624,6 +1624,7 @@ export declare const componentMap: {
1624
1624
  updateFile: (fileItem: import('..').UploadFileItem) => void;
1625
1625
  }, {}, {}, {}, {
1626
1626
  name: string;
1627
+ emptyText: string;
1627
1628
  multiple: boolean;
1628
1629
  disabled: boolean;
1629
1630
  accept: string;
@@ -1651,7 +1652,6 @@ export declare const componentMap: {
1651
1652
  videoPreview: boolean;
1652
1653
  videoPreviewMode: import('..').VideoPreviewMode;
1653
1654
  videoPlayerOptions: import('..').VideoPlayerOptions;
1654
- emptyText: string;
1655
1655
  showEmptyState: boolean;
1656
1656
  }>;
1657
1657
  __isFragment?: never;
@@ -1665,6 +1665,10 @@ export declare const componentMap: {
1665
1665
  data: {
1666
1666
  type: import('vue').PropType<Record<string, any>>;
1667
1667
  };
1668
+ emptyText: {
1669
+ type: import('vue').PropType<string>;
1670
+ default: string;
1671
+ };
1668
1672
  onError: {
1669
1673
  type: import('vue').PropType<(error: Error, fileItem: import('..').UploadFileItem) => void>;
1670
1674
  };
@@ -1821,10 +1825,6 @@ export declare const componentMap: {
1821
1825
  preload: string;
1822
1826
  };
1823
1827
  };
1824
- emptyText: {
1825
- type: import('vue').PropType<string>;
1826
- default: string;
1827
- };
1828
1828
  showEmptyState: {
1829
1829
  type: import('vue').PropType<boolean>;
1830
1830
  default: boolean;
@@ -1868,6 +1868,7 @@ export declare const componentMap: {
1868
1868
  sortChange: (fileList: import('..').UploadFileItem[]) => void;
1869
1869
  }, string, {
1870
1870
  name: string;
1871
+ emptyText: string;
1871
1872
  multiple: boolean;
1872
1873
  disabled: boolean;
1873
1874
  accept: string;
@@ -1895,7 +1896,6 @@ export declare const componentMap: {
1895
1896
  videoPreview: boolean;
1896
1897
  videoPreviewMode: import('..').VideoPreviewMode;
1897
1898
  videoPlayerOptions: import('..').VideoPlayerOptions;
1898
- emptyText: string;
1899
1899
  showEmptyState: boolean;
1900
1900
  }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
1901
1901
  $slots: {
@@ -41,13 +41,13 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
41
41
  onClick?: ((item: ImageItem, index: number) => any) | undefined;
42
42
  onPreview?: ((item: ImageItem, index: number) => any) | undefined;
43
43
  }>, {
44
+ emptyText: string;
44
45
  height: number;
45
46
  width: number;
46
47
  gap: number;
47
48
  disabled: boolean;
48
49
  preview: boolean;
49
50
  maxCount: number;
50
- emptyText: string;
51
51
  loading: boolean;
52
52
  fit: import('./types').ImageFit;
53
53
  images: string[] | ImageItem[];
@@ -7,8 +7,8 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
7
7
  component: string;
8
8
  emptyText: string;
9
9
  }>>> & Readonly<{}>, {
10
- component: string;
11
10
  emptyText: string;
11
+ component: string;
12
12
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
13
13
  export default _default;
14
14
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
@@ -1177,6 +1177,10 @@ export declare const editComponentMap: {
1177
1177
  data: {
1178
1178
  type: import('vue').PropType<Record<string, any>>;
1179
1179
  };
1180
+ emptyText: {
1181
+ type: import('vue').PropType<string>;
1182
+ default: string;
1183
+ };
1180
1184
  onError: {
1181
1185
  type: import('vue').PropType<(error: Error, fileItem: import('../..').UploadFileItem) => void>;
1182
1186
  };
@@ -1333,10 +1337,6 @@ export declare const editComponentMap: {
1333
1337
  preload: string;
1334
1338
  };
1335
1339
  };
1336
- emptyText: {
1337
- type: import('vue').PropType<string>;
1338
- default: string;
1339
- };
1340
1340
  showEmptyState: {
1341
1341
  type: import('vue').PropType<boolean>;
1342
1342
  default: boolean;
@@ -1380,6 +1380,7 @@ export declare const editComponentMap: {
1380
1380
  sortChange: (fileList: import('../..').UploadFileItem[]) => void;
1381
1381
  }, import('vue').PublicProps, {
1382
1382
  name: string;
1383
+ emptyText: string;
1383
1384
  multiple: boolean;
1384
1385
  disabled: boolean;
1385
1386
  accept: string;
@@ -1407,7 +1408,6 @@ export declare const editComponentMap: {
1407
1408
  videoPreview: boolean;
1408
1409
  videoPreviewMode: import('../..').VideoPreviewMode;
1409
1410
  videoPlayerOptions: import('../..').VideoPlayerOptions;
1410
- emptyText: string;
1411
1411
  showEmptyState: boolean;
1412
1412
  }, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
1413
1413
  P: {};
@@ -1424,6 +1424,10 @@ export declare const editComponentMap: {
1424
1424
  data: {
1425
1425
  type: import('vue').PropType<Record<string, any>>;
1426
1426
  };
1427
+ emptyText: {
1428
+ type: import('vue').PropType<string>;
1429
+ default: string;
1430
+ };
1427
1431
  onError: {
1428
1432
  type: import('vue').PropType<(error: Error, fileItem: import('../..').UploadFileItem) => void>;
1429
1433
  };
@@ -1580,10 +1584,6 @@ export declare const editComponentMap: {
1580
1584
  preload: string;
1581
1585
  };
1582
1586
  };
1583
- emptyText: {
1584
- type: import('vue').PropType<string>;
1585
- default: string;
1586
- };
1587
1587
  showEmptyState: {
1588
1588
  type: import('vue').PropType<boolean>;
1589
1589
  default: boolean;
@@ -1614,6 +1614,7 @@ export declare const editComponentMap: {
1614
1614
  updateFile: (fileItem: import('../..').UploadFileItem) => void;
1615
1615
  }, {}, {}, {}, {
1616
1616
  name: string;
1617
+ emptyText: string;
1617
1618
  multiple: boolean;
1618
1619
  disabled: boolean;
1619
1620
  accept: string;
@@ -1641,7 +1642,6 @@ export declare const editComponentMap: {
1641
1642
  videoPreview: boolean;
1642
1643
  videoPreviewMode: import('../..').VideoPreviewMode;
1643
1644
  videoPlayerOptions: import('../..').VideoPlayerOptions;
1644
- emptyText: string;
1645
1645
  showEmptyState: boolean;
1646
1646
  }>;
1647
1647
  __isFragment?: never;
@@ -1655,6 +1655,10 @@ export declare const editComponentMap: {
1655
1655
  data: {
1656
1656
  type: import('vue').PropType<Record<string, any>>;
1657
1657
  };
1658
+ emptyText: {
1659
+ type: import('vue').PropType<string>;
1660
+ default: string;
1661
+ };
1658
1662
  onError: {
1659
1663
  type: import('vue').PropType<(error: Error, fileItem: import('../..').UploadFileItem) => void>;
1660
1664
  };
@@ -1811,10 +1815,6 @@ export declare const editComponentMap: {
1811
1815
  preload: string;
1812
1816
  };
1813
1817
  };
1814
- emptyText: {
1815
- type: import('vue').PropType<string>;
1816
- default: string;
1817
- };
1818
1818
  showEmptyState: {
1819
1819
  type: import('vue').PropType<boolean>;
1820
1820
  default: boolean;
@@ -1858,6 +1858,7 @@ export declare const editComponentMap: {
1858
1858
  sortChange: (fileList: import('../..').UploadFileItem[]) => void;
1859
1859
  }, string, {
1860
1860
  name: string;
1861
+ emptyText: string;
1861
1862
  multiple: boolean;
1862
1863
  disabled: boolean;
1863
1864
  accept: string;
@@ -1885,7 +1886,6 @@ export declare const editComponentMap: {
1885
1886
  videoPreview: boolean;
1886
1887
  videoPreviewMode: import('../..').VideoPreviewMode;
1887
1888
  videoPlayerOptions: import('../..').VideoPlayerOptions;
1888
- emptyText: string;
1889
1889
  showEmptyState: boolean;
1890
1890
  }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
1891
1891
  $slots: {
@@ -123,6 +123,7 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
123
123
  onSortChange?: ((fileList: UploadFileItem[]) => any) | undefined;
124
124
  }>, {
125
125
  name: string;
126
+ emptyText: string;
126
127
  multiple: boolean;
127
128
  disabled: boolean;
128
129
  accept: string;
@@ -150,7 +151,6 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
150
151
  videoPreview: boolean;
151
152
  videoPreviewMode: import('./types').VideoPreviewMode;
152
153
  videoPlayerOptions: import('./types').VideoPlayerOptions;
153
- emptyText: string;
154
154
  showEmptyState: boolean;
155
155
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
156
156
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
package/dist/index.cjs.js CHANGED
@@ -9315,7 +9315,7 @@ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
9315
9315
  schema: {},
9316
9316
  data: {},
9317
9317
  helpMessageOptions: {},
9318
- labelAlign: { default: "left" },
9318
+ labelAlign: {},
9319
9319
  size: { default: "medium" },
9320
9320
  bordered: { type: Boolean, default: true },
9321
9321
  layout: { default: "horizontal" },
@@ -9326,7 +9326,9 @@ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
9326
9326
  extra: {},
9327
9327
  tableLayout: {},
9328
9328
  labelStyle: {},
9329
- valueStyle: {}
9329
+ valueStyle: {},
9330
+ showEmptyText: { type: Boolean, default: false },
9331
+ emptyText: { default: "-" }
9330
9332
  },
9331
9333
  emits: ["register"],
9332
9334
  setup(__props, { expose: __expose, emit: __emit }) {
@@ -9346,21 +9348,59 @@ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
9346
9348
  data: {
9347
9349
  type: Object,
9348
9350
  default: () => ({})
9351
+ },
9352
+ showEmptyText: {
9353
+ type: Boolean,
9354
+ default: false
9355
+ },
9356
+ emptyText: {
9357
+ type: String,
9358
+ default: "-"
9349
9359
  }
9350
9360
  },
9351
9361
  setup(props2) {
9352
9362
  return () => {
9353
9363
  const result = props2.render(props2.value, props2.data);
9354
- if (typeof result === "string" || typeof result === "number") {
9355
- return vue.h("span", result);
9364
+ if (isEmptyValue(result)) {
9365
+ return props2.showEmptyText ? vue.h("span", props2.emptyText) : null;
9366
+ }
9367
+ if (typeof result === "string" || typeof result === "number" || typeof result === "boolean") {
9368
+ return vue.h("span", String(result));
9356
9369
  }
9357
9370
  return result;
9358
9371
  };
9359
9372
  }
9360
9373
  });
9374
+ const isEmptyValue = (value) => {
9375
+ return value === "" || value === null || value === void 0;
9376
+ };
9361
9377
  const getProps = vue.computed(() => {
9362
9378
  return { ...props, ...vue.unref(propsRef) };
9363
9379
  });
9380
+ const getDisplayValue = (value) => {
9381
+ const propsData = vue.unref(getProps);
9382
+ if (isEmptyValue(value)) {
9383
+ return propsData.showEmptyText ? propsData.emptyText ?? "-" : "";
9384
+ }
9385
+ return value;
9386
+ };
9387
+ const getResolvedAlign = vue.computed(() => {
9388
+ const propsData = vue.unref(getProps);
9389
+ const { align, labelAlign } = propsData;
9390
+ if (!labelAlign) {
9391
+ return align;
9392
+ }
9393
+ if (align && typeof align === "object") {
9394
+ return {
9395
+ ...align,
9396
+ label: labelAlign
9397
+ };
9398
+ }
9399
+ return {
9400
+ label: labelAlign,
9401
+ value: align
9402
+ };
9403
+ });
9364
9404
  const getBindValue = vue.computed(() => {
9365
9405
  const propsData = vue.unref(getProps);
9366
9406
  return {
@@ -9368,9 +9408,7 @@ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
9368
9408
  size: propsData.size,
9369
9409
  bordered: propsData.bordered,
9370
9410
  layout: propsData.layout,
9371
- labelAlign: propsData.labelAlign,
9372
- align: propsData.align,
9373
- colon: propsData.colon,
9411
+ align: vue.unref(getResolvedAlign),
9374
9412
  style: propsData.style,
9375
9413
  class: propsData.class,
9376
9414
  tableLayout: propsData.tableLayout,
@@ -9399,6 +9437,13 @@ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
9399
9437
  }
9400
9438
  return data[field];
9401
9439
  };
9440
+ const getLabelText = (label) => {
9441
+ const propsData = vue.unref(getProps);
9442
+ if (!propsData.colon || /[::]\s*$/.test(label)) {
9443
+ return label;
9444
+ }
9445
+ return `${label}:`;
9446
+ };
9402
9447
  const getLabelStyle = (item) => {
9403
9448
  const style = { ...item.labelStyle };
9404
9449
  if (item.labelMinWidth) {
@@ -9480,7 +9525,7 @@ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
9480
9525
  label: vue.withCtx(() => [
9481
9526
  vue.createElementVNode("div", {
9482
9527
  style: vue.normalizeStyle(getLabelStyle(item))
9483
- }, vue.toDisplayString(item.label), 5)
9528
+ }, vue.toDisplayString(getLabelText(item.label)), 5)
9484
9529
  ]),
9485
9530
  default: vue.withCtx(() => [
9486
9531
  vue.createElementVNode("div", {
@@ -9490,9 +9535,11 @@ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
9490
9535
  key: 0,
9491
9536
  render: item.render,
9492
9537
  value: getFieldValue(item.field),
9493
- data: getProps.value.data || {}
9494
- }, null, 8, ["render", "value", "data"])) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
9495
- vue.createTextVNode(vue.toDisplayString(getFieldValue(item.field)), 1)
9538
+ data: getProps.value.data || {},
9539
+ "show-empty-text": getProps.value.showEmptyText,
9540
+ "empty-text": getProps.value.emptyText || "-"
9541
+ }, null, 8, ["render", "value", "data", "show-empty-text", "empty-text"])) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
9542
+ vue.createTextVNode(vue.toDisplayString(getDisplayValue(getFieldValue(item.field))), 1)
9496
9543
  ], 64))
9497
9544
  ], 4)
9498
9545
  ]),
@@ -9506,7 +9553,7 @@ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
9506
9553
  };
9507
9554
  }
9508
9555
  });
9509
- const BasicDescription = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-f93aecf8"]]);
9556
+ const BasicDescription = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-93ccbd39"]]);
9510
9557
  function useDescription(props) {
9511
9558
  const descriptionRef = vue.ref(null);
9512
9559
  const loadedRef = vue.ref(false);