cnhis-design-vue 3.1.22 → 3.1.23-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/index.d.ts +8 -0
- package/es/components/big-table/src/BigTable.vue.d.ts +8 -0
- package/es/components/big-table/src/components/edit-form/edit-separate.js +4 -1
- package/es/components/big-table/src/hooks/useSeparateRow2.js +1 -41
- package/es/components/field-set/src/FieldSet.js +5 -1
- package/es/components/form-render/src/hooks/useFormContext2.js +2 -1
- package/es/components/form-render/src/utils/index.d.ts +0 -1
- package/es/components/form-render/src/utils/index.js +1 -10
- package/es/components/iho-table/index.d.ts +41 -7
- package/es/components/iho-table/index.js +1 -1
- package/es/components/iho-table/src/IhoTable.js +52 -31
- package/es/components/iho-table/src/IhoTable.vue.d.ts +42 -8
- package/es/components/iho-table/src/constants/index.d.ts +5 -2
- package/es/components/iho-table/src/constants/index.js +1 -1
- package/es/components/iho-table/src/constants/index2.js +8 -5
- package/es/components/iho-table/src/hooks/tapHooks/index.d.ts +10 -3
- package/es/components/iho-table/src/hooks/tapHooks/index2.js +32 -21
- package/es/components/iho-table/src/hooks/tapHooks/useDataHooks.d.ts +5 -3
- package/es/components/iho-table/src/hooks/tapHooks/useDataHooks2.js +3 -3
- package/es/components/iho-table/src/hooks/tapHooks/useEventHooks.d.ts +177 -60
- package/es/components/iho-table/src/hooks/tapHooks/useEventHooks2.js +223 -59
- package/es/components/iho-table/src/hooks/tapHooks/useSetupHooks.d.ts +10 -0
- package/es/components/iho-table/src/hooks/tapHooks/useSetupHooks.js +1 -0
- package/es/components/iho-table/src/hooks/tapHooks/useSetupHooks2.js +27 -0
- package/es/components/iho-table/src/plugins/index.js +2 -1
- package/es/components/iho-table/src/plugins/index2.js +2 -1
- package/es/components/iho-table/src/plugins/lowCodeFieldAdaptorPlugin/index2.js +2 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/index.d.ts +2 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/index.js +2 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/{inputs → editableWidgets}/inputRendererPlugins.d.ts +0 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/{inputs → editableWidgets}/inputRendererPlugins.js +0 -5
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/edit-separate.js +110 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/edit-separate.vue.d.ts +107 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/index.d.ts +1 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/index.js +158 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/separate-utils.d.ts +14 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/separate-utils.js +1 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/separate-utils2.js +54 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/index.d.ts +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/index.js +2 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/pictureRendererPlugin.js +2 -1
- package/es/components/iho-table/src/types/index.d.ts +8 -3
- package/es/components/iho-table/src/types/index.js +1 -1
- package/es/components/iho-table/src/types/pluginType.d.ts +97 -83
- package/es/components/iho-table/src/types/pluginType.js +1 -1
- package/es/components/iho-table/src/types/pluginType2.js +3 -1
- package/es/components/iho-table/src/utils/index2.js +1 -1
- package/es/components/index.css +1 -1
- package/es/components/index.js +1 -1
- package/es/components/info-header/index.d.ts +2 -0
- package/es/components/info-header/src/InfoHeader.js +3 -1
- package/es/components/info-header/src/InfoHeader.vue.d.ts +2 -0
- package/es/components/select-person/index.d.ts +41 -0
- package/es/components/select-person/src/SelectPerson.vue.d.ts +41 -0
- package/es/components/select-person/src/SelectPerson.vue_vue_type_script_setup_true_lang.js +45 -10
- package/es/components/select-person/style/index.css +1 -1
- package/es/shared/utils/index.d.ts +4 -0
- package/es/shared/utils/index.js +1 -1
- package/es/shared/utils/index2.js +60 -2
- package/es/shared/utils/tapable/AsyncSeriesHook.js +17 -2
- package/package.json +2 -2
- package/es/components/big-table/src/components/edit-form/useCommon.d.ts +0 -4
- 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/components/iho-table/src/plugins/rendererPlugins/inputs/index.d.ts +0 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/inputs/index.js +0 -1
- 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
|
+
```
|
|
@@ -329,6 +329,14 @@ declare const BigTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
329
329
|
showInsertStatus?: boolean | undefined;
|
|
330
330
|
showAsterisk?: boolean | undefined;
|
|
331
331
|
autoClear?: boolean | undefined;
|
|
332
|
+
beforeEditMethod?: ((params: {
|
|
333
|
+
row: any;
|
|
334
|
+
rowIndex: number;
|
|
335
|
+
column: import("vxe-table").VxeTableDefines.ColumnInfo;
|
|
336
|
+
columnIndex: number;
|
|
337
|
+
$table: import("vxe-table").VxeTableConstructor & import("vxe-table").VxeTablePrivateMethods;
|
|
338
|
+
$grid: import("vxe-table").VxeGridConstructor | null | undefined;
|
|
339
|
+
}) => boolean) | undefined;
|
|
332
340
|
activeMethod?: ((params: {
|
|
333
341
|
row: any;
|
|
334
342
|
rowIndex: number;
|
|
@@ -327,6 +327,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
327
327
|
showInsertStatus?: boolean | undefined;
|
|
328
328
|
showAsterisk?: boolean | undefined;
|
|
329
329
|
autoClear?: boolean | undefined;
|
|
330
|
+
beforeEditMethod?: ((params: {
|
|
331
|
+
row: any;
|
|
332
|
+
rowIndex: number;
|
|
333
|
+
column: import("vxe-table").VxeTableDefines.ColumnInfo;
|
|
334
|
+
columnIndex: number;
|
|
335
|
+
$table: import("vxe-table").VxeTableConstructor & import("vxe-table").VxeTablePrivateMethods;
|
|
336
|
+
$grid: import("vxe-table").VxeGridConstructor | null | undefined;
|
|
337
|
+
}) => boolean) | undefined;
|
|
330
338
|
activeMethod?: ((params: {
|
|
331
339
|
row: any;
|
|
332
340
|
rowIndex: number;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, ref, watch, openBlock, createBlock, unref, withCtx, createVNode, withModifiers } from 'vue';
|
|
1
|
+
import { defineComponent, ref, watch, onDeactivated, openBlock, createBlock, unref, withCtx, createVNode, withModifiers } from 'vue';
|
|
2
2
|
import script from '../../../../../shared/components/SlotRender/SlotRender.js';
|
|
3
3
|
import { cloneDeep, isObject, isArray } from 'lodash-es';
|
|
4
4
|
import { NPopover, NInput } from 'naive-ui';
|
|
@@ -57,6 +57,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
57
57
|
background: "white",
|
|
58
58
|
"border-radius": "4px"
|
|
59
59
|
};
|
|
60
|
+
onDeactivated(() => {
|
|
61
|
+
onClose(getRowData(props.row));
|
|
62
|
+
});
|
|
60
63
|
return (_ctx, _cache) => {
|
|
61
64
|
return openBlock(), createBlock(unref(NPopover), {
|
|
62
65
|
ref_key: "popoverRef",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { getStringWidth } from '../../../../shared/utils/index2.js';
|
|
2
2
|
import { isNumber, isArray, cloneDeep, isString } from 'lodash-es';
|
|
3
3
|
import { ref, computed, provide, watch, nextTick } from 'vue';
|
|
4
4
|
import { InjectionSeparateHandle } from '../constants/index2.js';
|
|
@@ -20,46 +20,6 @@ class SeparateHandle {
|
|
|
20
20
|
this.callbacks.forEach((cb) => cb());
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
|
-
const getStringWidth = /* @__PURE__ */ useMemoize(function(str) {
|
|
24
|
-
if (!str)
|
|
25
|
-
return 0;
|
|
26
|
-
return [...str].reduce((width, char) => {
|
|
27
|
-
if (/[a-z]/.test(char)) {
|
|
28
|
-
return width + 8;
|
|
29
|
-
}
|
|
30
|
-
if (/[A-Z]/.test(char)) {
|
|
31
|
-
return width + 12;
|
|
32
|
-
}
|
|
33
|
-
if (/\d/.test(char)) {
|
|
34
|
-
return width + 9;
|
|
35
|
-
}
|
|
36
|
-
if (/\./.test(char)) {
|
|
37
|
-
return width + 4;
|
|
38
|
-
}
|
|
39
|
-
if (/[\u4e00-\u9fa5]/.test(char)) {
|
|
40
|
-
return width + 15;
|
|
41
|
-
}
|
|
42
|
-
if (/-/.test(char)) {
|
|
43
|
-
return width + 4;
|
|
44
|
-
}
|
|
45
|
-
if (/[()]/.test(char)) {
|
|
46
|
-
return width + 14;
|
|
47
|
-
}
|
|
48
|
-
if (/[)(]/.test(char)) {
|
|
49
|
-
return width + 5;
|
|
50
|
-
}
|
|
51
|
-
if (/-/.test(char)) {
|
|
52
|
-
return width + 10;
|
|
53
|
-
}
|
|
54
|
-
if (/%/.test(char)) {
|
|
55
|
-
return width + 14;
|
|
56
|
-
}
|
|
57
|
-
if (/‰/.test(char)) {
|
|
58
|
-
return width + 16;
|
|
59
|
-
}
|
|
60
|
-
return width + 6;
|
|
61
|
-
}, 0);
|
|
62
|
-
});
|
|
63
23
|
const separateDataMap = ref(/* @__PURE__ */ new WeakMap());
|
|
64
24
|
function useSeparateMap() {
|
|
65
25
|
function getRowData(row) {
|
|
@@ -118,7 +118,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
118
118
|
Reflect.deleteProperty(item, key);
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
|
-
item
|
|
121
|
+
if (!Reflect.has(item, "columnWidth")) {
|
|
122
|
+
item.columnWidth = null;
|
|
123
|
+
} else {
|
|
124
|
+
item.columnWidth = +item.columnWidth;
|
|
125
|
+
}
|
|
122
126
|
if (!Reflect.has(item, "alias")) {
|
|
123
127
|
item.alias = "";
|
|
124
128
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { uuidGenerator } from '../../../../shared/utils/index2.js';
|
|
1
2
|
import { isObject } from '@vue/shared';
|
|
2
3
|
import { cloneDeep } from 'lodash-es';
|
|
3
4
|
import { provide, computed, readonly } from 'vue';
|
|
@@ -6,7 +7,7 @@ import '../../index2.js';
|
|
|
6
7
|
import * as index from '../components/renderer/index2.js';
|
|
7
8
|
import { useFormRenderLifeCycle } from './useFormRenderLifeCycle2.js';
|
|
8
9
|
import { usePresetScope } from './usePresetScope2.js';
|
|
9
|
-
import { injectOrProvide,
|
|
10
|
+
import { injectOrProvide, presetRequestHandler } from '../utils/index.js';
|
|
10
11
|
import { InjectionBusinessCollector, InjectionChangeContextCollector, InjectionFormItemDepsCollector, InjectionFormUUID, InjectionAnnotation, InjectAsyncQueue, InjectionSchemaField } from '../constants/index2.js';
|
|
11
12
|
import { useBusinessBinding } from './useBusinessBinding2.js';
|
|
12
13
|
import { useChangeContext } from './useChangeContext2.js';
|
|
@@ -8,7 +8,6 @@ export declare function formRenderLog(message: string): void;
|
|
|
8
8
|
export declare function mergeDeepProperties(target: AnyObject, fieldList: FieldItem[], traverseProperties?: string[], property?: string, targetProperty?: string): AnyObject;
|
|
9
9
|
export declare function injectOrProvide<T>(key: InjectionKey<T>, creator: () => T): T;
|
|
10
10
|
export declare function parseNumberFromMaybeString<T>(value: T): T extends number | string ? number : T;
|
|
11
|
-
export declare function uuidGenerator(): string;
|
|
12
11
|
export declare function createSlot(renderer: unknown, props: AnyObject): Record<string, () => ArrayAble<VNode>> | {
|
|
13
12
|
default(): any;
|
|
14
13
|
};
|
|
@@ -50,15 +50,6 @@ function parseNumberFromMaybeString(value) {
|
|
|
50
50
|
return +value;
|
|
51
51
|
return value;
|
|
52
52
|
}
|
|
53
|
-
function uuidGenerator() {
|
|
54
|
-
if (window.isSecureContext && window.crypto)
|
|
55
|
-
return `key${window.crypto.randomUUID()}`;
|
|
56
|
-
const uuid = "xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(c) {
|
|
57
|
-
const r = Math.random() * 16 | 0, v = c == "x" ? r : r & 3 | 8;
|
|
58
|
-
return v.toString(16);
|
|
59
|
-
});
|
|
60
|
-
return `key${uuid}`;
|
|
61
|
-
}
|
|
62
53
|
function createSlot(renderer, props) {
|
|
63
54
|
if (isObject(renderer) && !isFunction(renderer)) {
|
|
64
55
|
const result = {};
|
|
@@ -134,4 +125,4 @@ function optionMatcher(options, input, key, matcherOption = {
|
|
|
134
125
|
}
|
|
135
126
|
}
|
|
136
127
|
|
|
137
|
-
export { createInputSlot, createSlot, formRenderLog, injectOrProvide, mergeDeepProperties, optionMatcher, parseNumberFromMaybeString, presetRequestHandler
|
|
128
|
+
export { createInputSlot, createSlot, formRenderLog, injectOrProvide, mergeDeepProperties, optionMatcher, parseNumberFromMaybeString, presetRequestHandler };
|
|
@@ -6,10 +6,11 @@ export declare const useIhoTablePresetPlugins: (instance: IhoTableInstance) => v
|
|
|
6
6
|
declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
7
7
|
tableConfig: {
|
|
8
8
|
type: import("vue").PropType<import("../../../es/components/iho-table/src/types").IhoTableConfig>;
|
|
9
|
+
default: () => {};
|
|
9
10
|
};
|
|
10
11
|
fieldList: {
|
|
11
12
|
type: import("vue").PropType<import("../../../es/components/iho-table/src/types").LowCodeTableFieldItem[]>;
|
|
12
|
-
|
|
13
|
+
default: () => never[];
|
|
13
14
|
};
|
|
14
15
|
tableData: {
|
|
15
16
|
type: import("vue").PropType<import("../../../es/shared/types").AnyObject[]>;
|
|
@@ -19,10 +20,11 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
19
20
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
20
21
|
tableConfig: {
|
|
21
22
|
type: import("vue").PropType<import("../../../es/components/iho-table/src/types").IhoTableConfig>;
|
|
23
|
+
default: () => {};
|
|
22
24
|
};
|
|
23
25
|
fieldList: {
|
|
24
26
|
type: import("vue").PropType<import("../../../es/components/iho-table/src/types").LowCodeTableFieldItem[]>;
|
|
25
|
-
|
|
27
|
+
default: () => never[];
|
|
26
28
|
};
|
|
27
29
|
tableData: {
|
|
28
30
|
type: import("vue").PropType<import("../../../es/shared/types").AnyObject[]>;
|
|
@@ -92,12 +94,15 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
92
94
|
onSettingClick?: ((...args: any[]) => any) | undefined;
|
|
93
95
|
}>>;
|
|
94
96
|
emits: (event: "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", ...args: any[]) => void;
|
|
95
|
-
|
|
97
|
+
uuid: string;
|
|
98
|
+
uuidRef: import("vue").Ref<string>;
|
|
99
|
+
$table: import("vue").Ref<import("vxe-table").VxeTableInstance | undefined>;
|
|
96
100
|
hooks: Readonly<{
|
|
97
101
|
configHooks: import("../../../es/components/iho-table/src/types").AbstractConfigHooks;
|
|
98
102
|
fieldHooks: import("../../../es/components/iho-table/src/types").AbstractFieldHooks;
|
|
99
103
|
eventHooks: import("../../../es/components/iho-table/src/types").AbstractEventHooks;
|
|
100
104
|
dataHooks: import("../../../es/components/iho-table/src/types").AbstractDataHooks;
|
|
105
|
+
setupHooks: import("../../../es/components/iho-table/src/types").AbstractSetupHooks;
|
|
101
106
|
}>;
|
|
102
107
|
configRef: import("vue").Ref<{
|
|
103
108
|
[x: string]: unknown;
|
|
@@ -2018,6 +2023,14 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
2018
2023
|
showInsertStatus?: boolean | undefined;
|
|
2019
2024
|
showAsterisk?: boolean | undefined;
|
|
2020
2025
|
autoClear?: boolean | undefined;
|
|
2026
|
+
beforeEditMethod?: ((params: {
|
|
2027
|
+
row: any;
|
|
2028
|
+
rowIndex: number;
|
|
2029
|
+
column: import("vxe-table").VxeTableDefines.ColumnInfo;
|
|
2030
|
+
columnIndex: number;
|
|
2031
|
+
$table: import("vxe-table").VxeTableConstructor & import("vxe-table").VxeTablePrivateMethods;
|
|
2032
|
+
$grid: import("vxe-table").VxeGridConstructor | null | undefined;
|
|
2033
|
+
}) => boolean) | undefined;
|
|
2021
2034
|
activeMethod?: ((params: {
|
|
2022
2035
|
row: any;
|
|
2023
2036
|
rowIndex: number;
|
|
@@ -2056,16 +2069,19 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
2056
2069
|
gt?: number | undefined;
|
|
2057
2070
|
oSize?: number | undefined;
|
|
2058
2071
|
enabled?: boolean | undefined;
|
|
2072
|
+
scrollToLeftOnChange?: boolean | undefined;
|
|
2059
2073
|
} | undefined;
|
|
2060
2074
|
scrollY?: {
|
|
2061
2075
|
mode?: "default" | "wheel" | undefined;
|
|
2062
2076
|
gt?: number | undefined;
|
|
2063
2077
|
oSize?: number | undefined;
|
|
2064
2078
|
enabled?: boolean | undefined;
|
|
2079
|
+
scrollToTopOnChange?: boolean | undefined;
|
|
2065
2080
|
rHeight?: number | undefined;
|
|
2066
2081
|
adaptive?: boolean | undefined;
|
|
2067
2082
|
} | undefined;
|
|
2068
2083
|
params?: any;
|
|
2084
|
+
uuid?: string | undefined;
|
|
2069
2085
|
showSeq?: boolean | undefined;
|
|
2070
2086
|
selectType?: "checkbox" | "radio" | null | undefined;
|
|
2071
2087
|
rowGroupSetting?: {
|
|
@@ -2121,7 +2137,7 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
2121
2137
|
}[] | undefined;
|
|
2122
2138
|
} | undefined;
|
|
2123
2139
|
}>;
|
|
2124
|
-
updateConfigRef: (
|
|
2140
|
+
updateConfigRef: () => void;
|
|
2125
2141
|
fieldListRef: import("vue").Ref<{
|
|
2126
2142
|
[x: string]: unknown;
|
|
2127
2143
|
property?: string | undefined;
|
|
@@ -2440,8 +2456,13 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
2440
2456
|
}>[]) | undefined;
|
|
2441
2457
|
getTitle?: (() => string) | undefined;
|
|
2442
2458
|
getKey?: (() => string) | undefined;
|
|
2459
|
+
context?: import("../../../es/shared/types").AnyObject | undefined;
|
|
2443
2460
|
}[]>;
|
|
2444
|
-
updateFieldListRef: (
|
|
2461
|
+
updateFieldListRef: () => void;
|
|
2462
|
+
dataTransfer: (data: import("../../../es/shared/types").AnyObject[]) => Promise<import("../../../es/shared/types").AnyObject[]>;
|
|
2463
|
+
tableDataRef: import("vue").Ref<import("../../../es/shared/types").AnyObject[]>;
|
|
2464
|
+
updateTableDataRef: () => Promise<void>;
|
|
2465
|
+
tableHandler: import("../../../es/components/iho-table/src/types").IhoTableHandler;
|
|
2445
2466
|
eventHookHandler: Record<keyof import("vxe-table").VxeTableEventProps, any>;
|
|
2446
2467
|
bindProperties: import("vue").ComputedRef<{
|
|
2447
2468
|
onCopy: any;
|
|
@@ -4420,6 +4441,14 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
4420
4441
|
showInsertStatus?: boolean | undefined;
|
|
4421
4442
|
showAsterisk?: boolean | undefined;
|
|
4422
4443
|
autoClear?: boolean | undefined;
|
|
4444
|
+
beforeEditMethod?: ((params: {
|
|
4445
|
+
row: any;
|
|
4446
|
+
rowIndex: number;
|
|
4447
|
+
column: import("vxe-table").VxeTableDefines.ColumnInfo;
|
|
4448
|
+
columnIndex: number;
|
|
4449
|
+
$table: import("vxe-table").VxeTableConstructor & import("vxe-table").VxeTablePrivateMethods;
|
|
4450
|
+
$grid: import("vxe-table").VxeGridConstructor | null | undefined;
|
|
4451
|
+
}) => boolean) | undefined;
|
|
4423
4452
|
activeMethod?: ((params: {
|
|
4424
4453
|
row: any;
|
|
4425
4454
|
rowIndex: number;
|
|
@@ -4458,16 +4487,19 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
4458
4487
|
gt?: number | undefined;
|
|
4459
4488
|
oSize?: number | undefined;
|
|
4460
4489
|
enabled?: boolean | undefined;
|
|
4490
|
+
scrollToLeftOnChange?: boolean | undefined;
|
|
4461
4491
|
} | undefined;
|
|
4462
4492
|
scrollY?: {
|
|
4463
4493
|
mode?: "default" | "wheel" | undefined;
|
|
4464
4494
|
gt?: number | undefined;
|
|
4465
4495
|
oSize?: number | undefined;
|
|
4466
4496
|
enabled?: boolean | undefined;
|
|
4497
|
+
scrollToTopOnChange?: boolean | undefined;
|
|
4467
4498
|
rHeight?: number | undefined;
|
|
4468
4499
|
adaptive?: boolean | undefined;
|
|
4469
4500
|
} | undefined;
|
|
4470
4501
|
params?: any;
|
|
4502
|
+
uuid?: string | undefined;
|
|
4471
4503
|
showSeq?: boolean | undefined;
|
|
4472
4504
|
selectType?: "checkbox" | "radio" | null | undefined;
|
|
4473
4505
|
rowGroupSetting?: {
|
|
@@ -4523,7 +4555,6 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
4523
4555
|
}[] | undefined;
|
|
4524
4556
|
} | undefined;
|
|
4525
4557
|
}>;
|
|
4526
|
-
dataTransfer: (data: import("../../../es/shared/types").AnyObject[]) => import("../../../es/shared/types").AnyObject[];
|
|
4527
4558
|
IhoTableColumn: import("vue").DefineComponent<{
|
|
4528
4559
|
field: {
|
|
4529
4560
|
type: import("vue").PropType<import("../../../es/components/iho-table/src/types").IhoTableFieldItem>;
|
|
@@ -4538,10 +4569,11 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
4538
4569
|
}, 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<{
|
|
4539
4570
|
tableConfig: {
|
|
4540
4571
|
type: import("vue").PropType<import("../../../es/components/iho-table/src/types").IhoTableConfig>;
|
|
4572
|
+
default: () => {};
|
|
4541
4573
|
};
|
|
4542
4574
|
fieldList: {
|
|
4543
4575
|
type: import("vue").PropType<import("../../../es/components/iho-table/src/types").LowCodeTableFieldItem[]>;
|
|
4544
|
-
|
|
4576
|
+
default: () => never[];
|
|
4545
4577
|
};
|
|
4546
4578
|
tableData: {
|
|
4547
4579
|
type: import("vue").PropType<import("../../../es/shared/types").AnyObject[]>;
|
|
@@ -4610,6 +4642,8 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
4610
4642
|
onActiveCellChangeEnd?: ((...args: any[]) => any) | undefined;
|
|
4611
4643
|
onSettingClick?: ((...args: any[]) => any) | undefined;
|
|
4612
4644
|
}, {
|
|
4645
|
+
fieldList: import("../../../es/components/iho-table/src/types").LowCodeTableFieldItem[];
|
|
4646
|
+
tableConfig: import("../../../es/components/iho-table/src/types").IhoTableConfig;
|
|
4613
4647
|
tableData: import("../../../es/shared/types").AnyObject[];
|
|
4614
4648
|
}>>;
|
|
4615
4649
|
export default IhoTable;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { default, useIhoTablePresetPlugins } from './index2.js';
|
|
2
2
|
export { defineTablePlugin, useTablePlugin } from './src/hooks/useTablePlugin2.js';
|
|
3
|
-
export { AbstractConfigHooks, AbstractDataHooks, AbstractEventHooks, AbstractFieldHooks } from './src/types/pluginType2.js';
|
|
3
|
+
export { AbstractConfigHooks, AbstractDataHooks, AbstractEventHooks, AbstractFieldHooks, AbstractSetupHooks } from './src/types/pluginType2.js';
|