cnhis-design-vue 3.1.22 → 3.1.23-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.
- 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 +141 -277
- 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 +142 -278
- 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.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/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/iho-table/src/plugins/rendererPlugins/inputs/index.d.ts +0 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/inputs/index.js +0 -1
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import { reactive, inject, unref, createVNode, onBeforeUnmount } from 'vue';
|
|
2
|
+
import { traverse } from '../../../../../../../shared/utils/index2.js';
|
|
3
|
+
import { isFunction } from 'lodash-es';
|
|
4
|
+
import '../../../../../index2.js';
|
|
5
|
+
import { INPUT_TYPE, InjectionIhoTableUUID } from '../../../../constants/index2.js';
|
|
6
|
+
import { getRowHeight } from '../../../../utils/index2.js';
|
|
7
|
+
import { isSeparateColumn, getColumnRenderWidth, contentSeparate, getColumnInfoMaxLength, generateSeparateRowData } from './separate-utils2.js';
|
|
8
|
+
import EditSeparate from './edit-separate.js';
|
|
9
|
+
import { defineTablePlugin } from '../../../../hooks/useTablePlugin2.js';
|
|
10
|
+
|
|
11
|
+
function separateRendererPlugins() {
|
|
12
|
+
const pluginName = "separateRendererPlugins";
|
|
13
|
+
const separateRowMap = reactive(/* @__PURE__ */ new Map());
|
|
14
|
+
function getSeparateRowData(uuid, rowData) {
|
|
15
|
+
var _a;
|
|
16
|
+
return (_a = separateRowMap.get(uuid)) == null ? void 0 : _a.get(rowData);
|
|
17
|
+
}
|
|
18
|
+
function setSeparateRowData(uuid, rowData, data) {
|
|
19
|
+
const map = separateRowMap.get(uuid) || /* @__PURE__ */ new WeakMap();
|
|
20
|
+
separateRowMap.set(uuid, map);
|
|
21
|
+
map.set(rowData, data);
|
|
22
|
+
}
|
|
23
|
+
const separateColumnMap = reactive(/* @__PURE__ */ new Map());
|
|
24
|
+
return defineTablePlugin({
|
|
25
|
+
name: pluginName,
|
|
26
|
+
vxe(instance) {
|
|
27
|
+
instance.renderer.add(INPUT_TYPE.SEPARATE, {
|
|
28
|
+
renderCell(renderOpt, {
|
|
29
|
+
column,
|
|
30
|
+
row
|
|
31
|
+
}) {
|
|
32
|
+
var _a;
|
|
33
|
+
const uuid = inject(InjectionIhoTableUUID);
|
|
34
|
+
const separateRow = getSeparateRowData(unref(uuid), row);
|
|
35
|
+
return createVNode("section", null, [(_a = separateRow == null ? void 0 : separateRow.separateData) == null ? void 0 : _a[column.field]]);
|
|
36
|
+
},
|
|
37
|
+
renderEdit(renderOpt, {
|
|
38
|
+
column,
|
|
39
|
+
row
|
|
40
|
+
}) {
|
|
41
|
+
var _a;
|
|
42
|
+
const uuid = inject(InjectionIhoTableUUID);
|
|
43
|
+
const separateRow = getSeparateRowData(unref(uuid), row);
|
|
44
|
+
const height = getRowHeight();
|
|
45
|
+
return [createVNode(EditSeparate, {
|
|
46
|
+
"value": row[column.field],
|
|
47
|
+
"onUpdate:value": ($event) => row[column.field] = $event,
|
|
48
|
+
"dataIndex": separateRow == null ? void 0 : separateRow.index,
|
|
49
|
+
"height": height,
|
|
50
|
+
"column": column,
|
|
51
|
+
"row": row,
|
|
52
|
+
"displayContent": (_a = separateRow == null ? void 0 : separateRow.separateData) == null ? void 0 : _a[column.field]
|
|
53
|
+
}, null)];
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
},
|
|
57
|
+
apply(hooks) {
|
|
58
|
+
hooks.fieldHooks.fieldList.tap(pluginName, (fieldList, {
|
|
59
|
+
uuid
|
|
60
|
+
}) => {
|
|
61
|
+
uuid && separateColumnMap.set(uuid, getSeparateColumn(fieldList));
|
|
62
|
+
return fieldList;
|
|
63
|
+
function getSeparateColumn(fieldList2) {
|
|
64
|
+
return fieldList2.reduce((res, field) => {
|
|
65
|
+
traverse(field, (item) => {
|
|
66
|
+
isSeparateColumn(item) && res.push(item);
|
|
67
|
+
});
|
|
68
|
+
return res;
|
|
69
|
+
}, []);
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
hooks.dataHooks.data.tapPromise(pluginName, async (rowData, {
|
|
73
|
+
insertAfter,
|
|
74
|
+
index: dataIndex,
|
|
75
|
+
$table
|
|
76
|
+
}, config) => {
|
|
77
|
+
if (!config.uuid)
|
|
78
|
+
return;
|
|
79
|
+
const separateColumns = separateColumnMap.get(config.uuid);
|
|
80
|
+
if (!separateColumns || !separateColumns.length)
|
|
81
|
+
return;
|
|
82
|
+
const parsedRowDataInfo = [];
|
|
83
|
+
for (const column of separateColumns) {
|
|
84
|
+
if (!column.field)
|
|
85
|
+
continue;
|
|
86
|
+
const width = await getColumnRenderWidth(column, $table);
|
|
87
|
+
parsedRowDataInfo.push({
|
|
88
|
+
field: column.field,
|
|
89
|
+
data: contentSeparate(rowData[column.field], column, width)
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
Array.from({
|
|
93
|
+
length: getColumnInfoMaxLength(parsedRowDataInfo)
|
|
94
|
+
}).forEach((_, index) => {
|
|
95
|
+
const separateData = generateSeparateRowData(parsedRowDataInfo, index);
|
|
96
|
+
if (index === 0) {
|
|
97
|
+
setSeparateRowData(config.uuid, rowData, {
|
|
98
|
+
index: dataIndex,
|
|
99
|
+
separateData
|
|
100
|
+
});
|
|
101
|
+
rowData.$__SEPARATE_DATA = [separateData];
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
const data = {
|
|
105
|
+
$__SEPARATE: true
|
|
106
|
+
};
|
|
107
|
+
setSeparateRowData(config.uuid, data, {
|
|
108
|
+
index: dataIndex,
|
|
109
|
+
separateData
|
|
110
|
+
});
|
|
111
|
+
rowData.$__SEPARATE_DATA.push(separateData);
|
|
112
|
+
insertAfter(data);
|
|
113
|
+
});
|
|
114
|
+
});
|
|
115
|
+
hooks.eventHooks.onResizableChange.tap(pluginName, async ({
|
|
116
|
+
column
|
|
117
|
+
}, context) => {
|
|
118
|
+
if (!isSeparateColumn(column))
|
|
119
|
+
return;
|
|
120
|
+
context.updateTableDataRef();
|
|
121
|
+
});
|
|
122
|
+
hooks.configHooks.editConfig.tap(pluginName, (editConfig = {}, config) => {
|
|
123
|
+
editConfig.activeMethod = avoidOperationDecorator(editConfig.activeMethod);
|
|
124
|
+
return editConfig;
|
|
125
|
+
});
|
|
126
|
+
hooks.configHooks.checkboxConfig.tap(pluginName, (checkboxConfig = {}, config) => {
|
|
127
|
+
checkboxConfig.checkMethod = avoidOperationDecorator(checkboxConfig.checkMethod);
|
|
128
|
+
checkboxConfig.visibleMethod = avoidOperationDecorator(checkboxConfig.visibleMethod);
|
|
129
|
+
return checkboxConfig;
|
|
130
|
+
});
|
|
131
|
+
function avoidOperationDecorator(oldFn) {
|
|
132
|
+
return (...args) => {
|
|
133
|
+
var _a;
|
|
134
|
+
if ((_a = args[0].row) == null ? void 0 : _a.$__SEPARATE)
|
|
135
|
+
return false;
|
|
136
|
+
if (isFunction(oldFn)) {
|
|
137
|
+
return oldFn(...args);
|
|
138
|
+
}
|
|
139
|
+
return true;
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
hooks.setupHooks.setup.tap(pluginName, (config) => {
|
|
143
|
+
if (config.value.uuid) {
|
|
144
|
+
separateRowMap.set(config.value.uuid, /* @__PURE__ */ new WeakMap());
|
|
145
|
+
separateColumnMap.set(config.value.uuid, []);
|
|
146
|
+
}
|
|
147
|
+
onBeforeUnmount(() => {
|
|
148
|
+
if (config.value.uuid) {
|
|
149
|
+
separateRowMap.delete(config.value.uuid);
|
|
150
|
+
separateColumnMap.delete(config.value.uuid);
|
|
151
|
+
}
|
|
152
|
+
});
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
export { separateRendererPlugins };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { AnyObject, Nullable } from '../../../../../../../../es/shared/types';
|
|
2
|
+
import { MaybeRef } from '@vueuse/core';
|
|
3
|
+
import { VxeTableDefines, VxeTableInstance } from 'vxe-table';
|
|
4
|
+
import { IhoTableFieldItem } from '../../../../../../../../es/components/iho-table';
|
|
5
|
+
declare type ParsedRowDataInfo = {
|
|
6
|
+
field: string;
|
|
7
|
+
data: string[];
|
|
8
|
+
};
|
|
9
|
+
export declare function getColumnInfoMaxLength(parsedRowDataInfo: ParsedRowDataInfo[]): number;
|
|
10
|
+
export declare function getColumnRenderWidth(column: AnyObject, $table: MaybeRef<Nullable<VxeTableInstance>>): Promise<number>;
|
|
11
|
+
export declare function generateSeparateRowData(parsedRowDataInfo: ParsedRowDataInfo[], index: number): AnyObject;
|
|
12
|
+
export declare function contentSeparate(value: unknown, field: IhoTableFieldItem, width: number): any[];
|
|
13
|
+
export declare function isSeparateColumn(field: IhoTableFieldItem | VxeTableDefines.ColumnInfo): boolean | "" | undefined;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { contentSeparate, generateSeparateRowData, getColumnInfoMaxLength, getColumnRenderWidth, isSeparateColumn } from './separate-utils2.js';
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { getStringWidth } from '../../../../../../../shared/utils/index2.js';
|
|
2
|
+
import { isNumber, isArray, cloneDeep, isString } from 'lodash-es';
|
|
3
|
+
import { nextTick, unref } from 'vue';
|
|
4
|
+
import { INPUT_TYPE } from '../../../../constants/index2.js';
|
|
5
|
+
|
|
6
|
+
function getColumnInfoMaxLength(parsedRowDataInfo) {
|
|
7
|
+
return Math.max(...parsedRowDataInfo.map((r) => r.data.length), 1);
|
|
8
|
+
}
|
|
9
|
+
async function getColumnRenderWidth(column, $table) {
|
|
10
|
+
const prev = getRenderWidth();
|
|
11
|
+
if (!prev) {
|
|
12
|
+
await nextTick();
|
|
13
|
+
}
|
|
14
|
+
return getRenderWidth() || getColumnWidth();
|
|
15
|
+
function getRenderWidth() {
|
|
16
|
+
var _a, _b;
|
|
17
|
+
return (_b = (_a = unref($table)) == null ? void 0 : _a.getColumnByField(column.field)) == null ? void 0 : _b.renderWidth;
|
|
18
|
+
}
|
|
19
|
+
function getColumnWidth() {
|
|
20
|
+
return isNumber(column.width) ? column.width : 64;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
function generateSeparateRowData(parsedRowDataInfo, index) {
|
|
24
|
+
return parsedRowDataInfo.reduce((res, info) => {
|
|
25
|
+
res[info.field] = info.data[index];
|
|
26
|
+
return res;
|
|
27
|
+
}, {});
|
|
28
|
+
}
|
|
29
|
+
function contentSeparate(value, field, width) {
|
|
30
|
+
if (isArray(value)) {
|
|
31
|
+
return value.map((row) => {
|
|
32
|
+
var _a, _b, _c;
|
|
33
|
+
return (_c = (_b = (_a = field.context) == null ? void 0 : _a.separateFormatter) == null ? void 0 : _b.call(_a, cloneDeep(row))) != null ? _c : row;
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
if (!isString(value) || !isNumber(width))
|
|
37
|
+
return [value];
|
|
38
|
+
width -= 24;
|
|
39
|
+
return [...value].reduce((res, char) => {
|
|
40
|
+
const latestString = res[res.length - 1];
|
|
41
|
+
if (getStringWidth(latestString + char) > width) {
|
|
42
|
+
res.push(char);
|
|
43
|
+
} else {
|
|
44
|
+
res[res.length - 1] = latestString + char;
|
|
45
|
+
}
|
|
46
|
+
return res;
|
|
47
|
+
}, [""]);
|
|
48
|
+
}
|
|
49
|
+
function isSeparateColumn(field) {
|
|
50
|
+
var _a;
|
|
51
|
+
return field.field && ((_a = field.editRender) == null ? void 0 : _a.name) === INPUT_TYPE.SEPARATE;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export { contentSeparate, generateSeparateRowData, getColumnInfoMaxLength, getColumnRenderWidth, isSeparateColumn };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export * from './widgets';
|
|
2
|
-
export * from './
|
|
2
|
+
export * from './editableWidgets';
|
|
@@ -4,4 +4,5 @@ export { colorRendererPlugin } from './widgets/colorRendererPlugin.js';
|
|
|
4
4
|
export { seqRendererPlugin } from './widgets/seqRendererPlugin.js';
|
|
5
5
|
export { checkRendererPlugin } from './widgets/checkRendererPlugin.js';
|
|
6
6
|
export { pictureRendererPlugin } from './widgets/pictureRendererPlugin.js';
|
|
7
|
-
export { inputRendererPlugins } from './
|
|
7
|
+
export { inputRendererPlugins } from './editableWidgets/inputRendererPlugins.js';
|
|
8
|
+
export { separateRendererPlugins } from './editableWidgets/separateRendererPlugin/index.js';
|
package/es/components/iho-table/src/plugins/rendererPlugins/widgets/pictureRendererPlugin.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, watch, createVNode } from 'vue';
|
|
1
|
+
import { defineComponent, watch, onBeforeUnmount, createVNode } from 'vue';
|
|
2
2
|
import { arrayed } from '../../../../../../shared/utils/index2.js';
|
|
3
3
|
import '../../../../index2.js';
|
|
4
4
|
import { WIDGET_TYPE } from '../../../constants/index2.js';
|
|
@@ -77,6 +77,7 @@ const ViewerImage = defineComponent({
|
|
|
77
77
|
}, {
|
|
78
78
|
deep: true
|
|
79
79
|
});
|
|
80
|
+
onBeforeUnmount(() => $viewer == null ? void 0 : $viewer.destroy());
|
|
80
81
|
return () => createVNode("img", {
|
|
81
82
|
"style": "cursor:pointer",
|
|
82
83
|
"alt": "",
|
|
@@ -13,6 +13,7 @@ declare type GetUnionLast<U> = UnionToIntersectionFn<U> extends () => infer I ?
|
|
|
13
13
|
declare type Prepend<Tuple extends unknown[], First> = [First, ...Tuple];
|
|
14
14
|
export declare type UnionToTuple<Union, T extends unknown[] = [], Last = GetUnionLast<Union>> = [Union] extends [never] ? T : UnionToTuple<Exclude<Union, Last>, Prepend<T, Last>>;
|
|
15
15
|
export declare type IhoTableConfig = VxeTableProps & Partial<{
|
|
16
|
+
uuid: string;
|
|
16
17
|
showSeq: boolean;
|
|
17
18
|
selectType: Exclude<VxeTableDefines.ColumnInfo['type'], 'seq' | 'expand' | 'html'>;
|
|
18
19
|
rowGroupSetting: Partial<Record<TupleToUnion<typeof IhoTableRowGroupSequence>, IhoTableRowGroupItem[]>>;
|
|
@@ -20,6 +21,8 @@ export declare type IhoTableConfig = VxeTableProps & Partial<{
|
|
|
20
21
|
}>;
|
|
21
22
|
export declare type IhoTableFieldItem = {
|
|
22
23
|
[K in keyof VxeTableDefines.ColumnInfo]?: K extends 'children' ? IhoTableFieldItem[] : K extends keyof VxeTableDefines.ColumnInfo ? VxeTableDefines.ColumnInfo[K] : never;
|
|
24
|
+
} & {
|
|
25
|
+
context?: AnyObject;
|
|
23
26
|
} & {
|
|
24
27
|
[K: string]: unknown;
|
|
25
28
|
};
|
|
@@ -32,10 +35,11 @@ export declare type LowCodeTableFieldItem = {
|
|
|
32
35
|
columnName: string;
|
|
33
36
|
[K: string]: unknown;
|
|
34
37
|
} & Partial<{
|
|
35
|
-
id
|
|
36
|
-
title
|
|
37
|
-
colWidth
|
|
38
|
+
id: number | string;
|
|
39
|
+
title: string;
|
|
40
|
+
colWidth: string | number;
|
|
38
41
|
settingObj: LowCodeTableSettingObj;
|
|
42
|
+
context: AnyObject;
|
|
39
43
|
}>;
|
|
40
44
|
export declare type IhoFormChangePayload = {
|
|
41
45
|
column: VxeTableDefines.ColumnInfo;
|
|
@@ -44,3 +48,4 @@ export declare type IhoFormChangePayload = {
|
|
|
44
48
|
index: number;
|
|
45
49
|
};
|
|
46
50
|
export declare type EventListenerToEventName<T extends string> = T extends `on${infer R}` ? R extends `${infer F}${infer L}` ? `${Lowercase<F>}${L}` : never : never;
|
|
51
|
+
export declare type IhoTableHandler = Record<'updateConfigRef' | 'updateFieldListRef' | 'updateTableDataRef', () => void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { AbstractConfigHooks, AbstractDataHooks, AbstractEventHooks, AbstractFieldHooks } from './pluginType2.js';
|
|
1
|
+
export { AbstractConfigHooks, AbstractDataHooks, AbstractEventHooks, AbstractFieldHooks, AbstractSetupHooks } from './pluginType2.js';
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import { AnyObject, ArrayAble, Nullable } from '../../../../../es/shared/types';
|
|
2
|
-
import { AsyncParallelHook, SyncHook, SyncWaterfallHook } from '../../../../../es/shared/utils/tapable';
|
|
1
|
+
import { AnyObject, ArrayAble, Func, NotNull, Nullable } from '../../../../../es/shared/types';
|
|
2
|
+
import { AsyncParallelHook, AsyncSeriesHook, SyncHook, SyncWaterfallHook } from '../../../../../es/shared/utils/tapable';
|
|
3
|
+
import { MaybeRef } from '@vueuse/core';
|
|
4
|
+
import { Ref } from 'vue';
|
|
3
5
|
import { VxeGlobalCommands, VxeGlobalFormats, VxeGlobalHooks, VxeGlobalMenus, VxeGlobalRenderer, VxeTableInstance } from 'vxe-table';
|
|
4
6
|
import { VxeTableEventProps, VxeTableEvents } from 'vxe-table/types/table';
|
|
5
7
|
import { VxeGlobalInterceptor } from 'vxe-table/types/v-x-e-table';
|
|
6
|
-
import { IhoTableConfig, IhoTableFieldItem } from '.';
|
|
8
|
+
import { IhoTableConfig, IhoTableFieldItem, IhoTableHandler } from '.';
|
|
7
9
|
export declare type IhoTableInstance = {
|
|
8
10
|
interceptor: VxeGlobalInterceptor;
|
|
9
11
|
renderer: VxeGlobalRenderer;
|
|
@@ -22,27 +24,29 @@ export declare type TableHooks = Readonly<{
|
|
|
22
24
|
fieldHooks: AbstractFieldHooks;
|
|
23
25
|
eventHooks: AbstractEventHooks;
|
|
24
26
|
dataHooks: AbstractDataHooks;
|
|
27
|
+
setupHooks: AbstractSetupHooks;
|
|
25
28
|
}>;
|
|
26
29
|
export declare type WithTableConfig<T = []> = T extends any[] ? [...T, IhoTableConfig] : [T, IhoTableConfig];
|
|
30
|
+
declare type ConfigHookType<T> = SyncWaterfallHook<WithTableConfig<T>>;
|
|
27
31
|
export declare abstract class AbstractConfigHooks {
|
|
28
32
|
abstract readonly config: SyncWaterfallHook<IhoTableConfig>;
|
|
29
|
-
abstract readonly rowConfig:
|
|
30
|
-
abstract readonly editConfig:
|
|
31
|
-
abstract readonly columnConfig:
|
|
32
|
-
abstract readonly resizableConfig:
|
|
33
|
-
abstract readonly seqConfig:
|
|
34
|
-
abstract readonly sortConfig:
|
|
35
|
-
abstract readonly filterConfig:
|
|
36
|
-
abstract readonly radioConfig:
|
|
37
|
-
abstract readonly checkboxConfig:
|
|
38
|
-
abstract readonly expandConfig:
|
|
39
|
-
abstract readonly treeConfig:
|
|
40
|
-
abstract readonly mouseConfig:
|
|
41
|
-
abstract readonly menuConfig:
|
|
42
|
-
abstract readonly keyboardConfig:
|
|
43
|
-
abstract readonly scrollY:
|
|
44
|
-
abstract readonly scrollX:
|
|
45
|
-
abstract readonly editRules:
|
|
33
|
+
abstract readonly rowConfig: ConfigHookType<IhoTableConfig['rowConfig']>;
|
|
34
|
+
abstract readonly editConfig: ConfigHookType<IhoTableConfig['editConfig']>;
|
|
35
|
+
abstract readonly columnConfig: ConfigHookType<IhoTableConfig['columnConfig']>;
|
|
36
|
+
abstract readonly resizableConfig: ConfigHookType<IhoTableConfig['resizableConfig']>;
|
|
37
|
+
abstract readonly seqConfig: ConfigHookType<IhoTableConfig['seqConfig']>;
|
|
38
|
+
abstract readonly sortConfig: ConfigHookType<IhoTableConfig['sortConfig']>;
|
|
39
|
+
abstract readonly filterConfig: ConfigHookType<IhoTableConfig['filterConfig']>;
|
|
40
|
+
abstract readonly radioConfig: ConfigHookType<IhoTableConfig['radioConfig']>;
|
|
41
|
+
abstract readonly checkboxConfig: ConfigHookType<IhoTableConfig['checkboxConfig']>;
|
|
42
|
+
abstract readonly expandConfig: ConfigHookType<IhoTableConfig['expandConfig']>;
|
|
43
|
+
abstract readonly treeConfig: ConfigHookType<IhoTableConfig['treeConfig']>;
|
|
44
|
+
abstract readonly mouseConfig: ConfigHookType<IhoTableConfig['mouseConfig']>;
|
|
45
|
+
abstract readonly menuConfig: ConfigHookType<IhoTableConfig['menuConfig']>;
|
|
46
|
+
abstract readonly keyboardConfig: ConfigHookType<IhoTableConfig['keyboardConfig']>;
|
|
47
|
+
abstract readonly scrollY: ConfigHookType<IhoTableConfig['scrollY']>;
|
|
48
|
+
abstract readonly scrollX: ConfigHookType<IhoTableConfig['scrollX']>;
|
|
49
|
+
abstract readonly editRules: ConfigHookType<IhoTableConfig['editRules']>;
|
|
46
50
|
}
|
|
47
51
|
export interface FieldHookContext {
|
|
48
52
|
index: number;
|
|
@@ -56,78 +60,88 @@ export declare abstract class AbstractFieldHooks {
|
|
|
56
60
|
abstract readonly fieldList: SyncWaterfallHook<WithTableConfig<[IhoTableFieldItem[]]>>;
|
|
57
61
|
abstract readonly fieldEnd: AsyncParallelHook<WithTableConfig>;
|
|
58
62
|
}
|
|
59
|
-
export declare type WithIhoEventContext<T> = T extends any[] ? [...T,
|
|
63
|
+
export declare type WithIhoEventContext<T> = T extends any[] ? [...T, IhoTableHandler & {
|
|
64
|
+
$table: Nullable<VxeTableInstance>;
|
|
65
|
+
}, IhoTableConfig] : [T, IhoTableHandler & {
|
|
66
|
+
$table: Nullable<VxeTableInstance>;
|
|
67
|
+
}, IhoTableConfig];
|
|
68
|
+
declare type EventHookType<T extends Func> = AsyncParallelHook<WithIhoEventContext<Parameters<T>>>;
|
|
60
69
|
declare type VxeEventTypes = Required<{
|
|
61
|
-
readonly [K in keyof VxeTableEventProps]:
|
|
70
|
+
readonly [K in keyof VxeTableEventProps]: EventHookType<NotNull<VxeTableEventProps[K]>>;
|
|
62
71
|
}>;
|
|
63
72
|
export declare abstract class AbstractEventHooks implements VxeEventTypes {
|
|
64
|
-
abstract readonly onKeydownStart:
|
|
65
|
-
abstract readonly onKeydown:
|
|
66
|
-
abstract readonly onKeydownEnd:
|
|
67
|
-
abstract readonly onPaste:
|
|
68
|
-
abstract readonly onCopy:
|
|
69
|
-
abstract readonly onCut:
|
|
70
|
-
abstract readonly onCurrentChange:
|
|
71
|
-
abstract readonly onRadioChange:
|
|
72
|
-
abstract readonly onCheckboxChange:
|
|
73
|
-
abstract readonly onCheckboxAll:
|
|
74
|
-
abstract readonly onCheckboxRangeStart:
|
|
75
|
-
abstract readonly onCheckboxRangeChange:
|
|
76
|
-
abstract readonly onCheckboxRangeEnd:
|
|
77
|
-
abstract readonly onCellClick:
|
|
78
|
-
abstract readonly onCellDblclick:
|
|
79
|
-
abstract readonly onCellMenu:
|
|
80
|
-
abstract readonly onCellMouseenter:
|
|
81
|
-
abstract readonly onCellMouseleave:
|
|
82
|
-
abstract readonly onHeaderCellClick:
|
|
83
|
-
abstract readonly onHeaderCellDblclick:
|
|
84
|
-
abstract readonly onHeaderCellMenu:
|
|
85
|
-
abstract readonly onFooterCellClick:
|
|
86
|
-
abstract readonly onFooterCellDblclick:
|
|
87
|
-
abstract readonly onFooterCellMenu:
|
|
88
|
-
abstract readonly onSortChange:
|
|
89
|
-
abstract readonly onFilterChange:
|
|
90
|
-
abstract readonly onFilterVisible:
|
|
91
|
-
abstract readonly onResizableChange:
|
|
92
|
-
abstract readonly onToggleRowExpand:
|
|
93
|
-
abstract readonly onToggleTreeExpand:
|
|
94
|
-
abstract readonly onMenuClick:
|
|
95
|
-
abstract readonly onEditClosed:
|
|
96
|
-
abstract readonly onEditActived:
|
|
97
|
-
abstract readonly onEditDisabled:
|
|
98
|
-
abstract readonly onValidError:
|
|
99
|
-
abstract readonly onScroll:
|
|
100
|
-
abstract readonly onCustom:
|
|
101
|
-
abstract readonly onOpenFnr:
|
|
102
|
-
abstract readonly onFnrChange:
|
|
103
|
-
abstract readonly onFnrFind:
|
|
104
|
-
abstract readonly onFnrFindAll:
|
|
105
|
-
abstract readonly onFnrReplace:
|
|
106
|
-
abstract readonly onFnrReplaceAll:
|
|
107
|
-
abstract readonly onCellAreaCopy:
|
|
108
|
-
abstract readonly onCellAreaCut:
|
|
109
|
-
abstract readonly onCellAreaPaste:
|
|
110
|
-
abstract readonly onCellAreaMerge:
|
|
111
|
-
abstract readonly onClearCellAreaMerge:
|
|
112
|
-
abstract readonly onHeaderCellAreaSelection:
|
|
113
|
-
abstract readonly onCellAreaSelectionStart:
|
|
114
|
-
abstract readonly onCellAreaSelectionDrag:
|
|
115
|
-
abstract readonly onCellAreaSelectionEnd:
|
|
116
|
-
abstract readonly onCellAreaExtensionStart:
|
|
117
|
-
abstract readonly onCellAreaExtensionDrag:
|
|
118
|
-
abstract readonly onCellAreaExtensionEnd:
|
|
119
|
-
abstract readonly onCellAreaArrowsStart:
|
|
120
|
-
abstract readonly onCellAreaArrowsEnd:
|
|
121
|
-
abstract readonly onActiveCellChangeStart:
|
|
122
|
-
abstract readonly onActiveCellChangeEnd:
|
|
73
|
+
abstract readonly onKeydownStart: EventHookType<VxeTableEvents.KeydownStart>;
|
|
74
|
+
abstract readonly onKeydown: EventHookType<VxeTableEvents.Keydown>;
|
|
75
|
+
abstract readonly onKeydownEnd: EventHookType<VxeTableEvents.KeydownEnd>;
|
|
76
|
+
abstract readonly onPaste: EventHookType<VxeTableEvents.Paste>;
|
|
77
|
+
abstract readonly onCopy: EventHookType<VxeTableEvents.Copy>;
|
|
78
|
+
abstract readonly onCut: EventHookType<VxeTableEvents.Cut>;
|
|
79
|
+
abstract readonly onCurrentChange: EventHookType<VxeTableEvents.CurrentChange>;
|
|
80
|
+
abstract readonly onRadioChange: EventHookType<VxeTableEvents.RadioChange>;
|
|
81
|
+
abstract readonly onCheckboxChange: EventHookType<VxeTableEvents.CheckboxChange>;
|
|
82
|
+
abstract readonly onCheckboxAll: EventHookType<VxeTableEvents.CheckboxAll>;
|
|
83
|
+
abstract readonly onCheckboxRangeStart: EventHookType<VxeTableEvents.CheckboxRangeStart>;
|
|
84
|
+
abstract readonly onCheckboxRangeChange: EventHookType<VxeTableEvents.CheckboxRangeChange>;
|
|
85
|
+
abstract readonly onCheckboxRangeEnd: EventHookType<VxeTableEvents.CheckboxRangeEnd>;
|
|
86
|
+
abstract readonly onCellClick: EventHookType<VxeTableEvents.CellClick>;
|
|
87
|
+
abstract readonly onCellDblclick: EventHookType<VxeTableEvents.CellDblclick>;
|
|
88
|
+
abstract readonly onCellMenu: EventHookType<VxeTableEvents.CellMenu>;
|
|
89
|
+
abstract readonly onCellMouseenter: EventHookType<VxeTableEvents.CellMouseenter>;
|
|
90
|
+
abstract readonly onCellMouseleave: EventHookType<VxeTableEvents.CellMouseleave>;
|
|
91
|
+
abstract readonly onHeaderCellClick: EventHookType<VxeTableEvents.HeaderCellClick>;
|
|
92
|
+
abstract readonly onHeaderCellDblclick: EventHookType<VxeTableEvents.HeaderCellDblclick>;
|
|
93
|
+
abstract readonly onHeaderCellMenu: EventHookType<VxeTableEvents.HeaderCellMenu>;
|
|
94
|
+
abstract readonly onFooterCellClick: EventHookType<VxeTableEvents.FooterCellClick>;
|
|
95
|
+
abstract readonly onFooterCellDblclick: EventHookType<VxeTableEvents.FooterCellDblclick>;
|
|
96
|
+
abstract readonly onFooterCellMenu: EventHookType<VxeTableEvents.FooterCellMenu>;
|
|
97
|
+
abstract readonly onSortChange: EventHookType<VxeTableEvents.SortChange>;
|
|
98
|
+
abstract readonly onFilterChange: EventHookType<VxeTableEvents.FilterChange>;
|
|
99
|
+
abstract readonly onFilterVisible: EventHookType<VxeTableEvents.FilterVisible>;
|
|
100
|
+
abstract readonly onResizableChange: EventHookType<VxeTableEvents.ResizableChange>;
|
|
101
|
+
abstract readonly onToggleRowExpand: EventHookType<VxeTableEvents.ToggleRowExpand>;
|
|
102
|
+
abstract readonly onToggleTreeExpand: EventHookType<VxeTableEvents.ToggleTreeExpand>;
|
|
103
|
+
abstract readonly onMenuClick: EventHookType<VxeTableEvents.MenuClick>;
|
|
104
|
+
abstract readonly onEditClosed: EventHookType<VxeTableEvents.EditClosed>;
|
|
105
|
+
abstract readonly onEditActived: EventHookType<VxeTableEvents.EditActived>;
|
|
106
|
+
abstract readonly onEditDisabled: EventHookType<VxeTableEvents.EditDisabled>;
|
|
107
|
+
abstract readonly onValidError: EventHookType<VxeTableEvents.ValidError>;
|
|
108
|
+
abstract readonly onScroll: EventHookType<VxeTableEvents.Scroll>;
|
|
109
|
+
abstract readonly onCustom: EventHookType<VxeTableEvents.Custom>;
|
|
110
|
+
abstract readonly onOpenFnr: EventHookType<VxeTableEvents.OpenFnr>;
|
|
111
|
+
abstract readonly onFnrChange: EventHookType<VxeTableEvents.FnrChange>;
|
|
112
|
+
abstract readonly onFnrFind: EventHookType<VxeTableEvents.FnrFind>;
|
|
113
|
+
abstract readonly onFnrFindAll: EventHookType<VxeTableEvents.FnrFindAll>;
|
|
114
|
+
abstract readonly onFnrReplace: EventHookType<VxeTableEvents.FnrReplace>;
|
|
115
|
+
abstract readonly onFnrReplaceAll: EventHookType<VxeTableEvents.FnrReplaceAll>;
|
|
116
|
+
abstract readonly onCellAreaCopy: EventHookType<VxeTableEvents.CellAreaCopy>;
|
|
117
|
+
abstract readonly onCellAreaCut: EventHookType<VxeTableEvents.CellAreaCut>;
|
|
118
|
+
abstract readonly onCellAreaPaste: EventHookType<VxeTableEvents.CellAreaPaste>;
|
|
119
|
+
abstract readonly onCellAreaMerge: EventHookType<VxeTableEvents.CellAreaMerge>;
|
|
120
|
+
abstract readonly onClearCellAreaMerge: EventHookType<VxeTableEvents.ClearCellAreaMerge>;
|
|
121
|
+
abstract readonly onHeaderCellAreaSelection: EventHookType<VxeTableEvents.HeaderCellAreaSelection>;
|
|
122
|
+
abstract readonly onCellAreaSelectionStart: EventHookType<VxeTableEvents.CellAreaSelectionStart>;
|
|
123
|
+
abstract readonly onCellAreaSelectionDrag: EventHookType<VxeTableEvents.CellAreaSelectionDrag>;
|
|
124
|
+
abstract readonly onCellAreaSelectionEnd: EventHookType<VxeTableEvents.CellAreaSelectionEnd>;
|
|
125
|
+
abstract readonly onCellAreaExtensionStart: EventHookType<VxeTableEvents.CellAreaExtensionStart>;
|
|
126
|
+
abstract readonly onCellAreaExtensionDrag: EventHookType<VxeTableEvents.CellAreaExtensionDrag>;
|
|
127
|
+
abstract readonly onCellAreaExtensionEnd: EventHookType<VxeTableEvents.CellAreaExtensionEnd>;
|
|
128
|
+
abstract readonly onCellAreaArrowsStart: EventHookType<VxeTableEvents.CellAreaArrowsStart>;
|
|
129
|
+
abstract readonly onCellAreaArrowsEnd: EventHookType<VxeTableEvents.CellAreaArrowsEnd>;
|
|
130
|
+
abstract readonly onActiveCellChangeStart: EventHookType<VxeTableEvents.ActiveCellChangeStart>;
|
|
131
|
+
abstract readonly onActiveCellChangeEnd: EventHookType<VxeTableEvents.ActiveCellChangeEnd>;
|
|
123
132
|
}
|
|
124
133
|
declare type DataHookContext = {
|
|
125
134
|
remove(): void;
|
|
135
|
+
$table: MaybeRef<Nullable<VxeTableInstance>>;
|
|
136
|
+
index: number;
|
|
126
137
|
insertBefore(data: ArrayAble<AnyObject>): void;
|
|
127
138
|
insertAfter(data: ArrayAble<AnyObject>): void;
|
|
128
139
|
};
|
|
129
|
-
export declare type WithTableDataContext<T> = T extends any[] ? [...T, DataHookContext
|
|
140
|
+
export declare type WithTableDataContext<T> = T extends any[] ? [...T, ...WithTableConfig<DataHookContext>] : [T, ...WithTableConfig<DataHookContext>];
|
|
130
141
|
export declare abstract class AbstractDataHooks {
|
|
131
|
-
abstract readonly data:
|
|
142
|
+
abstract readonly data: AsyncSeriesHook<WithTableDataContext<[AnyObject]>>;
|
|
143
|
+
}
|
|
144
|
+
export declare abstract class AbstractSetupHooks {
|
|
145
|
+
abstract readonly setup: SyncHook<[Ref<IhoTableConfig>, Ref<IhoTableFieldItem[]>]>;
|
|
132
146
|
}
|
|
133
147
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { AbstractConfigHooks, AbstractDataHooks, AbstractEventHooks, AbstractFieldHooks } from './pluginType2.js';
|
|
1
|
+
export { AbstractConfigHooks, AbstractDataHooks, AbstractEventHooks, AbstractFieldHooks, AbstractSetupHooks } from './pluginType2.js';
|
|
@@ -6,5 +6,7 @@ class AbstractEventHooks {
|
|
|
6
6
|
}
|
|
7
7
|
class AbstractDataHooks {
|
|
8
8
|
}
|
|
9
|
+
class AbstractSetupHooks {
|
|
10
|
+
}
|
|
9
11
|
|
|
10
|
-
export { AbstractConfigHooks, AbstractDataHooks, AbstractEventHooks, AbstractFieldHooks };
|
|
12
|
+
export { AbstractConfigHooks, AbstractDataHooks, AbstractEventHooks, AbstractFieldHooks, AbstractSetupHooks };
|
|
@@ -11,7 +11,7 @@ function getRowHeight() {
|
|
|
11
11
|
var _a, _b, _c;
|
|
12
12
|
const config = inject(InjectionIhoTableConfig);
|
|
13
13
|
if (!config) {
|
|
14
|
-
IhoTableWarn("
|
|
14
|
+
IhoTableWarn("this function(getRowHeight) only can be used in setup environment");
|
|
15
15
|
}
|
|
16
16
|
return (_c = (_b = (_a = config == null ? void 0 : config.value) == null ? void 0 : _a.rowConfig) == null ? void 0 : _b.height) != null ? _c : 32;
|
|
17
17
|
}
|
package/es/components/index.js
CHANGED
|
@@ -36,7 +36,7 @@ export { useShortcutSignature } from './shortcut-provider/src/hooks/useShortcutS
|
|
|
36
36
|
export { useColumnConfigAdaptor } from './big-table/src/hooks/useColumnConfigAdaptor2.js';
|
|
37
37
|
export { Print } from './button-print/src/utils/print2.js';
|
|
38
38
|
export { defineTablePlugin, useTablePlugin } from './iho-table/src/hooks/useTablePlugin2.js';
|
|
39
|
-
export { AbstractConfigHooks, AbstractDataHooks, AbstractEventHooks, AbstractFieldHooks } from './iho-table/src/types/pluginType2.js';
|
|
39
|
+
export { AbstractConfigHooks, AbstractDataHooks, AbstractEventHooks, AbstractFieldHooks, AbstractSetupHooks } from './iho-table/src/types/pluginType2.js';
|
|
40
40
|
export { CLabelFormContent, default as CSelectLabel } from './select-label/index2.js';
|
|
41
41
|
export { CCheckbox, CDatetime, CRadio, CScaleView, CSelect } from './scale-view/index2.js';
|
|
42
42
|
export { default as CMap } from './map/index2.js';
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
1
2
|
import { SFCWithInstall } from '../../../es/shared/types';
|
|
2
3
|
declare const InfoHeader: SFCWithInstall<import("vue").DefineComponent<{
|
|
3
4
|
compact: {
|
|
@@ -130,6 +131,7 @@ declare const InfoHeader: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
130
131
|
};
|
|
131
132
|
}[]>;
|
|
132
133
|
updateColumn: () => Promise<void>;
|
|
134
|
+
timer: NodeJS.Timer;
|
|
133
135
|
NDescriptions: any;
|
|
134
136
|
NDescriptionsItem: import("vue").DefineComponent<{
|
|
135
137
|
readonly label: StringConstructor;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, ref, nextTick, onMounted, watch, openBlock, createElementBlock, normalizeClass, normalizeStyle, createElementVNode, renderSlot, createCommentVNode, Fragment, toDisplayString, renderList, withDirectives, createBlock, unref, mergeProps, withCtx, createTextVNode, vShow, createVNode } from 'vue';
|
|
1
|
+
import { defineComponent, ref, nextTick, onMounted, watch, onBeforeUnmount, openBlock, createElementBlock, normalizeClass, normalizeStyle, createElementVNode, renderSlot, createCommentVNode, Fragment, toDisplayString, renderList, withDirectives, createBlock, unref, mergeProps, withCtx, createTextVNode, vShow, createVNode } from 'vue';
|
|
2
2
|
import { NTag, NDescriptions, NDescriptionsItem } from 'naive-ui';
|
|
3
3
|
import { useThrottleFn, useEventListener } from '@vueuse/core';
|
|
4
4
|
import script$1 from '../../../shared/components/SlotRender/SlotRender.js';
|
|
@@ -104,6 +104,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
104
104
|
update: updateColumn
|
|
105
105
|
});
|
|
106
106
|
useEventListener(window, "resize", updateColumn);
|
|
107
|
+
let timer = setInterval(updateColumn, 700);
|
|
108
|
+
onBeforeUnmount(() => clearInterval(timer));
|
|
107
109
|
return (_ctx, _cache) => {
|
|
108
110
|
return openBlock(), createElementBlock("div", {
|
|
109
111
|
class: normalizeClass(["c-info-header", { "is-compact": __props.compact }]),
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
1
2
|
import { AnyObject } from '../../../../es/shared/types';
|
|
2
3
|
import { CSSProperties, PropType } from 'vue';
|
|
3
4
|
declare type PatientTag = Partial<{
|
|
@@ -132,6 +133,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
132
133
|
};
|
|
133
134
|
}[]>;
|
|
134
135
|
updateColumn: () => Promise<void>;
|
|
136
|
+
timer: NodeJS.Timer;
|
|
135
137
|
NDescriptions: any;
|
|
136
138
|
NDescriptionsItem: import("vue").DefineComponent<{
|
|
137
139
|
readonly label: StringConstructor;
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
+
import { AnyObject, ArrayAble } from '../../../es/shared/types';
|
|
1
2
|
import { App, Component } from 'vue';
|
|
3
|
+
export declare function traverse<T extends ArrayAble<AnyObject>>(target: T, handler: (item: T extends Array<infer P> ? P : T) => void, keys?: ArrayAble<string>): void;
|
|
2
4
|
export declare function safeComponentRegister(app: App, component: Component, cName?: string | undefined, scheduler?: () => void): void;
|
|
3
5
|
export declare function generateTimeFormat(format: string): string | undefined;
|
|
4
6
|
export declare function arrayed<T>(maybeArray: T): T extends Array<any> ? T : [T];
|
|
7
|
+
export declare function uuidGenerator(): string;
|
|
8
|
+
export declare const getStringWidth: import("@vueuse/core").UseMemoizedFn<number, [str: string]>;
|
package/es/shared/utils/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { arrayed, generateTimeFormat, safeComponentRegister } from './index2.js';
|
|
1
|
+
export { arrayed, generateTimeFormat, getStringWidth, safeComponentRegister, traverse, uuidGenerator } from './index2.js';
|