cnhis-design-vue 3.4.0-beta.30 → 3.4.0-beta.32

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.
package/README.md CHANGED
@@ -1,87 +1,87 @@
1
- # 安装
2
-
3
- ```shell
4
- npm i cnhis-design-vue@[版本号]
5
- # or
6
- yarn add cnhis-design-vue@[版本号] #推荐
7
- ```
8
-
9
- ## 1.全局引入
10
-
11
- ```typescript
12
- // main.ts
13
- import { createApp } from 'vue';
14
- import App from './App.vue';
15
- import 'cnhis-design-vue/es/packages/index.css';
16
- import cui from 'cnhis-design-vue';
17
-
18
- const app = createApp(App);
19
- app.use(cui).mount('#app');
20
- ```
21
-
22
- ## 2. 按需引入
23
-
24
- 组件现在支持了自动按需引入, 但是样式文件需要额外的处理
25
-
26
- ### 2.1 样式处理方式1 (按需引入样式)
27
-
28
- ```shell
29
- # 安装自动导入样式的插件
30
- npm i -d vite-plugin-style-import
31
- ```
32
-
33
- ```typescript
34
- // vite.config.ts
35
- import { defineConfig } from 'vite';
36
- import { createStyleImportPlugin } from 'vite-plugin-style-import';
37
-
38
- export default defineConfig({
39
- plugins: [
40
- // ...otherPlugins
41
- createStyleImportPlugin({
42
- libs: [
43
- {
44
- libraryName: 'cnhis-design-vue',
45
- esModule: true,
46
- ensureStyleFile: true,
47
- resolveStyle: name => {
48
- return `cnhis-design-vue/es/components/${ name.slice(2) }/style/index.css`;
49
- }
50
- }
51
- ]
52
- })
53
- ]
54
- });
55
- ```
56
-
57
- ### 2.2 样式处理方式2 (全局引入样式)
58
-
59
- ```typescript
60
- // main.ts
61
- import 'cnhis-design-vue/es/components/index.css';
62
- ```
63
-
64
- ## 3.FAQ
65
-
66
- ### 3.1 项目打包后样式丢失
67
-
68
- 处理方法, 将 cnhis-design-vue 从 vendor 包中移除 (没有出现此问题则不需要)
69
-
70
- ```typescript
71
- // vite.config.ts
72
- import { defineConfig } from 'vite';
73
-
74
- export default defineConfig({
75
- build: {
76
- rollupOptions: {
77
- // ..otherOptions
78
- output: {
79
- dir: './dist',
80
- manualChunks: {
81
- 'cnhis-vendor': ['cnhis-design-vue']
82
- }
83
- }
84
- }
85
- }
86
- });
87
- ```
1
+ # 安装
2
+
3
+ ```shell
4
+ npm i cnhis-design-vue@[版本号]
5
+ # or
6
+ yarn add cnhis-design-vue@[版本号] #推荐
7
+ ```
8
+
9
+ ## 1.全局引入
10
+
11
+ ```typescript
12
+ // main.ts
13
+ import { createApp } from 'vue';
14
+ import App from './App.vue';
15
+ import 'cnhis-design-vue/es/packages/index.css';
16
+ import cui from 'cnhis-design-vue';
17
+
18
+ const app = createApp(App);
19
+ app.use(cui).mount('#app');
20
+ ```
21
+
22
+ ## 2. 按需引入
23
+
24
+ 组件现在支持了自动按需引入, 但是样式文件需要额外的处理
25
+
26
+ ### 2.1 样式处理方式1 (按需引入样式)
27
+
28
+ ```shell
29
+ # 安装自动导入样式的插件
30
+ npm i -d vite-plugin-style-import
31
+ ```
32
+
33
+ ```typescript
34
+ // vite.config.ts
35
+ import { defineConfig } from 'vite';
36
+ import { createStyleImportPlugin } from 'vite-plugin-style-import';
37
+
38
+ export default defineConfig({
39
+ plugins: [
40
+ // ...otherPlugins
41
+ createStyleImportPlugin({
42
+ libs: [
43
+ {
44
+ libraryName: 'cnhis-design-vue',
45
+ esModule: true,
46
+ ensureStyleFile: true,
47
+ resolveStyle: name => {
48
+ return `cnhis-design-vue/es/components/${ name.slice(2) }/style/index.css`;
49
+ }
50
+ }
51
+ ]
52
+ })
53
+ ]
54
+ });
55
+ ```
56
+
57
+ ### 2.2 样式处理方式2 (全局引入样式)
58
+
59
+ ```typescript
60
+ // main.ts
61
+ import 'cnhis-design-vue/es/components/index.css';
62
+ ```
63
+
64
+ ## 3.FAQ
65
+
66
+ ### 3.1 项目打包后样式丢失
67
+
68
+ 处理方法, 将 cnhis-design-vue 从 vendor 包中移除 (没有出现此问题则不需要)
69
+
70
+ ```typescript
71
+ // vite.config.ts
72
+ import { defineConfig } from 'vite';
73
+
74
+ export default defineConfig({
75
+ build: {
76
+ rollupOptions: {
77
+ // ..otherOptions
78
+ output: {
79
+ dir: './dist',
80
+ manualChunks: {
81
+ 'cnhis-vendor': ['cnhis-design-vue']
82
+ }
83
+ }
84
+ }
85
+ }
86
+ });
87
+ ```
@@ -124,6 +124,10 @@ declare const ButtonPrint: SFCWithInstall<import("vue").DefineComponent<import("
124
124
  hidePreviewBtns: {
125
125
  type: StringConstructor;
126
126
  };
127
+ isShowResetPrinter: {
128
+ type: BooleanConstructor;
129
+ default: boolean;
130
+ };
127
131
  }>, {
128
132
  $attrs: {
129
133
  [x: string]: unknown;
@@ -251,6 +255,10 @@ declare const ButtonPrint: SFCWithInstall<import("vue").DefineComponent<import("
251
255
  hidePreviewBtns: {
252
256
  type: StringConstructor;
253
257
  };
258
+ isShowResetPrinter: {
259
+ type: BooleanConstructor;
260
+ default: boolean;
261
+ };
254
262
  }>> & Readonly<{
255
263
  onSuccess?: ((...args: any[]) => any) | undefined;
256
264
  onError?: ((...args: any[]) => any) | undefined;
@@ -1085,6 +1093,9 @@ declare const ButtonPrint: SFCWithInstall<import("vue").DefineComponent<import("
1085
1093
  hidePreviewBtns: {
1086
1094
  type: StringConstructor;
1087
1095
  };
1096
+ isShowResetPrinter: {
1097
+ type: BooleanConstructor;
1098
+ };
1088
1099
  }>, {
1089
1100
  $attrs: {
1090
1101
  [x: string]: unknown;
@@ -1208,6 +1219,9 @@ declare const ButtonPrint: SFCWithInstall<import("vue").DefineComponent<import("
1208
1219
  hidePreviewBtns: {
1209
1220
  type: StringConstructor;
1210
1221
  };
1222
+ isShowResetPrinter: {
1223
+ type: BooleanConstructor;
1224
+ };
1211
1225
  }>> & Readonly<{}> & {}>;
1212
1226
  emit: any;
1213
1227
  defaultFormatInfo: import("../../shared/types").AnyObject;
@@ -1247,6 +1261,7 @@ declare const ButtonPrint: SFCWithInstall<import("vue").DefineComponent<import("
1247
1261
  handleClickPreview: () => Promise<void>;
1248
1262
  handleClickPdf: () => Promise<void>;
1249
1263
  handleClickEdit: () => void;
1264
+ handleResetPrinter: () => Promise<void>;
1250
1265
  handleSelect: (key: string, option: import("../../shared/types").AnyObject) => Promise<void>;
1251
1266
  handleClickOutside: () => void;
1252
1267
  instantiatePrintSDK: () => false | undefined;
@@ -1602,6 +1617,9 @@ declare const ButtonPrint: SFCWithInstall<import("vue").DefineComponent<import("
1602
1617
  hidePreviewBtns: {
1603
1618
  type: StringConstructor;
1604
1619
  };
1620
+ isShowResetPrinter: {
1621
+ type: BooleanConstructor;
1622
+ };
1605
1623
  }>> & Readonly<{}>, {
1606
1624
  params: import("../../shared/types").AnyObject[];
1607
1625
  btnText: string;
@@ -1626,6 +1644,7 @@ declare const ButtonPrint: SFCWithInstall<import("vue").DefineComponent<import("
1626
1644
  showLoading: boolean;
1627
1645
  hideButtons: unknown[];
1628
1646
  printCustomProps: Record<string, any>;
1647
+ isShowResetPrinter: boolean;
1629
1648
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>>;
1630
1649
  getProps: import("vue").ComputedRef<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
1631
1650
  printParams: {
@@ -1750,6 +1769,10 @@ declare const ButtonPrint: SFCWithInstall<import("vue").DefineComponent<import("
1750
1769
  hidePreviewBtns: {
1751
1770
  type: StringConstructor;
1752
1771
  };
1772
+ isShowResetPrinter: {
1773
+ type: BooleanConstructor;
1774
+ default: boolean;
1775
+ };
1753
1776
  }>> & Readonly<{
1754
1777
  onSuccess?: ((...args: any[]) => any) | undefined;
1755
1778
  onError?: ((...args: any[]) => any) | undefined;
@@ -1887,6 +1910,10 @@ declare const ButtonPrint: SFCWithInstall<import("vue").DefineComponent<import("
1887
1910
  hidePreviewBtns: {
1888
1911
  type: StringConstructor;
1889
1912
  };
1913
+ isShowResetPrinter: {
1914
+ type: BooleanConstructor;
1915
+ default: boolean;
1916
+ };
1890
1917
  }>> & Readonly<{
1891
1918
  onSuccess?: ((...args: any[]) => any) | undefined;
1892
1919
  onError?: ((...args: any[]) => any) | undefined;
@@ -1920,5 +1947,6 @@ declare const ButtonPrint: SFCWithInstall<import("vue").DefineComponent<import("
1920
1947
  printCustomProps: Record<string, any>;
1921
1948
  placement: string;
1922
1949
  newPrintSetting: Record<string, any>;
1950
+ isShowResetPrinter: boolean;
1923
1951
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>>;
1924
1952
  export default ButtonPrint;
@@ -127,6 +127,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
127
127
  hidePreviewBtns: {
128
128
  type: StringConstructor;
129
129
  };
130
+ isShowResetPrinter: {
131
+ type: BooleanConstructor;
132
+ default: boolean;
133
+ };
130
134
  }>, {
131
135
  $attrs: {
132
136
  [x: string]: unknown;
@@ -257,6 +261,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
257
261
  hidePreviewBtns: {
258
262
  type: StringConstructor;
259
263
  };
264
+ isShowResetPrinter: {
265
+ type: BooleanConstructor;
266
+ default: boolean;
267
+ };
260
268
  }>> & Readonly<{
261
269
  onSuccess?: ((...args: any[]) => any) | undefined;
262
270
  onError?: ((...args: any[]) => any) | undefined;
@@ -1091,6 +1099,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
1091
1099
  hidePreviewBtns: {
1092
1100
  type: StringConstructor;
1093
1101
  };
1102
+ isShowResetPrinter: {
1103
+ type: BooleanConstructor;
1104
+ };
1094
1105
  }>, {
1095
1106
  $attrs: {
1096
1107
  [x: string]: unknown;
@@ -1214,6 +1225,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
1214
1225
  hidePreviewBtns: {
1215
1226
  type: StringConstructor;
1216
1227
  };
1228
+ isShowResetPrinter: {
1229
+ type: BooleanConstructor;
1230
+ };
1217
1231
  }>> & Readonly<{}> & {}>;
1218
1232
  emit: any;
1219
1233
  defaultFormatInfo: AnyObject;
@@ -1253,6 +1267,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
1253
1267
  handleClickPreview: () => Promise<void>;
1254
1268
  handleClickPdf: () => Promise<void>;
1255
1269
  handleClickEdit: () => void;
1270
+ handleResetPrinter: () => Promise<void>;
1256
1271
  handleSelect: (key: string, option: AnyObject) => Promise<void>;
1257
1272
  handleClickOutside: () => void;
1258
1273
  instantiatePrintSDK: () => false | undefined;
@@ -1608,6 +1623,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
1608
1623
  hidePreviewBtns: {
1609
1624
  type: StringConstructor;
1610
1625
  };
1626
+ isShowResetPrinter: {
1627
+ type: BooleanConstructor;
1628
+ };
1611
1629
  }>> & Readonly<{}>, {
1612
1630
  params: AnyObject[];
1613
1631
  btnText: string;
@@ -1632,6 +1650,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
1632
1650
  showLoading: boolean;
1633
1651
  hideButtons: unknown[];
1634
1652
  printCustomProps: Record<string, any>;
1653
+ isShowResetPrinter: boolean;
1635
1654
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>>;
1636
1655
  getProps: import("vue").ComputedRef<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
1637
1656
  printParams: {
@@ -1759,6 +1778,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
1759
1778
  hidePreviewBtns: {
1760
1779
  type: StringConstructor;
1761
1780
  };
1781
+ isShowResetPrinter: {
1782
+ type: BooleanConstructor;
1783
+ default: boolean;
1784
+ };
1762
1785
  }>> & Readonly<{
1763
1786
  onSuccess?: ((...args: any[]) => any) | undefined;
1764
1787
  onError?: ((...args: any[]) => any) | undefined;
@@ -1899,6 +1922,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
1899
1922
  hidePreviewBtns: {
1900
1923
  type: StringConstructor;
1901
1924
  };
1925
+ isShowResetPrinter: {
1926
+ type: BooleanConstructor;
1927
+ default: boolean;
1928
+ };
1902
1929
  }>> & Readonly<{
1903
1930
  onSuccess?: ((...args: any[]) => any) | undefined;
1904
1931
  onError?: ((...args: any[]) => any) | undefined;
@@ -1932,5 +1959,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
1932
1959
  printCustomProps: Record<string, any>;
1933
1960
  placement: string;
1934
1961
  newPrintSetting: Record<string, any>;
1962
+ isShowResetPrinter: boolean;
1935
1963
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
1936
1964
  export default _default;
@@ -125,6 +125,10 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
125
125
  },
126
126
  hidePreviewBtns: {
127
127
  type: String
128
+ },
129
+ isShowResetPrinter: {
130
+ type: Boolean,
131
+ default: false
128
132
  }
129
133
  },
130
134
  emits: [
@@ -119,6 +119,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
119
119
  hidePreviewBtns: {
120
120
  type: StringConstructor;
121
121
  };
122
+ isShowResetPrinter: {
123
+ type: BooleanConstructor;
124
+ };
122
125
  }>, {
123
126
  $attrs: {
124
127
  [x: string]: unknown;
@@ -245,6 +248,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
245
248
  hidePreviewBtns: {
246
249
  type: StringConstructor;
247
250
  };
251
+ isShowResetPrinter: {
252
+ type: BooleanConstructor;
253
+ };
248
254
  }>> & Readonly<{}> & {}>;
249
255
  emit: any;
250
256
  defaultFormatInfo: AnyObject;
@@ -284,6 +290,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
284
290
  handleClickPreview: () => Promise<void>;
285
291
  handleClickPdf: () => Promise<void>;
286
292
  handleClickEdit: () => void;
293
+ handleResetPrinter: () => Promise<void>;
287
294
  handleSelect: (key: string, option: AnyObject) => Promise<void>;
288
295
  handleClickOutside: () => void;
289
296
  instantiatePrintSDK: () => false | undefined;
@@ -642,6 +649,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
642
649
  hidePreviewBtns: {
643
650
  type: StringConstructor;
644
651
  };
652
+ isShowResetPrinter: {
653
+ type: BooleanConstructor;
654
+ };
645
655
  }>> & Readonly<{}>, {
646
656
  params: AnyObject[];
647
657
  btnText: string;
@@ -666,5 +676,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
666
676
  showLoading: boolean;
667
677
  hideButtons: unknown[];
668
678
  printCustomProps: Record<string, any>;
679
+ isShowResetPrinter: boolean;
669
680
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
670
681
  export default _default;
@@ -125,6 +125,9 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
125
125
  },
126
126
  hidePreviewBtns: {
127
127
  type: String
128
+ },
129
+ isShowResetPrinter: {
130
+ type: Boolean
128
131
  }
129
132
  },
130
133
  setup(__props, {
@@ -167,6 +170,9 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
167
170
  }, {
168
171
  label: props.formatEditText,
169
172
  key: "formatEditText"
173
+ }, {
174
+ label: i18n("10010.1.484", "\u91CD\u7F6E\u6253\u5370\u673A"),
175
+ key: "resetPrinter"
170
176
  }, ...((_a = props.externalOptionConfig) == null ? void 0 : _a.options) || []]);
171
177
  const tempOptions = ref([]);
172
178
  const currentFormatItem = computed(() => {
@@ -433,6 +439,28 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
433
439
  state.spinning = false;
434
440
  });
435
441
  };
442
+ const handleResetPrinter = async () => {
443
+ if (props.showLoading && state.spinning)
444
+ return;
445
+ state.spinning = true;
446
+ props.prevFn("resetPrinter", {
447
+ formatId: state.currentFormatId,
448
+ templateId: getTemplateIdByFormatId.value
449
+ }).then(async () => {
450
+ const data = await printInstance.resetPrinter(state.currentFormatId, state.iReportExecuteMode);
451
+ state.spinning = false;
452
+ if ((data == null ? void 0 : data.result) == "success") {
453
+ $message.success((data == null ? void 0 : data.message) || i18n("10010.1.487", "\u91CD\u7F6E\u6253\u5370\u673A\u6210\u529F"));
454
+ return;
455
+ }
456
+ $message.warning((data == null ? void 0 : data.message) || i18n("10010.1.488", "\u91CD\u7F6E\u6253\u5370\u673A\u5931\u8D25"));
457
+ }).catch(() => {
458
+ prevFnError("resetPrinter");
459
+ state.spinning = false;
460
+ }).finally(() => {
461
+ state.visible = false;
462
+ });
463
+ };
436
464
  const handleSelect = async (key, option) => {
437
465
  var _a2, _b;
438
466
  switch (key) {
@@ -448,6 +476,9 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
448
476
  case "downloadPdf":
449
477
  handleClickPdf();
450
478
  break;
479
+ case "resetPrinter":
480
+ handleResetPrinter();
481
+ break;
451
482
  default: {
452
483
  state.visible = false;
453
484
  const formatObj = state.formatList.find((item) => item.id === key) || {};
@@ -548,6 +579,9 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
548
579
  if (isIReport(state.currentFormatId)) {
549
580
  options.value = tempOptions.value.filter((option) => option.key != "formatEditText");
550
581
  }
582
+ if (!props.isShowResetPrinter) {
583
+ options.value = options.value.filter((option) => option.key != "resetPrinter");
584
+ }
551
585
  };
552
586
  const formatFormatList = (list) => {
553
587
  let formatList = [];
@@ -601,7 +601,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
601
601
  }, {
602
602
  default: withCtx(() => [!unref(isAudioOrVideoMessage)(item.content) ? (openBlock(), createElementBlock(Fragment, {
603
603
  key: 0
604
- }, [createCommentVNode(' <n-button\r\n quaternary\r\n size="tiny"\r\n @click="(event: MouseEvent) => handleSelectLabel(event, item.id)"\r\n >\r\n <template #icon>\r\n <n-icon size="17" :component="HappyOutline" />\r\n </template>\r\n </n-button> '), createVNode(unref(NButton), {
604
+ }, [createCommentVNode(' <n-button\n quaternary\n size="tiny"\n @click="(event: MouseEvent) => handleSelectLabel(event, item.id)"\n >\n <template #icon>\n <n-icon size="17" :component="HappyOutline" />\n </template>\n </n-button> '), createVNode(unref(NButton), {
605
605
  quaternary: "",
606
606
  size: "tiny",
607
607
  onClick: () => setReferenceMsg(item)
@@ -170,7 +170,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
170
170
  round: "",
171
171
  size: 100,
172
172
  onClickCapture: _cache[0] || (_cache[0] = ($event) => showLargeAvatar.value = true)
173
- }, null, 8, ["src"]), createCommentVNode(' <n-upload abstract accept="image/*" @change="onChange">\r\n <n-upload-trigger #="{ handleClick }" abstract>\r\n <n-button\r\n circle\r\n secondary\r\n class="edit-avatar"\r\n v-show="userDetail.id === state.userInfo.id"\r\n @click="handleClick"\r\n >\r\n <template #icon>\r\n <n-icon size="16" color="#666666" :component="Camera" />\r\n </template>\r\n </n-button>\r\n </n-upload-trigger>\r\n </n-upload> '), createElementVNode("div", _hoisted_4, [createElementVNode("h4", null, [createElementVNode("label", _hoisted_5, toDisplayString(userDetail.name), 1), withDirectives(createElementVNode("label", {
173
+ }, null, 8, ["src"]), createCommentVNode(' <n-upload abstract accept="image/*" @change="onChange">\n <n-upload-trigger #="{ handleClick }" abstract>\n <n-button\n circle\n secondary\n class="edit-avatar"\n v-show="userDetail.id === state.userInfo.id"\n @click="handleClick"\n >\n <template #icon>\n <n-icon size="16" color="#666666" :component="Camera" />\n </template>\n </n-button>\n </n-upload-trigger>\n </n-upload> '), createElementVNode("div", _hoisted_4, [createElementVNode("h4", null, [createElementVNode("label", _hoisted_5, toDisplayString(userDetail.name), 1), withDirectives(createElementVNode("label", {
174
174
  class: normalizeClass(["iho-chatRole", unref(isDoctorRole)(userDetail.roleInfo) ? "isDoctor" : ""])
175
175
  }, toDisplayString(unref(getRoleName)(userDetail.roleInfo)), 3), [[vShow, unref(getRoleName)(userDetail.roleInfo)]])]), createElementVNode("p", null, toDisplayString(userDetail.orgName), 1)]), createVNode(unref(NButton), {
176
176
  strong: "",
@@ -35,9 +35,12 @@ function bindHeaderInfoAndFlatten(fieldList, depth) {
35
35
  Object.entries(fieldItem).forEach(([key, value]) => {
36
36
  if (!key.match(/^header_(\d+)$/))
37
37
  return;
38
+ if (key === `header_${depth}`)
39
+ return;
38
40
  if (value !== prevItem[key] || !value)
39
41
  return;
40
- if (key === `header_${depth}`)
42
+ const fieldKey = key + "_key";
43
+ if (fieldItem[fieldKey] && prevItem[fieldKey] && fieldItem[fieldKey] !== prevItem[fieldKey])
41
44
  return;
42
45
  fieldItem[`${key}_colspan`] = 0;
43
46
  fieldItem[`${key}_rowspan`] = 0;
@@ -47,6 +50,7 @@ function bindHeaderInfoAndFlatten(fieldList, depth) {
47
50
  function setHeaderInfo(field, depth2) {
48
51
  if (!field.parent) {
49
52
  field[`header_${depth2}`] = field.title;
53
+ field[`header_${depth2}_key`] = field.val_key;
50
54
  range(depth2 + 1).forEach((idx) => {
51
55
  field[`header_${idx}_colspan`] = idx === depth2 ? depth2 + 1 : 0;
52
56
  field[`header_${idx}_rowspan`] = idx === depth2 ? 1 : 0;
@@ -61,15 +65,17 @@ function bindHeaderInfoAndFlatten(fieldList, depth) {
61
65
  fieldLine.unshift(currentField);
62
66
  }
63
67
  range(depth2 + 1).forEach((index) => {
64
- var _a, _b;
68
+ var _a, _b, _c, _d;
65
69
  const item = fieldLine[index];
66
70
  if (!item) {
67
71
  field[`header_${index}`] = "";
72
+ field[`header_${index}_key`] = "";
68
73
  field[`header_${index}_colspan`] = 0;
69
74
  field[`header_${index}_rowspan`] = 0;
70
75
  return;
71
76
  }
72
77
  field[`header_${index}`] = (_b = (_a = fieldLine[index]) == null ? void 0 : _a.title) != null ? _b : "";
78
+ field[`header_${index}_key`] = (_d = (_c = fieldLine[index]) == null ? void 0 : _c.val_key) != null ? _d : "";
73
79
  field[`header_${index}_colspan`] = index < fieldDepth ? 1 : depth2 - fieldDepth + 1;
74
80
  field[`header_${index}_rowspan`] = getChildrenNum(item);
75
81
  });
package/es/env.d.ts CHANGED
@@ -1,25 +1,25 @@
1
- /// <reference types="vite/client" />
2
-
3
- interface ImportMetaEnv {
4
- readonly VITE_APP_TYPE: string;
5
- // 更多环境变量...
6
- }
7
-
8
- interface ImportMeta {
9
- readonly env: ImportMetaEnv;
10
- }
11
-
12
- declare module '*.vue' {
13
- // @ts-ignore
14
- import type { App, defineComponent } from 'vue';
15
- // // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types
16
- // // const component: DefineComponent<{}, {}, any>
17
- const component: ReturnType<typeof defineComponent> & {
18
- install(app: App): void;
19
- };
20
- // @ts-ignore
21
- export default component;
22
- }
23
-
24
- declare module '*.js';
25
-
1
+ /// <reference types="vite/client" />
2
+
3
+ interface ImportMetaEnv {
4
+ readonly VITE_APP_TYPE: string;
5
+ // 更多环境变量...
6
+ }
7
+
8
+ interface ImportMeta {
9
+ readonly env: ImportMetaEnv;
10
+ }
11
+
12
+ declare module '*.vue' {
13
+ // @ts-ignore
14
+ import type { App, defineComponent } from 'vue';
15
+ // // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types
16
+ // // const component: DefineComponent<{}, {}, any>
17
+ const component: ReturnType<typeof defineComponent> & {
18
+ install(app: App): void;
19
+ };
20
+ // @ts-ignore
21
+ export default component;
22
+ }
23
+
24
+ declare module '*.js';
25
+
@@ -1,5 +1,5 @@
1
1
  var name = "@cnhis-design-vue/shared";
2
- var version = "3.4.0-beta.30";
2
+ var version = "3.4.0-beta.32";
3
3
  var main = "index.ts";
4
4
  var peerDependencies = {
5
5
  "naive-ui": "^2.30.0",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cnhis-design-vue",
3
- "version": "3.4.0-beta.30",
3
+ "version": "3.4.0-beta.32",
4
4
  "license": "ISC",
5
5
  "module": "./es/components/index.js",
6
6
  "main": "./es/components/index.js",
@@ -73,5 +73,5 @@
73
73
  "iOS 7",
74
74
  "last 3 iOS versions"
75
75
  ],
76
- "gitHead": "5db80cf14a13537f6072106d3f97b61d3c1e1899"
76
+ "gitHead": "3151ed01535e9d9bd94b99b6adb9568906547f77"
77
77
  }