cnhis-design-vue 3.1.34-beta.8 → 3.1.34

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 (88) hide show
  1. package/README.md +123 -123
  2. package/es/components/big-table/index.d.ts +1 -41
  3. package/es/components/big-table/src/BigTable.vue.d.ts +10 -44
  4. package/es/components/big-table/src/BigTable.vue2.js +12 -557
  5. package/es/components/big-table/src/components/edit-form/edit-select.js +26 -19
  6. package/es/components/big-table/src/components/edit-form/useCommon.d.ts +1 -1
  7. package/es/components/big-table/src/hooks/useEvent.js +20 -2
  8. package/es/components/big-table/src/hooks/useFormat.js +1 -1
  9. package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
  10. package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +1 -0
  11. package/es/components/bpmn-workflow/types/ModelingModule.d.ts +1 -0
  12. package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +1 -0
  13. package/es/components/fabric-chart/src/hooks/useCenter.js +132 -58
  14. package/es/components/fabric-chart/src/hooks/useLeft.js +8 -5
  15. package/es/components/fabric-chart/src/hooks/useTemperatureChart.js +1 -1
  16. package/es/components/fabric-chart/src/utils/index.d.ts +6823 -0
  17. package/es/components/fabric-chart/src/utils/utils.d.ts +6 -6
  18. package/es/components/fabric-chart/src/utils/utils.js +4 -13
  19. package/es/components/form-config/index.d.ts +26 -8
  20. package/es/components/form-config/src/FormConfig.vue.d.ts +26 -8
  21. package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +4 -4
  22. package/es/components/form-config/src/components/FormConfigDragDisplay.vue.js +1 -0
  23. package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +14 -4
  24. package/es/components/form-config/src/hooks/useConfigurationField.js +7 -1
  25. package/es/components/form-config/src/types/index.d.ts +1 -0
  26. package/es/components/form-render/index.d.ts +4 -4
  27. package/es/components/form-render/src/FormRender.vue.d.ts +4 -4
  28. package/es/components/form-render/src/FormRender.vue.js +15 -5
  29. package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +4 -4
  30. package/es/components/form-render/src/components/renderer/formItem.js +2 -1
  31. package/es/components/form-render/src/components/renderer/jsonCombination/hooks/useDeepValidate.js +8 -8
  32. package/es/components/form-render/src/components/renderer/lineBar/FormCollapse.vue.d.ts +5 -0
  33. package/es/components/form-render/src/components/renderer/lineBar/FormCollapse.vue.js +20 -4
  34. package/es/components/form-render/src/components/renderer/lineBar/index.d.ts +5 -0
  35. package/es/components/form-render/src/hooks/useFieldListAdaptor.js +2 -2
  36. package/es/components/form-render/src/types/fieldItem.d.ts +8 -0
  37. package/es/components/form-render/src/utils/dom.d.ts +8 -2
  38. package/es/components/form-render/src/utils/dom.js +13 -6
  39. package/es/components/form-render/style/index.css +1 -1
  40. package/es/components/iho-table/src/IhoTable.vue.js +4 -0
  41. package/es/components/iho-table/src/constants/index.d.ts +4 -0
  42. package/es/components/iho-table/src/constants/index.js +6 -1
  43. package/es/components/iho-table/src/plugins/defaultConfigPlugin/index.js +11 -9
  44. package/es/components/iho-table/src/plugins/keyboardEventPlugin/index.js +1 -3
  45. package/es/components/iho-table/src/plugins/lowCodeFieldAdaptorPlugin/index.js +33 -5
  46. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/index.js +2 -2
  47. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/index.js +19 -2
  48. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/selectUtils.js +5 -9
  49. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/index.js +1 -1
  50. package/es/components/iho-table/src/plugins/virtualTreePlugin/index.js +23 -23
  51. package/es/components/iho-table/src/types/index.d.ts +2 -0
  52. package/es/components/iho-table/src/utils/index.d.ts +3 -1
  53. package/es/components/iho-table/src/utils/index.js +1 -1
  54. package/es/components/index.css +1 -1
  55. package/es/components/keyboard/index.d.ts +5 -4
  56. package/es/components/keyboard/src/Keyboard.vue.d.ts +5 -4
  57. package/es/components/keyboard/src/components/NumberPanel.vue.d.ts +1 -0
  58. package/es/components/keyboard/src/components/NumberPanel.vue.js +3 -2
  59. package/es/components/keyboard/style/index.css +1 -1
  60. package/es/components/shortcut-setter/index.d.ts +6 -4
  61. package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +6 -4
  62. package/es/shared/assets/img/failure.js +1 -1
  63. package/es/shared/assets/img/failure.png.js +1 -1
  64. package/es/shared/assets/img/icon-asc.js +1 -1
  65. package/es/shared/assets/img/icon-desc.js +1 -1
  66. package/es/shared/assets/img/no-permission.js +1 -1
  67. package/es/shared/assets/img/no-permission.png.js +1 -1
  68. package/es/shared/assets/img/nodata.js +1 -1
  69. package/es/shared/assets/img/nodata.png.js +1 -1
  70. package/es/shared/assets/img/notfound.js +1 -1
  71. package/es/shared/assets/img/notfound.png.js +1 -1
  72. package/es/shared/assets/img/qr.js +1 -1
  73. package/es/shared/assets/img/qr.png.js +1 -1
  74. package/es/shared/assets/img/success.js +1 -1
  75. package/es/shared/assets/img/success.png.js +1 -1
  76. package/es/shared/assets/img/video.js +1 -1
  77. package/es/shared/assets/img/video.png.js +1 -1
  78. package/es/shared/assets/img/video_default_cover.js +1 -1
  79. package/es/shared/assets/img/video_default_cover.png.js +1 -1
  80. package/es/shared/assets/img/video_hover.js +1 -1
  81. package/es/shared/assets/img/video_play_hover.js +1 -1
  82. package/es/shared/assets/img/xb_big.js +1 -1
  83. package/es/shared/assets/img/xb_big.png.js +1 -1
  84. package/es/shared/assets/img/xb_small.js +1 -1
  85. package/es/shared/assets/img/xb_small.png.js +1 -1
  86. package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +86 -0
  87. package/es/shared/utils/tapable/index.d.ts +139 -0
  88. package/package.json +2 -2
package/README.md CHANGED
@@ -1,123 +1,123 @@
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. 注意
65
-
66
- 由于 vxe-table 目前的引入方式是由组件 install 触发的,所以如果需要使用 c-grid/c-big-table 组件,需要全局注册二者任意一个
67
-
68
- ```typescript
69
- // main.ts
70
- import { createApp } from 'vue';
71
- import App from './App.vue';
72
-
73
- import { CGrid } from 'cnhis-design-vue';
74
- // 或者
75
- import { CBigTable } from 'cnhis-design-vue';
76
-
77
- const app = createApp(App);
78
- app.use(CGrid);
79
- // 或者
80
- app.use(CBigTable);
81
- app.mount('#app');
82
- ```
83
-
84
- ## 4.FAQ
85
-
86
- ### 4.1 项目打包后样式丢失
87
-
88
- > 处理方法, 将 cnhis-design-vue 从 vendor 包中移除
89
-
90
- ```typescript
91
- // vite.config.ts
92
- import { defineConfig } from 'vite';
93
-
94
- export default defineConfig({
95
- rollupOptions: {
96
- // ..otherOptions
97
- output: {
98
- dir: './dist',
99
- manualChunks(id: string) {
100
- if (id.includes('node_modules') && !id.includes('cnhis-design-vue')) {
101
- return 'vendor';
102
- }
103
- }
104
- }
105
- }
106
- });
107
- ```
108
-
109
- ### 4.2 找不到文件
110
-
111
- > 由于组件库输出文件类型由 js 修改成了 mjs, 如果配置了 resolve 属性的项目, 需要将 mjs 文件类型添加至 extensions 中
112
-
113
- ```javascript
114
- // vite.config.ts
115
- const config = {
116
- // ...otherOptions
117
- resolve: {
118
- // ...otherOptions
119
- // 如果没有配置, 则不用考虑
120
- extensions: ['.js', '.ts', '.vue', '.json', '.mjs']
121
- }
122
- };
123
- ```
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. 注意
65
+
66
+ 由于 vxe-table 目前的引入方式是由组件 install 触发的,所以如果需要使用 c-grid/c-big-table 组件,需要全局注册二者任意一个
67
+
68
+ ```typescript
69
+ // main.ts
70
+ import { createApp } from 'vue';
71
+ import App from './App.vue';
72
+
73
+ import { CGrid } from 'cnhis-design-vue';
74
+ // 或者
75
+ import { CBigTable } from 'cnhis-design-vue';
76
+
77
+ const app = createApp(App);
78
+ app.use(CGrid);
79
+ // 或者
80
+ app.use(CBigTable);
81
+ app.mount('#app');
82
+ ```
83
+
84
+ ## 4.FAQ
85
+
86
+ ### 4.1 项目打包后样式丢失
87
+
88
+ > 处理方法, 将 cnhis-design-vue 从 vendor 包中移除
89
+
90
+ ```typescript
91
+ // vite.config.ts
92
+ import { defineConfig } from 'vite';
93
+
94
+ export default defineConfig({
95
+ rollupOptions: {
96
+ // ..otherOptions
97
+ output: {
98
+ dir: './dist',
99
+ manualChunks(id: string) {
100
+ if (id.includes('node_modules') && !id.includes('cnhis-design-vue')) {
101
+ return 'vendor';
102
+ }
103
+ }
104
+ }
105
+ }
106
+ });
107
+ ```
108
+
109
+ ### 4.2 找不到文件
110
+
111
+ > 由于组件库输出文件类型由 js 修改成了 mjs, 如果配置了 resolve 属性的项目, 需要将 mjs 文件类型添加至 extensions 中
112
+
113
+ ```javascript
114
+ // vite.config.ts
115
+ const config = {
116
+ // ...otherOptions
117
+ resolve: {
118
+ // ...otherOptions
119
+ // 如果没有配置, 则不用考虑
120
+ extensions: ['.js', '.ts', '.vue', '.json', '.mjs']
121
+ }
122
+ };
123
+ ```
@@ -661,42 +661,7 @@ declare const BigTable: SFCWithInstall<import("vue").DefineComponent<{
661
661
  setGroupTitleToFristColumnFieldData: (formatList: any) => void;
662
662
  setCurrentPageRowChecked: () => void;
663
663
  setCurrentCheckedLength: () => void;
664
- formatColumns: (map: any) => ({
665
- fixed: string;
666
- align: string;
667
- visible: any;
668
- width: string;
669
- slots: {
670
- header: () => string;
671
- default: (params: any) => any;
672
- };
673
- type?: undefined;
674
- resizable?: undefined;
675
- showOverflow?: undefined;
676
- } | {
677
- type: string;
678
- fixed: string;
679
- align: string;
680
- visible: any;
681
- resizable: boolean;
682
- width: any;
683
- showOverflow: boolean;
684
- slots: {
685
- header: () => any[];
686
- default?: undefined;
687
- };
688
- } | {
689
- type: any;
690
- fixed: string;
691
- align: string;
692
- visible: boolean;
693
- resizable: boolean;
694
- width: any;
695
- slots: {
696
- default: (data: any) => any;
697
- } | null;
698
- showOverflow: boolean;
699
- })[];
664
+ formatColumns: (map: any) => any[];
700
665
  getRowData: (row: import("../../../es/shared/types").AnyObject) => {
701
666
  separateData: Record<string, string>;
702
667
  index: number;
@@ -917,11 +882,6 @@ declare const BigTable: SFCWithInstall<import("vue").DefineComponent<{
917
882
  }>;
918
883
  NIcon: any;
919
884
  CGrid: SFCWithInstall<import("vue").DefineComponent<{}, any, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>>;
920
- checkMethod: ({ row }: {
921
- row: any;
922
- }) => boolean;
923
- visibleMethod: ({ row }: any) => boolean;
924
- getRowStyle: ({ row }: any) => string | null;
925
885
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, string[], string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
926
886
  data: {
927
887
  type: ArrayConstructor;
@@ -199,7 +199,9 @@ declare const _default: import("vue").DefineComponent<{
199
199
  resetBatchEditRowStatus: FunctionConstructor;
200
200
  anchor: {
201
201
  type: import("vue").PropType<import("../../../shared/types").AnyObject[]>;
202
- default: () => never[];
202
+ default: () => never[]; /**
203
+ * computed
204
+ */
203
205
  };
204
206
  }, {
205
207
  _hideAllWrap: null;
@@ -558,7 +560,9 @@ declare const _default: import("vue").DefineComponent<{
558
560
  resetBatchEditRowStatus: FunctionConstructor;
559
561
  anchor: {
560
562
  type: import("vue").PropType<import("../../../shared/types").AnyObject[]>;
561
- default: () => never[];
563
+ default: () => never[]; /**
564
+ * computed
565
+ */
562
566
  };
563
567
  }>> & {
564
568
  [x: `on${string}`]: ((...args: any[]) => any) | undefined;
@@ -660,42 +664,7 @@ declare const _default: import("vue").DefineComponent<{
660
664
  setGroupTitleToFristColumnFieldData: (formatList: any) => void;
661
665
  setCurrentPageRowChecked: () => void;
662
666
  setCurrentCheckedLength: () => void;
663
- formatColumns: (map: any) => ({
664
- fixed: string;
665
- align: string;
666
- visible: any;
667
- width: string;
668
- slots: {
669
- header: () => string;
670
- default: (params: any) => any;
671
- };
672
- type?: undefined;
673
- resizable?: undefined;
674
- showOverflow?: undefined;
675
- } | {
676
- type: string;
677
- fixed: string;
678
- align: string;
679
- visible: any;
680
- resizable: boolean;
681
- width: any;
682
- showOverflow: boolean;
683
- slots: {
684
- header: () => any[];
685
- default?: undefined;
686
- };
687
- } | {
688
- type: any;
689
- fixed: string;
690
- align: string;
691
- visible: boolean;
692
- resizable: boolean;
693
- width: any;
694
- slots: {
695
- default: (data: any) => any;
696
- } | null;
697
- showOverflow: boolean;
698
- })[];
667
+ formatColumns: (map: any) => any[];
699
668
  getRowData: (row: import("../../../shared/types").AnyObject) => {
700
669
  separateData: Record<string, string>;
701
670
  index: number;
@@ -916,11 +885,6 @@ declare const _default: import("vue").DefineComponent<{
916
885
  }>;
917
886
  NIcon: any;
918
887
  CGrid: import("../../../shared/types").SFCWithInstall<import("vue").DefineComponent<{}, any, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>>;
919
- checkMethod: ({ row }: {
920
- row: any;
921
- }) => boolean;
922
- visibleMethod: ({ row }: any) => boolean;
923
- getRowStyle: ({ row }: any) => string | null;
924
888
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, string[], string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
925
889
  data: {
926
890
  type: ArrayConstructor;
@@ -1122,7 +1086,9 @@ declare const _default: import("vue").DefineComponent<{
1122
1086
  resetBatchEditRowStatus: FunctionConstructor;
1123
1087
  anchor: {
1124
1088
  type: import("vue").PropType<import("../../../shared/types").AnyObject[]>;
1125
- default: () => never[];
1089
+ default: () => never[]; /**
1090
+ * computed
1091
+ */
1126
1092
  };
1127
1093
  }>> & {
1128
1094
  [x: `on${string}`]: ((...args: any[]) => any) | undefined;