cnhis-design-vue 3.1.27 → 3.1.28-beta.1
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 +123 -123
- package/es/components/big-table/src/BigTable.vue_vue_type_script_setup_true_lang.js +29 -29
- package/es/components/field-set/index.d.ts +4 -4
- package/es/components/field-set/src/FieldSet.js +3 -5
- package/es/components/field-set/src/FieldSet.vue.d.ts +1 -1
- package/es/components/iho-table/index.d.ts +16 -0
- package/es/components/iho-table/src/IhoTable.js +5 -3
- package/es/components/iho-table/src/IhoTable.vue.d.ts +16 -0
- package/es/components/iho-table/src/components/IhoTableColumn.d.ts +7 -0
- package/es/components/iho-table/src/components/IhoTableColumn.js +36 -3
- package/es/components/iho-table/src/plugins/defaultConfigPlugin/index.js +2 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/checkRendererPlugin.js +1 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/seqRendererPlugin.js +5 -0
- package/es/components/iho-table/src/types/index.d.ts +3 -1
- package/es/components/iho-table/style/index.css +1 -1
- package/es/components/index.css +1 -1
- package/es/components/search-cascader/index.d.ts +1 -1
- package/es/components/search-cascader/src/SearchCascader.vue.d.ts +1 -1
- package/es/components/select-person/index.d.ts +28 -1
- package/es/components/select-person/src/SelectPerson.vue.d.ts +28 -1
- package/es/components/select-person/src/SelectPerson.vue_vue_type_script_setup_true_lang.js +31 -12
- package/es/shared/assets/img/failure.js +1 -1
- package/es/shared/assets/img/icon-asc.js +1 -1
- package/es/shared/assets/img/icon-desc.js +1 -1
- package/es/shared/assets/img/no-permission.js +1 -1
- package/es/shared/assets/img/nodata.js +1 -1
- package/es/shared/assets/img/notfound.js +1 -1
- package/es/shared/assets/img/qr.js +1 -1
- package/es/shared/assets/img/success.js +1 -1
- package/es/shared/assets/img/video.js +1 -1
- package/es/shared/assets/img/video_default_cover.js +1 -1
- package/es/shared/assets/img/video_hover.js +1 -1
- package/es/shared/assets/img/video_play_hover.js +1 -1
- package/es/shared/assets/img/xb_big.js +1 -1
- package/es/shared/assets/img/xb_small.js +1 -1
- package/es/shared/utils/index.d.ts +1 -0
- package/es/shared/utils/index.js +9 -2
- package/package.json +2 -2
- package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
- package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +0 -1
- package/es/components/bpmn-workflow/types/ModelingModule.d.ts +0 -1
- package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +0 -1
- package/es/components/fabric-chart/src/utils/index.d.ts +0 -6823
- package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +0 -86
- 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
|
+
```
|
|
@@ -1138,6 +1138,10 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1138
1138
|
};
|
|
1139
1139
|
const colspanMethod = (payload) => {
|
|
1140
1140
|
var _a;
|
|
1141
|
+
const defaultSpan = {
|
|
1142
|
+
rowspan: 1,
|
|
1143
|
+
colspan: 1
|
|
1144
|
+
};
|
|
1141
1145
|
const {
|
|
1142
1146
|
row,
|
|
1143
1147
|
column
|
|
@@ -1147,36 +1151,32 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1147
1151
|
if (isFunction(attr["span-method"]))
|
|
1148
1152
|
return attr["span-method"](payload);
|
|
1149
1153
|
if (state.isTree != 3) {
|
|
1150
|
-
return
|
|
1151
|
-
rowspan: 1,
|
|
1152
|
-
colspan: 1
|
|
1153
|
-
};
|
|
1154
|
+
return defaultSpan;
|
|
1154
1155
|
}
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
return
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
}
|
|
1156
|
+
const xTree = xGrid.value;
|
|
1157
|
+
if (!xTree)
|
|
1158
|
+
return defaultSpan;
|
|
1159
|
+
const {
|
|
1160
|
+
tableColumn = []
|
|
1161
|
+
} = (xTree == null ? void 0 : xTree.getTableColumn()) || {};
|
|
1162
|
+
const fristKeyIndex = tableColumn.findIndex((column2) => !!column2.property);
|
|
1163
|
+
const fixedRightColsSpan = tableColumn.filter((column2) => column2.fixed === "right").length;
|
|
1164
|
+
const colspan = tableColumn.length - fristKeyIndex - fixedRightColsSpan;
|
|
1165
|
+
const isOldVxeTree = row.childrenList && row.childrenList.length;
|
|
1166
|
+
const isTransformVxeTree = ((_a = props.tableParams) == null ? void 0 : _a.isTransform) && !row.qianduan_parent_id;
|
|
1167
|
+
if (isOldVxeTree || isTransformVxeTree) {
|
|
1168
|
+
if (column.treeNode) {
|
|
1169
|
+
return {
|
|
1170
|
+
rowspan: 1,
|
|
1171
|
+
colspan
|
|
1172
|
+
};
|
|
1173
|
+
} else if (!column.property || column.fixed === "right") {
|
|
1174
|
+
return defaultSpan;
|
|
1175
|
+
} else {
|
|
1176
|
+
return {
|
|
1177
|
+
rowspan: 0,
|
|
1178
|
+
colspan: 0
|
|
1179
|
+
};
|
|
1180
1180
|
}
|
|
1181
1181
|
}
|
|
1182
1182
|
};
|
|
@@ -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
|
-
|
|
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
|
}
|
|
@@ -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
|
-
|
|
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 {
|
|
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,
|
|
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
|
},
|
|
@@ -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,
|