cnhis-design-vue 3.1.33-beta.20 → 3.1.33-beta.22

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 (71) hide show
  1. package/README.md +123 -123
  2. package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
  3. package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +1 -0
  4. package/es/components/bpmn-workflow/types/ModelingModule.d.ts +1 -0
  5. package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +1 -0
  6. package/es/components/fabric-chart/index.d.ts +4 -0
  7. package/es/components/fabric-chart/src/FabricChart.vue.d.ts +10 -5
  8. package/es/components/fabric-chart/src/FabricChart.vue.js +21 -6
  9. package/es/components/fabric-chart/src/components/PopupMenu.js +1 -1
  10. package/es/components/fabric-chart/src/components/PopupTip.vue.js +1 -1
  11. package/es/components/fabric-chart/src/hooks/useCenter.js +5 -4
  12. package/es/components/fabric-chart/src/utils/index.d.ts +6823 -0
  13. package/es/components/iho-table/index.d.ts +4 -3
  14. package/es/components/iho-table/src/IhoTable.vue.d.ts +4 -3
  15. package/es/components/iho-table/src/IhoTable.vue.js +6 -4
  16. package/es/components/iho-table/src/components/IhoTableColumn.js +1 -1
  17. package/es/components/iho-table/src/constants/index.d.ts +3 -3
  18. package/es/components/iho-table/src/constants/index.js +0 -1
  19. package/es/components/iho-table/src/hooks/tapHooks/index.d.ts +5 -1
  20. package/es/components/iho-table/src/hooks/tapHooks/index.js +10 -9
  21. package/es/components/iho-table/src/hooks/tapHooks/useDataHooks.d.ts +2 -2
  22. package/es/components/iho-table/src/hooks/tapHooks/useEventHooks.d.ts +119 -119
  23. package/es/components/iho-table/src/hooks/tapHooks/useExposeHooks.d.ts +5 -3
  24. package/es/components/iho-table/src/hooks/tapHooks/useExposeHooks.js +1 -1
  25. package/es/components/iho-table/src/hooks/tapHooks/useFieldHooks.d.ts +16 -4
  26. package/es/components/iho-table/src/hooks/tapHooks/useFieldHooks.js +9 -4
  27. package/es/components/iho-table/src/plugins/defaultConfigPlugin/index.js +1 -1
  28. package/es/components/iho-table/src/plugins/filterPlugin/filter.vue.d.ts +51 -24
  29. package/es/components/iho-table/src/plugins/filterPlugin/filter.vue.js +37 -51
  30. package/es/components/iho-table/src/plugins/filterPlugin/index.js +181 -20
  31. package/es/components/iho-table/src/plugins/filterPlugin/types.d.ts +2 -6
  32. package/es/components/iho-table/src/plugins/filterPlugin/types.js +0 -7
  33. package/es/components/iho-table/src/plugins/index.js +1 -1
  34. package/es/components/iho-table/src/plugins/keyboardEventPlugin/index.js +1 -1
  35. package/es/components/iho-table/src/plugins/lowCodeFieldAdaptorPlugin/index.js +6 -4
  36. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/editSeparate.vue.js +3 -1
  37. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/index.js +3 -3
  38. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/checkRendererPlugin.js +3 -5
  39. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/seqRendererPlugin.js +5 -2
  40. package/es/components/iho-table/src/plugins/virtualTreePlugin/index.js +1 -1
  41. package/es/components/iho-table/src/types/index.d.ts +7 -12
  42. package/es/components/iho-table/src/types/pluginType.d.ts +28 -12
  43. package/es/components/iho-table/style/index.css +1 -1
  44. package/es/components/index.css +1 -1
  45. package/es/shared/assets/img/failure.js +1 -1
  46. package/es/shared/assets/img/failure.png.js +1 -1
  47. package/es/shared/assets/img/icon-asc.js +1 -1
  48. package/es/shared/assets/img/icon-desc.js +1 -1
  49. package/es/shared/assets/img/no-permission.js +1 -1
  50. package/es/shared/assets/img/no-permission.png.js +1 -1
  51. package/es/shared/assets/img/nodata.js +1 -1
  52. package/es/shared/assets/img/nodata.png.js +1 -1
  53. package/es/shared/assets/img/notfound.js +1 -1
  54. package/es/shared/assets/img/notfound.png.js +1 -1
  55. package/es/shared/assets/img/qr.js +1 -1
  56. package/es/shared/assets/img/qr.png.js +1 -1
  57. package/es/shared/assets/img/success.js +1 -1
  58. package/es/shared/assets/img/success.png.js +1 -1
  59. package/es/shared/assets/img/video.js +1 -1
  60. package/es/shared/assets/img/video.png.js +1 -1
  61. package/es/shared/assets/img/video_default_cover.js +1 -1
  62. package/es/shared/assets/img/video_default_cover.png.js +1 -1
  63. package/es/shared/assets/img/video_hover.js +1 -1
  64. package/es/shared/assets/img/video_play_hover.js +1 -1
  65. package/es/shared/assets/img/xb_big.js +1 -1
  66. package/es/shared/assets/img/xb_big.png.js +1 -1
  67. package/es/shared/assets/img/xb_small.js +1 -1
  68. package/es/shared/assets/img/xb_small.png.js +1 -1
  69. package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +86 -0
  70. package/es/shared/utils/tapable/index.d.ts +139 -0
  71. 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
+ ```
@@ -0,0 +1 @@
1
+ declare module 'bpmn-js/lib/Viewer';
@@ -0,0 +1 @@
1
+ declare module 'bpmn-js/lib/features/modeling';
@@ -0,0 +1 @@
1
+ declare module 'diagram-js/lib/navigation/movecanvas';
@@ -5,6 +5,9 @@ declare const FabricChart: SFCWithInstall<import("vue").DefineComponent<{
5
5
  default: string;
6
6
  };
7
7
  }, {
8
+ attrs: {
9
+ [x: string]: unknown;
10
+ };
8
11
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
9
12
  mode: {
10
13
  type: import("vue").PropType<import("./src/interface").IMode>;
@@ -12,6 +15,7 @@ declare const FabricChart: SFCWithInstall<import("vue").DefineComponent<{
12
15
  };
13
16
  }>> & {}>>;
14
17
  isTemperature: import("vue").ComputedRef<boolean>;
18
+ style: import("vue").ComputedRef<import("vue").CSSProperties>;
15
19
  fabricChartRef: import("vue").Ref<any>;
16
20
  redrawPoints: () => void;
17
21
  select: (key: string) => void;
@@ -1,4 +1,5 @@
1
- import { PropType } from 'vue';
1
+ import { PropType, CSSProperties } from 'vue';
2
+ import { AnyObject } from '../../../../es/shared/types';
2
3
  import { IMode } from './interface';
3
4
  declare const _default: import("vue").DefineComponent<{
4
5
  mode: {
@@ -6,6 +7,9 @@ declare const _default: import("vue").DefineComponent<{
6
7
  default: string;
7
8
  };
8
9
  }, {
10
+ attrs: {
11
+ [x: string]: unknown;
12
+ };
9
13
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
10
14
  mode: {
11
15
  type: PropType<IMode>;
@@ -13,6 +17,7 @@ declare const _default: import("vue").DefineComponent<{
13
17
  };
14
18
  }>> & {}>>;
15
19
  isTemperature: import("vue").ComputedRef<boolean>;
20
+ style: import("vue").ComputedRef<CSSProperties>;
16
21
  fabricChartRef: import("vue").Ref<any>;
17
22
  redrawPoints: () => void;
18
23
  select: (key: string) => void;
@@ -135,7 +140,7 @@ declare const _default: import("vue").DefineComponent<{
135
140
  show: boolean;
136
141
  point: import("./interface").ICoordinateValue;
137
142
  list: string[];
138
- propItems: import("../../../shared/types").AnyObject;
143
+ propItems: AnyObject;
139
144
  };
140
145
  pointStyle: import("vue").ComputedRef<{
141
146
  top: string;
@@ -246,8 +251,8 @@ declare const _default: import("vue").DefineComponent<{
246
251
  onDelete?: ((...args: any[]) => any) | undefined;
247
252
  }>>;
248
253
  emits: (event: "delete" | "change" | "add" | "select", ...args: any[]) => void;
249
- leftScales: import("vue").ComputedRef<import("../../../shared/types").AnyObject[]>;
250
- rightScales: import("vue").ComputedRef<import("../../../shared/types").AnyObject[]>;
254
+ leftScales: import("vue").ComputedRef<AnyObject[]>;
255
+ rightScales: import("vue").ComputedRef<AnyObject[]>;
251
256
  leftAddAreaWidth: number;
252
257
  rightAddAreaWidth: import("vue").ComputedRef<0 | 30>;
253
258
  originX: import("vue").ComputedRef<number>;
@@ -314,7 +319,7 @@ declare const _default: import("vue").DefineComponent<{
314
319
  show: boolean;
315
320
  point: import("./interface").ICoordinateValue;
316
321
  list: string[];
317
- propItems: import("../../../shared/types").AnyObject;
322
+ propItems: AnyObject;
318
323
  };
319
324
  pointStyle: import("vue").ComputedRef<{
320
325
  top: string;
@@ -1,4 +1,4 @@
1
- import { defineComponent, computed, ref, unref, openBlock, createBlock, mergeProps } from 'vue';
1
+ import { defineComponent, useAttrs, computed, ref, openBlock, createElementBlock, normalizeStyle, unref, createBlock, mergeProps } from 'vue';
2
2
  import TemperatureChart from './TemperatureChart.vue.js';
3
3
  import BirthProcessChart from './BirthProcessChart.vue.js';
4
4
  import _export_sfc from '../../../_virtual/plugin-vue_export-helper.js';
@@ -11,7 +11,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
11
11
  setup(__props, { expose }) {
12
12
  var _a;
13
13
  const props = __props;
14
+ const attrs = useAttrs();
14
15
  const isTemperature = computed(() => props.mode === "temperature");
16
+ const style = computed(() => {
17
+ const data = attrs.data;
18
+ const _style = {
19
+ width: ((data == null ? void 0 : data.width) || 800) + "px",
20
+ height: ((data == null ? void 0 : data.height) || 700) + "px",
21
+ position: "relative"
22
+ };
23
+ return _style;
24
+ });
15
25
  const fabricChartRef = ref();
16
26
  function redrawPoints() {
17
27
  var _a2;
@@ -28,11 +38,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
28
38
  canvas
29
39
  });
30
40
  return (_ctx, _cache) => {
31
- return unref(isTemperature) ? (openBlock(), createBlock(TemperatureChart, mergeProps({
32
- key: 0,
33
- ref_key: "fabricChartRef",
34
- ref: fabricChartRef
35
- }, _ctx.$attrs), null, 16)) : (openBlock(), createBlock(BirthProcessChart, { key: 1 }));
41
+ return openBlock(), createElementBlock("div", {
42
+ class: "c-fabric-chart-wrapper",
43
+ style: normalizeStyle(unref(style))
44
+ }, [
45
+ unref(isTemperature) ? (openBlock(), createBlock(TemperatureChart, mergeProps({
46
+ key: 0,
47
+ ref_key: "fabricChartRef",
48
+ ref: fabricChartRef
49
+ }, _ctx.$attrs), null, 16)) : (openBlock(), createBlock(BirthProcessChart, { key: 1 }))
50
+ ], 4);
36
51
  };
37
52
  }
38
53
  });
@@ -96,7 +96,7 @@ var PopupMenu = defineComponent({
96
96
  });
97
97
  return () => {
98
98
  return createVNode(Teleport, {
99
- "to": ".c-fabric-chart"
99
+ "to": ".c-fabric-chart-wrapper"
100
100
  }, {
101
101
  default: () => [withDirectives(createVNode("ul", {
102
102
  "ref": popupRef,
@@ -14,7 +14,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
14
14
  const props = __props;
15
15
  const pointStyle = useStyle(props);
16
16
  return (_ctx, _cache) => {
17
- return openBlock(), createBlock(Teleport, { to: ".c-fabric-chart" }, [
17
+ return openBlock(), createBlock(Teleport, { to: ".c-fabric-chart-wrapper" }, [
18
18
  withDirectives(createElementVNode("ul", {
19
19
  class: "c-fabric-chart-popup-tip",
20
20
  style: normalizeStyle(unref(pointStyle))
@@ -441,14 +441,15 @@ function useCenter(canvas, propItems, emits, cumputedX, cumputedY, getXValue, ge
441
441
  rightLine: line,
442
442
  otherObj,
443
443
  lockMovementX: true,
444
- lockMoveMentY: currentPointType == 0 ? true : false,
445
444
  ...v.pacemakerShow && type == "pulse" ? pacemaker.style : pointAttr,
446
- ...propItems.event
445
+ ...propItems.event,
446
+ ...isNonePain ? { selectable: false, evented: false } : {}
447
447
  };
448
448
  if (previousLine) {
449
+ const y = previousLine.get("y2");
449
450
  point = drawPoint(currentPointType, {
450
451
  left: previousLine.get("x2"),
451
- top: previousLine.get("y2"),
452
+ top: isNonePain ? y - 5 : y,
452
453
  ...pointAttrNew
453
454
  });
454
455
  } else {
@@ -456,7 +457,7 @@ function useCenter(canvas, propItems, emits, cumputedX, cumputedY, getXValue, ge
456
457
  pointAttrNew.leftLine = null;
457
458
  point = drawPoint(currentPointType, {
458
459
  left: points[0],
459
- top: points[1],
460
+ top: isNonePain ? points[1] - 5 : points[1],
460
461
  ...pointAttrNew
461
462
  });
462
463
  }