cnhis-design-vue 3.1.35-beta.1 → 3.1.35-beta.11

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 (57) hide show
  1. package/README.md +123 -123
  2. package/es/components/big-table/index.d.ts +14 -0
  3. package/es/components/big-table/src/BigTable.vue.d.ts +14 -0
  4. package/es/components/big-table/src/BigTable.vue2.js +594 -13
  5. package/es/components/big-table/src/components/edit-form/edit-separate.vue.d.ts +4 -0
  6. package/es/components/big-table/src/components/separate.vue.d.ts +1 -0
  7. package/es/components/big-table/src/hooks/useEdit.d.ts +4 -0
  8. package/es/components/big-table/src/hooks/useSeparateRow.d.ts +11 -1
  9. package/es/components/big-table/src/hooks/useSeparateRow.js +57 -12
  10. package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
  11. package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +1 -0
  12. package/es/components/bpmn-workflow/types/ModelingModule.d.ts +1 -0
  13. package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +1 -0
  14. package/es/components/fabric-chart/src/utils/index.d.ts +6823 -0
  15. package/es/components/form-config/src/components/FormConfigCreator.vue.js +1 -0
  16. package/es/components/form-config/src/hooks/useConfigurationField.js +7 -1
  17. package/es/components/form-render/src/components/renderer/combination.js +11 -3
  18. package/es/components/form-render/src/components/renderer/jsonCombination/index.js +7 -3
  19. package/es/components/index.css +1 -1
  20. package/es/components/info-header/index.d.ts +45 -0
  21. package/es/components/info-header/src/InfoHeader.vue.d.ts +39 -6
  22. package/es/components/info-header/src/InfoHeader.vue.js +40 -29
  23. package/es/components/info-header/style/index.css +1 -1
  24. package/es/components/keyboard/index.d.ts +34 -6
  25. package/es/components/keyboard/src/Keyboard.vue.d.ts +34 -6
  26. package/es/components/keyboard/src/Keyboard.vue.js +16 -12
  27. package/es/components/keyboard/src/components/InputNumber.vue.js +1 -1
  28. package/es/components/keyboard/src/components/NumberPanel.vue.d.ts +14 -4
  29. package/es/components/keyboard/src/components/NumberPanel.vue.js +88 -30
  30. package/es/components/keyboard/style/index.css +1 -1
  31. package/es/shared/assets/img/failure.js +1 -1
  32. package/es/shared/assets/img/failure.png.js +1 -1
  33. package/es/shared/assets/img/icon-asc.js +1 -1
  34. package/es/shared/assets/img/icon-desc.js +1 -1
  35. package/es/shared/assets/img/no-permission.js +1 -1
  36. package/es/shared/assets/img/no-permission.png.js +1 -1
  37. package/es/shared/assets/img/nodata.js +1 -1
  38. package/es/shared/assets/img/nodata.png.js +1 -1
  39. package/es/shared/assets/img/notfound.js +1 -1
  40. package/es/shared/assets/img/notfound.png.js +1 -1
  41. package/es/shared/assets/img/qr.js +1 -1
  42. package/es/shared/assets/img/qr.png.js +1 -1
  43. package/es/shared/assets/img/success.js +1 -1
  44. package/es/shared/assets/img/success.png.js +1 -1
  45. package/es/shared/assets/img/video.js +1 -1
  46. package/es/shared/assets/img/video.png.js +1 -1
  47. package/es/shared/assets/img/video_default_cover.js +1 -1
  48. package/es/shared/assets/img/video_default_cover.png.js +1 -1
  49. package/es/shared/assets/img/video_hover.js +1 -1
  50. package/es/shared/assets/img/video_play_hover.js +1 -1
  51. package/es/shared/assets/img/xb_big.js +1 -1
  52. package/es/shared/assets/img/xb_big.png.js +1 -1
  53. package/es/shared/assets/img/xb_small.js +1 -1
  54. package/es/shared/assets/img/xb_small.png.js +1 -1
  55. package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +86 -0
  56. package/es/shared/utils/tapable/index.d.ts +139 -0
  57. 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
+ ```
@@ -656,6 +656,13 @@ declare const BigTable: SFCWithInstall<import("vue").DefineComponent<{
656
656
  separate: (data: import("../../../es/shared/types").AnyObject[], rawData: import("../../../es/shared/types").AnyObject[]) => Promise<import("../../../es/shared/types").AnyObject[]>;
657
657
  onColumnResize: import("vxe-table").VxeTableEvents.ResizableChange;
658
658
  separateHandle: import("./src/hooks").SeparateHandle;
659
+ separateDataMap: import("vue").Ref<WeakMap<import("../../../es/shared/types").AnyObject, {
660
+ separateData: Record<string, string>;
661
+ index: number;
662
+ rawRow: import("../../../es/shared/types").AnyObject;
663
+ row: import("../../../es/shared/types").AnyObject;
664
+ colspans?: Record<string, number> | undefined;
665
+ }>>;
659
666
  onResizableChange: (payload: any) => void;
660
667
  loadData: (data: any) => Promise<void>;
661
668
  setGroupTitleToFristColumnFieldData: (formatList: any) => void;
@@ -667,6 +674,7 @@ declare const BigTable: SFCWithInstall<import("vue").DefineComponent<{
667
674
  index: number;
668
675
  rawRow: import("../../../es/shared/types").AnyObject;
669
676
  row: import("../../../es/shared/types").AnyObject;
677
+ colspans?: Record<string, number> | undefined;
670
678
  } | undefined;
671
679
  formatterEdit: (params: any, col: any) => any;
672
680
  getEditBtn: (row: any, col: any, index: any) => any;
@@ -702,6 +710,7 @@ declare const BigTable: SFCWithInstall<import("vue").DefineComponent<{
702
710
  }) => Promise<any>;
703
711
  getAsyncTableData: (params: any) => Promise<void>;
704
712
  setChecklist: (list: any) => any;
713
+ spanMethod: (payload: any) => any;
705
714
  colspanMethod: (payload: any) => any;
706
715
  footerRowspanMethod: (obj: any) => {
707
716
  rowspan: number;
@@ -882,6 +891,11 @@ declare const BigTable: SFCWithInstall<import("vue").DefineComponent<{
882
891
  }>;
883
892
  NIcon: any;
884
893
  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<{}>>, {}>>;
894
+ checkMethod: ({ row }: {
895
+ row: any;
896
+ }) => boolean;
897
+ visibleMethod: ({ row }: any) => boolean;
898
+ getRowStyle: ({ row }: any) => string | null;
885
899
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, string[], string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
886
900
  data: {
887
901
  type: ArrayConstructor;
@@ -655,6 +655,13 @@ declare const _default: import("vue").DefineComponent<{
655
655
  separate: (data: import("../../../shared/types").AnyObject[], rawData: import("../../../shared/types").AnyObject[]) => Promise<import("../../../shared/types").AnyObject[]>;
656
656
  onColumnResize: import("vxe-table").VxeTableEvents.ResizableChange;
657
657
  separateHandle: import("./hooks").SeparateHandle;
658
+ separateDataMap: import("vue").Ref<WeakMap<import("../../../shared/types").AnyObject, {
659
+ separateData: Record<string, string>;
660
+ index: number;
661
+ rawRow: import("../../../shared/types").AnyObject;
662
+ row: import("../../../shared/types").AnyObject;
663
+ colspans?: Record<string, number> | undefined;
664
+ }>>;
658
665
  onResizableChange: (payload: any) => void;
659
666
  loadData: (data: any) => Promise<void>;
660
667
  setGroupTitleToFristColumnFieldData: (formatList: any) => void;
@@ -666,6 +673,7 @@ declare const _default: import("vue").DefineComponent<{
666
673
  index: number;
667
674
  rawRow: import("../../../shared/types").AnyObject;
668
675
  row: import("../../../shared/types").AnyObject;
676
+ colspans?: Record<string, number> | undefined;
669
677
  } | undefined;
670
678
  formatterEdit: (params: any, col: any) => any;
671
679
  getEditBtn: (row: any, col: any, index: any) => any;
@@ -701,6 +709,7 @@ declare const _default: import("vue").DefineComponent<{
701
709
  }) => Promise<any>;
702
710
  getAsyncTableData: (params: any) => Promise<void>;
703
711
  setChecklist: (list: any) => any;
712
+ spanMethod: (payload: any) => any;
704
713
  colspanMethod: (payload: any) => any;
705
714
  footerRowspanMethod: (obj: any) => {
706
715
  rowspan: number;
@@ -881,6 +890,11 @@ declare const _default: import("vue").DefineComponent<{
881
890
  }>;
882
891
  NIcon: any;
883
892
  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<{}>>, {}>>;
893
+ checkMethod: ({ row }: {
894
+ row: any;
895
+ }) => boolean;
896
+ visibleMethod: ({ row }: any) => boolean;
897
+ getRowStyle: ({ row }: any) => string | null;
884
898
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, string[], string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
885
899
  data: {
886
900
  type: ArrayConstructor;