cnhis-design-vue 3.1.27 → 3.1.28-beta.0

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 (44) hide show
  1. package/README.md +123 -123
  2. package/es/components/field-set/index.d.ts +4 -4
  3. package/es/components/field-set/src/FieldSet.js +3 -5
  4. package/es/components/field-set/src/FieldSet.vue.d.ts +1 -1
  5. package/es/components/iho-table/index.d.ts +16 -0
  6. package/es/components/iho-table/src/IhoTable.js +5 -3
  7. package/es/components/iho-table/src/IhoTable.vue.d.ts +16 -0
  8. package/es/components/iho-table/src/components/IhoTableColumn.d.ts +7 -0
  9. package/es/components/iho-table/src/components/IhoTableColumn.js +36 -3
  10. package/es/components/iho-table/src/plugins/defaultConfigPlugin/index.js +2 -1
  11. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/checkRendererPlugin.js +1 -0
  12. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/seqRendererPlugin.js +5 -0
  13. package/es/components/iho-table/src/types/index.d.ts +3 -1
  14. package/es/components/iho-table/style/index.css +1 -1
  15. package/es/components/index.css +1 -1
  16. package/es/components/search-cascader/index.d.ts +1 -1
  17. package/es/components/search-cascader/src/SearchCascader.vue.d.ts +1 -1
  18. package/es/components/select-person/index.d.ts +28 -1
  19. package/es/components/select-person/src/SelectPerson.vue.d.ts +28 -1
  20. package/es/components/select-person/src/SelectPerson.vue_vue_type_script_setup_true_lang.js +31 -12
  21. package/es/shared/assets/img/failure.js +1 -1
  22. package/es/shared/assets/img/icon-asc.js +1 -1
  23. package/es/shared/assets/img/icon-desc.js +1 -1
  24. package/es/shared/assets/img/no-permission.js +1 -1
  25. package/es/shared/assets/img/nodata.js +1 -1
  26. package/es/shared/assets/img/notfound.js +1 -1
  27. package/es/shared/assets/img/qr.js +1 -1
  28. package/es/shared/assets/img/success.js +1 -1
  29. package/es/shared/assets/img/video.js +1 -1
  30. package/es/shared/assets/img/video_default_cover.js +1 -1
  31. package/es/shared/assets/img/video_hover.js +1 -1
  32. package/es/shared/assets/img/video_play_hover.js +1 -1
  33. package/es/shared/assets/img/xb_big.js +1 -1
  34. package/es/shared/assets/img/xb_small.js +1 -1
  35. package/es/shared/utils/index.d.ts +1 -0
  36. package/es/shared/utils/index.js +9 -2
  37. package/package.json +2 -2
  38. package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
  39. package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +0 -1
  40. package/es/components/bpmn-workflow/types/ModelingModule.d.ts +0 -1
  41. package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +0 -1
  42. package/es/components/fabric-chart/src/utils/index.d.ts +0 -6823
  43. package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +0 -86
  44. package/es/shared/utils/tapable/index.d.ts +0 -139
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
+ ```
@@ -60,7 +60,7 @@ declare const FieldSet: SFCWithInstall<import("vue").DefineComponent<{
60
60
  alias: string;
61
61
  fixedShow: boolean;
62
62
  fixedWay: "NONE" | "LEFT" | "RIGHT";
63
- columnWidth: number;
63
+ columnWidth: number | null;
64
64
  editable: boolean;
65
65
  editableDisable: boolean;
66
66
  required: boolean;
@@ -80,7 +80,7 @@ declare const FieldSet: SFCWithInstall<import("vue").DefineComponent<{
80
80
  alias: string;
81
81
  fixedShow: boolean;
82
82
  fixedWay: "NONE" | "LEFT" | "RIGHT";
83
- columnWidth: number;
83
+ columnWidth: number | null;
84
84
  editable: boolean;
85
85
  editableDisable: boolean;
86
86
  required: boolean;
@@ -107,7 +107,7 @@ declare const FieldSet: SFCWithInstall<import("vue").DefineComponent<{
107
107
  alias: string;
108
108
  fixedShow: boolean;
109
109
  fixedWay: "NONE" | "LEFT" | "RIGHT";
110
- columnWidth: number;
110
+ columnWidth: number | null;
111
111
  editable: boolean;
112
112
  editableDisable: boolean;
113
113
  required: boolean;
@@ -124,7 +124,7 @@ declare const FieldSet: SFCWithInstall<import("vue").DefineComponent<{
124
124
  alias: string;
125
125
  fixedShow: boolean;
126
126
  fixedWay: "NONE" | "LEFT" | "RIGHT";
127
- columnWidth: number;
127
+ columnWidth: number | null;
128
128
  editable: boolean;
129
129
  editableDisable: boolean;
130
130
  required: boolean;
@@ -105,17 +105,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
105
105
  if (Reflect.has(item, key)) {
106
106
  if (key == "isFixed") {
107
107
  item["fixedWay"] = item[key] == 1 ? "LEFT" : item[key] == 2 ? "RIGHT" : "NONE";
108
+ } else if (["isShow", "isSort"].includes(key) && typeof key !== "boolean") {
109
+ item[fieldsMapping[key]] = item[key] == 1 ? true : false;
108
110
  } else {
109
111
  item[fieldsMapping[key]] = item[key];
110
112
  }
111
113
  Reflect.deleteProperty(item, key);
112
114
  }
113
115
  }
114
- if (!Reflect.has(item, "columnWidth")) {
115
- item.columnWidth = null;
116
- } else {
117
- item.columnWidth = +item.columnWidth;
118
- }
116
+ item.columnWidth = +item.columnWidth || null;
119
117
  if (!Reflect.has(item, "alias")) {
120
118
  item.alias = "";
121
119
  }
@@ -8,7 +8,7 @@ declare type Ifields = {
8
8
  alias: string;
9
9
  fixedShow: boolean;
10
10
  fixedWay: 'NONE' | 'LEFT' | 'RIGHT';
11
- columnWidth: number;
11
+ columnWidth: number | null;
12
12
  editable: boolean;
13
13
  editableDisable: boolean;
14
14
  required: boolean;
@@ -16,6 +16,9 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
16
16
  type: import("vue").PropType<import("../../../es/shared/types").AnyObject[]>;
17
17
  default: () => never[];
18
18
  };
19
+ annotation: {
20
+ type: import("vue").PropType<import("../../../es/shared/types").AnyObject>;
21
+ };
19
22
  }, {
20
23
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
21
24
  tableConfig: {
@@ -30,6 +33,9 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
30
33
  type: import("vue").PropType<import("../../../es/shared/types").AnyObject[]>;
31
34
  default: () => never[];
32
35
  };
36
+ annotation: {
37
+ type: import("vue").PropType<import("../../../es/shared/types").AnyObject>;
38
+ };
33
39
  }>> & {
34
40
  onFormChange?: ((...args: any[]) => any) | undefined;
35
41
  onCopy?: ((...args: any[]) => any) | undefined;
@@ -2363,6 +2369,7 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
2363
2369
  }>[]) | undefined;
2364
2370
  getTitle?: (() => string) | undefined;
2365
2371
  getKey?: (() => string) | undefined;
2372
+ annotation?: boolean | undefined;
2366
2373
  }[]>;
2367
2374
  updateFieldListRef: () => void;
2368
2375
  dataTransfer: (data: import("../../../es/shared/types").AnyObject[]) => Promise<import("../../../es/shared/types").AnyObject[]>;
@@ -4395,11 +4402,17 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
4395
4402
  type: import("vue").PropType<import("../../../es/components/iho-table/src/types").IhoTableFieldItem>;
4396
4403
  required: true;
4397
4404
  };
4405
+ annotation: {
4406
+ type: import("vue").PropType<import("../../../es/shared/types").AnyObject>;
4407
+ };
4398
4408
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
4399
4409
  field: {
4400
4410
  type: import("vue").PropType<import("../../../es/components/iho-table/src/types").IhoTableFieldItem>;
4401
4411
  required: true;
4402
4412
  };
4413
+ annotation: {
4414
+ type: import("vue").PropType<import("../../../es/shared/types").AnyObject>;
4415
+ };
4403
4416
  }>>, {}>;
4404
4417
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("toggleRowExpand" | "toggleTreeExpand" | "copy" | "scroll" | "formChange" | "settingClick" | "cut" | "paste" | "keydown" | "keydownStart" | "keydownEnd" | "currentChange" | "radioChange" | "checkboxChange" | "checkboxAll" | "checkboxRangeStart" | "checkboxRangeChange" | "checkboxRangeEnd" | "cellClick" | "cellDblclick" | "cellMenu" | "cellMouseenter" | "cellMouseleave" | "headerCellClick" | "headerCellDblclick" | "headerCellMenu" | "footerCellClick" | "footerCellDblclick" | "footerCellMenu" | "sortChange" | "filterChange" | "filterVisible" | "resizableChange" | "menuClick" | "editClosed" | "editActived" | "editDisabled" | "validError" | "custom" | "openFnr" | "fnrChange" | "fnrFind" | "fnrFindAll" | "fnrReplace" | "fnrReplaceAll" | "cellAreaCopy" | "cellAreaCut" | "cellAreaPaste" | "cellAreaMerge" | "clearCellAreaMerge" | "headerCellAreaSelection" | "cellAreaSelectionStart" | "cellAreaSelectionDrag" | "cellAreaSelectionEnd" | "cellAreaExtensionStart" | "cellAreaExtensionDrag" | "cellAreaExtensionEnd" | "cellAreaArrowsStart" | "cellAreaArrowsEnd" | "activeCellChangeStart" | "activeCellChangeEnd")[], "toggleRowExpand" | "toggleTreeExpand" | "copy" | "scroll" | "formChange" | "settingClick" | "cut" | "paste" | "keydown" | "keydownStart" | "keydownEnd" | "currentChange" | "radioChange" | "checkboxChange" | "checkboxAll" | "checkboxRangeStart" | "checkboxRangeChange" | "checkboxRangeEnd" | "cellClick" | "cellDblclick" | "cellMenu" | "cellMouseenter" | "cellMouseleave" | "headerCellClick" | "headerCellDblclick" | "headerCellMenu" | "footerCellClick" | "footerCellDblclick" | "footerCellMenu" | "sortChange" | "filterChange" | "filterVisible" | "resizableChange" | "menuClick" | "editClosed" | "editActived" | "editDisabled" | "validError" | "custom" | "openFnr" | "fnrChange" | "fnrFind" | "fnrFindAll" | "fnrReplace" | "fnrReplaceAll" | "cellAreaCopy" | "cellAreaCut" | "cellAreaPaste" | "cellAreaMerge" | "clearCellAreaMerge" | "headerCellAreaSelection" | "cellAreaSelectionStart" | "cellAreaSelectionDrag" | "cellAreaSelectionEnd" | "cellAreaExtensionStart" | "cellAreaExtensionDrag" | "cellAreaExtensionEnd" | "cellAreaArrowsStart" | "cellAreaArrowsEnd" | "activeCellChangeStart" | "activeCellChangeEnd", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
4405
4418
  tableConfig: {
@@ -4414,6 +4427,9 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
4414
4427
  type: import("vue").PropType<import("../../../es/shared/types").AnyObject[]>;
4415
4428
  default: () => never[];
4416
4429
  };
4430
+ annotation: {
4431
+ type: import("vue").PropType<import("../../../es/shared/types").AnyObject>;
4432
+ };
4417
4433
  }>> & {
4418
4434
  onFormChange?: ((...args: any[]) => any) | undefined;
4419
4435
  onCopy?: ((...args: any[]) => any) | undefined;
@@ -15,7 +15,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
15
15
  props: {
16
16
  tableConfig: { type: Object, default: () => ({}) },
17
17
  fieldList: { type: Array, default: () => [] },
18
- tableData: { type: Array, default: () => [] }
18
+ tableData: { type: Array, default: () => [] },
19
+ annotation: { type: Object }
19
20
  },
20
21
  emits: [
21
22
  "formChange",
@@ -98,8 +99,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
98
99
  (openBlock(true), createElementBlock(Fragment, null, renderList(fieldListRef.value, (field) => {
99
100
  return openBlock(), createBlock(unref(ColumnComponent), {
100
101
  key: field.field,
101
- field
102
- }, null, 8, ["field"]);
102
+ field,
103
+ annotation: __props.annotation
104
+ }, null, 8, ["field", "annotation"]);
103
105
  }), 128))
104
106
  ]),
105
107
  _: 1
@@ -15,6 +15,9 @@ declare const _default: import("vue").DefineComponent<{
15
15
  type: PropType<AnyObject[]>;
16
16
  default: () => never[];
17
17
  };
18
+ annotation: {
19
+ type: PropType<AnyObject>;
20
+ };
18
21
  }, {
19
22
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
20
23
  tableConfig: {
@@ -29,6 +32,9 @@ declare const _default: import("vue").DefineComponent<{
29
32
  type: PropType<AnyObject[]>;
30
33
  default: () => never[];
31
34
  };
35
+ annotation: {
36
+ type: PropType<AnyObject>;
37
+ };
32
38
  }>> & {
33
39
  onFormChange?: ((...args: any[]) => any) | undefined;
34
40
  onCopy?: ((...args: any[]) => any) | undefined;
@@ -2362,6 +2368,7 @@ declare const _default: import("vue").DefineComponent<{
2362
2368
  }>[]) | undefined;
2363
2369
  getTitle?: (() => string) | undefined;
2364
2370
  getKey?: (() => string) | undefined;
2371
+ annotation?: boolean | undefined;
2365
2372
  }[]>;
2366
2373
  updateFieldListRef: () => void;
2367
2374
  dataTransfer: (data: AnyObject[]) => Promise<AnyObject[]>;
@@ -4394,11 +4401,17 @@ declare const _default: import("vue").DefineComponent<{
4394
4401
  type: PropType<IhoTableFieldItem>;
4395
4402
  required: true;
4396
4403
  };
4404
+ annotation: {
4405
+ type: PropType<AnyObject>;
4406
+ };
4397
4407
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
4398
4408
  field: {
4399
4409
  type: PropType<IhoTableFieldItem>;
4400
4410
  required: true;
4401
4411
  };
4412
+ annotation: {
4413
+ type: PropType<AnyObject>;
4414
+ };
4402
4415
  }>>, {}>;
4403
4416
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("toggleRowExpand" | "toggleTreeExpand" | "copy" | "scroll" | "formChange" | "settingClick" | "cut" | "paste" | "keydown" | "keydownStart" | "keydownEnd" | "currentChange" | "radioChange" | "checkboxChange" | "checkboxAll" | "checkboxRangeStart" | "checkboxRangeChange" | "checkboxRangeEnd" | "cellClick" | "cellDblclick" | "cellMenu" | "cellMouseenter" | "cellMouseleave" | "headerCellClick" | "headerCellDblclick" | "headerCellMenu" | "footerCellClick" | "footerCellDblclick" | "footerCellMenu" | "sortChange" | "filterChange" | "filterVisible" | "resizableChange" | "menuClick" | "editClosed" | "editActived" | "editDisabled" | "validError" | "custom" | "openFnr" | "fnrChange" | "fnrFind" | "fnrFindAll" | "fnrReplace" | "fnrReplaceAll" | "cellAreaCopy" | "cellAreaCut" | "cellAreaPaste" | "cellAreaMerge" | "clearCellAreaMerge" | "headerCellAreaSelection" | "cellAreaSelectionStart" | "cellAreaSelectionDrag" | "cellAreaSelectionEnd" | "cellAreaExtensionStart" | "cellAreaExtensionDrag" | "cellAreaExtensionEnd" | "cellAreaArrowsStart" | "cellAreaArrowsEnd" | "activeCellChangeStart" | "activeCellChangeEnd")[], "toggleRowExpand" | "toggleTreeExpand" | "copy" | "scroll" | "formChange" | "settingClick" | "cut" | "paste" | "keydown" | "keydownStart" | "keydownEnd" | "currentChange" | "radioChange" | "checkboxChange" | "checkboxAll" | "checkboxRangeStart" | "checkboxRangeChange" | "checkboxRangeEnd" | "cellClick" | "cellDblclick" | "cellMenu" | "cellMouseenter" | "cellMouseleave" | "headerCellClick" | "headerCellDblclick" | "headerCellMenu" | "footerCellClick" | "footerCellDblclick" | "footerCellMenu" | "sortChange" | "filterChange" | "filterVisible" | "resizableChange" | "menuClick" | "editClosed" | "editActived" | "editDisabled" | "validError" | "custom" | "openFnr" | "fnrChange" | "fnrFind" | "fnrFindAll" | "fnrReplace" | "fnrReplaceAll" | "cellAreaCopy" | "cellAreaCut" | "cellAreaPaste" | "cellAreaMerge" | "clearCellAreaMerge" | "headerCellAreaSelection" | "cellAreaSelectionStart" | "cellAreaSelectionDrag" | "cellAreaSelectionEnd" | "cellAreaExtensionStart" | "cellAreaExtensionDrag" | "cellAreaExtensionEnd" | "cellAreaArrowsStart" | "cellAreaArrowsEnd" | "activeCellChangeStart" | "activeCellChangeEnd", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
4404
4417
  tableConfig: {
@@ -4413,6 +4426,9 @@ declare const _default: import("vue").DefineComponent<{
4413
4426
  type: PropType<AnyObject[]>;
4414
4427
  default: () => never[];
4415
4428
  };
4429
+ annotation: {
4430
+ type: PropType<AnyObject>;
4431
+ };
4416
4432
  }>> & {
4417
4433
  onFormChange?: ((...args: any[]) => any) | undefined;
4418
4434
  onCopy?: ((...args: any[]) => any) | undefined;
@@ -1,3 +1,4 @@
1
+ import { AnyObject } from '../../../../../es/shared/types';
1
2
  import { PropType } from 'vue';
2
3
  import { IhoTableFieldItem } from '../../../../../es/components/iho-table/src/types';
3
4
  declare const ColumnComponent: import("vue").DefineComponent<{
@@ -5,10 +6,16 @@ declare const ColumnComponent: import("vue").DefineComponent<{
5
6
  type: PropType<IhoTableFieldItem>;
6
7
  required: true;
7
8
  };
9
+ annotation: {
10
+ type: PropType<AnyObject>;
11
+ };
8
12
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
9
13
  field: {
10
14
  type: PropType<IhoTableFieldItem>;
11
15
  required: true;
12
16
  };
17
+ annotation: {
18
+ type: PropType<AnyObject>;
19
+ };
13
20
  }>>, {}>;
14
21
  export default ColumnComponent;
@@ -1,5 +1,8 @@
1
1
  import { defineComponent, resolveComponent, createVNode } from 'vue';
2
- import { isEmpty, omit } from 'lodash-es';
2
+ import { widthAppend, arrayed } from '../../../../shared/utils/index.js';
3
+ import { isEmpty, omit, isObject, isString, isFunction } from 'lodash-es';
4
+ import Annotation from '../../../annotation-edit/index.js';
5
+ import { NEllipsis } from 'naive-ui';
3
6
 
4
7
  const ColumnComponent = defineComponent({
5
8
  name: "IhoTableColumn",
@@ -7,18 +10,48 @@ const ColumnComponent = defineComponent({
7
10
  field: {
8
11
  type: Object,
9
12
  required: true
13
+ },
14
+ annotation: {
15
+ type: Object
10
16
  }
11
17
  },
12
18
  setup(props) {
13
19
  const VxeColumn = resolveComponent("vxe-column");
14
20
  const VxeColumnGroup = resolveComponent("vxe-colgroup");
21
+ function renderHeader(payload, headerSlot) {
22
+ const hasAnnotation = isObject(props.annotation) && props.field.annotation !== false;
23
+ const maxWidth = widthAppend(payload.column.renderWidth - (hasAnnotation ? 36 : 20));
24
+ const customHeader = isString(headerSlot) ? headerSlot : isFunction(headerSlot) ? headerSlot(payload) : null;
25
+ return createVNode("section", {
26
+ "class": "iho-table__headerWrapper"
27
+ }, [[...arrayed(customHeader != null ? customHeader : createVNode(NEllipsis, {
28
+ "style": {
29
+ maxWidth
30
+ }
31
+ }, {
32
+ default: () => props.field.title
33
+ }))], hasAnnotation ? createVNode(Annotation, {
34
+ "modelValue": props.annotation[props.field.field],
35
+ "onUpdate:modelValue": ($event) => props.annotation[props.field.field] = $event
36
+ }, null) : null]);
37
+ }
38
+ function columnSlot({
39
+ slots
40
+ }) {
41
+ return Object.assign({}, slots, {
42
+ header(payload) {
43
+ return renderHeader(payload, slots == null ? void 0 : slots.header);
44
+ }
45
+ });
46
+ }
15
47
  function renderColumn(field) {
16
- return createVNode(VxeColumn, field, field.slots);
48
+ return createVNode(VxeColumn, omit(field, ["slots"]), columnSlot(field));
17
49
  }
18
50
  function renderColumnGroup(group, children) {
19
51
  return createVNode(VxeColumnGroup, omit(group, ["children"]), {
20
52
  default: () => children.map((child) => createVNode(ColumnComponent, {
21
- "field": child
53
+ "field": child,
54
+ "annotation": props.annotation
22
55
  }, null))
23
56
  });
24
57
  }
@@ -20,7 +20,8 @@ function defaultConfigPlugin() {
20
20
  editConfig: {
21
21
  trigger: "click",
22
22
  mode: "cell",
23
- autoClear: false
23
+ autoClear: false,
24
+ showIcon: false
24
25
  },
25
26
  keyboardConfig: { isArrow: true, isDel: true, isEnter: true, isTab: true, isEdit: true, isChecked: true }
26
27
  },
@@ -18,6 +18,7 @@ function checkRendererPlugin() {
18
18
  field: pluginName,
19
19
  width: 50,
20
20
  align: "center",
21
+ annotation: false,
21
22
  type: config.selectType
22
23
  });
23
24
  }
@@ -20,6 +20,8 @@ function seqRendererPlugin() {
20
20
  fixed: "left",
21
21
  width: 50,
22
22
  type: "seq",
23
+ field: "iho_table_sequence_unique_id",
24
+ annotation: false,
23
25
  slots: {
24
26
  header() {
25
27
  const emits = inject(InjectionIhoTableEmits);
@@ -27,6 +29,9 @@ function seqRendererPlugin() {
27
29
  emits && emits("settingClick");
28
30
  }
29
31
  return [createVNode(NIcon, {
32
+ "style": {
33
+ cursor: "pointer"
34
+ },
30
35
  "size": "14",
31
36
  "color": "#777",
32
37
  "component": SettingsSharp,
@@ -18,7 +18,9 @@ export declare type IhoTableConfig = VxeTableProps & Partial<{
18
18
  }>;
19
19
  export declare type IhoTableFieldItem = {
20
20
  [K in keyof VxeTableDefines.ColumnInfo]?: K extends 'children' ? IhoTableFieldItem[] : K extends keyof VxeTableDefines.ColumnInfo ? VxeTableDefines.ColumnInfo[K] : never;
21
- } & {
21
+ } & Partial<{
22
+ annotation: boolean;
23
+ }> & {
22
24
  [K: string]: unknown;
23
25
  };
24
26
  declare type LowCodeTableSettingObj = Partial<{
@@ -1 +1 @@
1
- .iho-table .icon-dot{background:var(--table-icon-color);box-shadow:0 2px 4px 0 var(--table-icon-shadow)}.iho-table .icon-dot,.iho-table .icon-dot-red{border-radius:50%;display:inline-block;height:8px;margin-right:6px;width:8px}.iho-table .icon-dot-red{background:red;box-shadow:0 2px 4px 0 rgba(255,0,0,.5)}.iho-table .icon-dot-blue{background:blue;box-shadow:0 2px 4px 0 rgba(0,0,255,.5)}.iho-table .icon-dot-blue,.iho-table .icon-dot-green{border-radius:50%;display:inline-block;height:8px;margin-right:6px;width:8px}.iho-table .icon-dot-green{background:green;box-shadow:0 2px 4px 0 rgba(0,128,0,.5)}.iho-table .icon-dot-gray{background:gray;box-shadow:0 2px 4px 0 hsla(0,0%,50%,.5)}.iho-table .icon-dot-gray,.iho-table .icon-dot-yellow{border-radius:50%;display:inline-block;height:8px;margin-right:6px;width:8px}.iho-table .icon-dot-yellow{background:#ff0;box-shadow:0 2px 4px 0 rgba(255,255,0,.5)}.iho-table .icon-dot-resolved{background:#36be8c;box-shadow:0 2px 4px 0 rgba(54,190,140,.5)}.iho-table .icon-dot-huifu,.iho-table .icon-dot-resolved{border-radius:50%;display:inline-block;height:8px;margin-right:6px;width:8px}.iho-table .icon-dot-huifu{background:#42d0f6;box-shadow:0 2px 4px 0 rgba(66,208,246,.5)}.iho-table .icon-dot-close{background:#718391;box-shadow:0 2px 4px 0 rgba(113,131,145,.5)}.iho-table .icon-dot-audit,.iho-table .icon-dot-close{border-radius:50%;display:inline-block;height:8px;margin-right:6px;width:8px}.iho-table .icon-dot-audit{background:#f4ba32;box-shadow:0 2px 4px 0 rgba(244,186,50,.5)}.iho-table .icon-dot-design{background:#927ce1;box-shadow:0 2px 4px 0 rgba(146,124,225,.5)}.iho-table .icon-dot-design,.iho-table .icon-dot-develop{border-radius:50%;display:inline-block;height:8px;margin-right:6px;width:8px}.iho-table .icon-dot-develop{background:#4eb0ef;box-shadow:0 2px 4px 0 rgba(78,176,239,.5)}.iho-table .icon-dot-develop-complete{background:#6381f9;border-radius:50%;box-shadow:0 2px 4px 0 rgba(99,129,249,.5);display:inline-block;height:8px;margin-right:6px;width:8px}
1
+ .iho-table .icon-dot{background:var(--table-icon-color);box-shadow:0 2px 4px 0 var(--table-icon-shadow)}.iho-table .icon-dot,.iho-table .icon-dot-red{border-radius:50%;display:inline-block;height:8px;margin-right:6px;width:8px}.iho-table .icon-dot-red{background:red;box-shadow:0 2px 4px 0 rgba(255,0,0,.5)}.iho-table .icon-dot-blue{background:blue;box-shadow:0 2px 4px 0 rgba(0,0,255,.5)}.iho-table .icon-dot-blue,.iho-table .icon-dot-green{border-radius:50%;display:inline-block;height:8px;margin-right:6px;width:8px}.iho-table .icon-dot-green{background:green;box-shadow:0 2px 4px 0 rgba(0,128,0,.5)}.iho-table .icon-dot-gray{background:gray;box-shadow:0 2px 4px 0 hsla(0,0%,50%,.5)}.iho-table .icon-dot-gray,.iho-table .icon-dot-yellow{border-radius:50%;display:inline-block;height:8px;margin-right:6px;width:8px}.iho-table .icon-dot-yellow{background:#ff0;box-shadow:0 2px 4px 0 rgba(255,255,0,.5)}.iho-table .icon-dot-resolved{background:#36be8c;box-shadow:0 2px 4px 0 rgba(54,190,140,.5)}.iho-table .icon-dot-huifu,.iho-table .icon-dot-resolved{border-radius:50%;display:inline-block;height:8px;margin-right:6px;width:8px}.iho-table .icon-dot-huifu{background:#42d0f6;box-shadow:0 2px 4px 0 rgba(66,208,246,.5)}.iho-table .icon-dot-close{background:#718391;box-shadow:0 2px 4px 0 rgba(113,131,145,.5)}.iho-table .icon-dot-audit,.iho-table .icon-dot-close{border-radius:50%;display:inline-block;height:8px;margin-right:6px;width:8px}.iho-table .icon-dot-audit{background:#f4ba32;box-shadow:0 2px 4px 0 rgba(244,186,50,.5)}.iho-table .icon-dot-design{background:#927ce1;box-shadow:0 2px 4px 0 rgba(146,124,225,.5)}.iho-table .icon-dot-design,.iho-table .icon-dot-develop{border-radius:50%;display:inline-block;height:8px;margin-right:6px;width:8px}.iho-table .icon-dot-develop{background:#4eb0ef;box-shadow:0 2px 4px 0 rgba(78,176,239,.5)}.iho-table .icon-dot-develop-complete{background:#6381f9;border-radius:50%;box-shadow:0 2px 4px 0 rgba(99,129,249,.5);display:inline-block;height:8px;margin-right:6px;width:8px}.iho-table .vxe-header--column [annotation-hover-show=true]{visibility:hidden}.iho-table .vxe-header--column:hover [annotation-hover-show=true]{visibility:visible}.iho-table__headerWrapper{display:inline-flex}