cnhis-design-vue 3.1.22-beta.0 → 3.1.22-beta.10
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/index2.js +0 -2
- package/es/components/big-table/src/BigTable.vue.d.ts +8 -0
- package/es/components/big-table/src/BigTable.vue_vue_type_script_setup_true_lang.js +29 -36
- package/es/components/big-table/src/components/edit-form/edit-date.js +81 -10
- package/es/components/big-table/src/components/edit-form/edit-input.js +1 -0
- package/es/components/big-table/src/hooks/useEdit2.js +2 -2
- package/es/components/big-table/style/index.css +1 -1
- package/es/components/fabric-chart/index.d.ts +1 -0
- package/es/components/fabric-chart/src/FabricChart.js +3 -2
- package/es/components/fabric-chart/src/FabricChart.vue.d.ts +1 -0
- package/es/components/fabric-chart/src/hooks/useCenter.d.ts +1 -0
- package/es/components/fabric-chart/src/hooks/useCenter2.js +15 -3
- package/es/components/fabric-chart/src/hooks/useLeft.d.ts +1 -1
- package/es/components/fabric-chart/src/hooks/useLeft2.js +7 -5
- package/es/components/fabric-chart/src/interface.d.ts +2 -0
- package/es/components/field-set/index.d.ts +4 -3
- package/es/components/field-set/src/FieldSet.js +9 -4
- package/es/components/field-set/src/FieldSet.vue.d.ts +4 -3
- package/es/components/form-render/src/components/renderer/cascader.js +10 -7
- package/es/components/form-render/src/components/renderer/combination.d.ts +7 -0
- package/es/components/form-render/src/components/renderer/combination.js +4 -1
- package/es/components/form-render/src/components/renderer/date.js +11 -4
- package/es/components/form-render/src/components/renderer/input.js +2 -2
- package/es/components/form-render/src/components/renderer/inputNumber.js +2 -2
- package/es/components/form-render/src/components/renderer/search.js +3 -3
- package/es/components/form-render/src/components/renderer/select.js +3 -3
- package/es/components/form-render/src/components/renderer/textarea.js +2 -2
- package/es/components/form-render/src/hooks/useCommonInjection2.js +6 -2
- package/es/components/form-render/src/utils/schema.d.ts +4 -1
- package/es/components/form-render/src/utils/schema.js +1 -1
- package/es/components/form-render/src/utils/schema2.js +9 -2
- package/es/components/grid/index2.js +0 -2
- package/es/components/iho-table/index.d.ts +4266 -337
- package/es/components/iho-table/index.js +1 -1
- package/es/components/iho-table/index2.js +9 -4
- package/es/components/iho-table/src/IhoTable.js +39 -13
- package/es/components/iho-table/src/IhoTable.vue.d.ts +4254 -326
- package/es/components/iho-table/src/components/IhoTableColumn.d.ts +2 -2
- package/es/components/iho-table/src/components/IhoTableColumn.js +25 -5
- package/es/components/iho-table/src/constants/index.d.ts +8 -1
- package/es/components/iho-table/src/constants/index.js +1 -1
- package/es/components/iho-table/src/constants/index2.js +79 -1
- package/es/components/iho-table/src/hooks/index.js +1 -1
- package/es/components/iho-table/src/hooks/tapHooks/index.d.ts +5 -0
- package/es/components/iho-table/src/hooks/tapHooks/index.js +1 -1
- package/es/components/iho-table/src/hooks/tapHooks/index2.js +71 -24
- package/es/components/iho-table/src/hooks/tapHooks/useConfigHooks.d.ts +14 -0
- package/es/components/iho-table/src/hooks/tapHooks/useConfigHooks2.js +39 -1
- package/es/components/iho-table/src/hooks/tapHooks/useEventHooks.d.ts +61 -60
- package/es/components/iho-table/src/hooks/tapHooks/useEventHooks2.js +62 -60
- package/es/components/iho-table/src/hooks/tapHooks/useFieldHooks.d.ts +4 -1
- package/es/components/iho-table/src/hooks/tapHooks/useFieldHooks2.js +4 -1
- package/es/components/iho-table/src/hooks/useTablePlugin.d.ts +2 -2
- package/es/components/iho-table/src/hooks/useTablePlugin2.js +2 -3
- package/es/components/iho-table/src/plugins/defaultConfigPlugin/index2.js +3 -2
- package/es/components/iho-table/src/plugins/index.d.ts +1 -0
- package/es/components/iho-table/src/plugins/index.js +8 -5
- package/es/components/iho-table/src/plugins/index2.js +8 -5
- package/es/components/iho-table/src/plugins/lowCodeFieldAdaptorPlugin/index2.js +10 -4
- package/es/components/iho-table/src/plugins/rendererPlugins/index.d.ts +2 -5
- package/es/components/iho-table/src/plugins/rendererPlugins/index.js +7 -5
- package/es/components/iho-table/src/plugins/rendererPlugins/inputs/index.d.ts +1 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/inputs/index.js +1 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/inputs/inputRendererPlugins.d.ts +1 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/inputs/inputRendererPlugins.js +49 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/{checkRendererPlugin.d.ts → widgets/checkRendererPlugin.d.ts} +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/{checkRendererPlugin.js → widgets/checkRendererPlugin.js} +2 -2
- package/es/components/iho-table/src/plugins/rendererPlugins/{colorRendererPlugin.d.ts → widgets/colorRendererPlugin.d.ts} +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/{colorRendererPlugin.js → widgets/colorRendererPlugin.js} +6 -8
- package/es/components/iho-table/src/plugins/rendererPlugins/{defaultRendererPlugin.d.ts → widgets/defaultRendererPlugin.d.ts} +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/{defaultRendererPlugin.js → widgets/defaultRendererPlugin.js} +4 -4
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/index.d.ts +6 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/index.js +6 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/{labelRendererPlugin.d.ts → widgets/labelRendererPlugin.d.ts} +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/{labelRendererPlugin.js → widgets/labelRendererPlugin.js} +3 -3
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/pictureRendererPlugin.d.ts +2 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/pictureRendererPlugin.js +89 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/{seqRendererPlugin.d.ts → widgets/seqRendererPlugin.d.ts} +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/{seqRendererPlugin.js → widgets/seqRendererPlugin.js} +3 -3
- package/es/components/iho-table/src/plugins/rowGroupSettingPlugin/index.d.ts +1 -0
- package/es/components/iho-table/src/plugins/rowGroupSettingPlugin/index.js +1 -0
- package/es/components/iho-table/src/plugins/rowGroupSettingPlugin/index2.js +72 -0
- package/es/components/iho-table/src/types/index.d.ts +31 -8
- package/es/components/iho-table/src/types/pluginType.d.ts +91 -64
- package/es/components/iho-table/src/utils/index.d.ts +3 -0
- package/es/components/iho-table/src/utils/index.js +1 -1
- package/es/components/iho-table/src/utils/index2.js +16 -1
- package/es/components/index.css +1 -1
- package/es/components/index.js +1 -1
- package/es/components/index2.js +1 -1
- package/package.json +4 -4
- 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/form-render/src/components/index.d.ts +0 -0
- package/es/components/form-render/src/components/index.js +0 -1
- package/es/shared/utils/loadVxe.d.ts +0 -2
- package/es/shared/utils/loadVxe.js +0 -1
- package/es/shared/utils/loadVxe2.js +0 -12
- package/es/shared/utils/tapable/index.d.ts +0 -139
|
@@ -8,68 +8,70 @@ import '../../../../../shared/utils/tapable/AsyncSeriesHook.js';
|
|
|
8
8
|
import '../../../../../shared/utils/tapable/AsyncSeriesBailHook.js';
|
|
9
9
|
import '../../../../../shared/utils/tapable/AsyncSeriesLoopHook.js';
|
|
10
10
|
import '../../../../../shared/utils/tapable/AsyncSeriesWaterfallHook.js';
|
|
11
|
+
import { AbstractEventHooks } from '../../types/pluginType2.js';
|
|
11
12
|
|
|
12
|
-
class EventHooks {
|
|
13
|
+
class EventHooks extends AbstractEventHooks {
|
|
13
14
|
constructor() {
|
|
14
|
-
|
|
15
|
-
this.
|
|
16
|
-
this.
|
|
17
|
-
this.
|
|
18
|
-
this.
|
|
19
|
-
this.
|
|
20
|
-
this.
|
|
21
|
-
this.
|
|
22
|
-
this.
|
|
23
|
-
this.
|
|
24
|
-
this.
|
|
25
|
-
this.
|
|
26
|
-
this.
|
|
27
|
-
this.
|
|
28
|
-
this.
|
|
29
|
-
this.
|
|
30
|
-
this.
|
|
31
|
-
this.
|
|
32
|
-
this.
|
|
33
|
-
this.
|
|
34
|
-
this.
|
|
35
|
-
this.
|
|
36
|
-
this.
|
|
37
|
-
this.
|
|
38
|
-
this.
|
|
39
|
-
this.
|
|
40
|
-
this.
|
|
41
|
-
this.
|
|
42
|
-
this.
|
|
43
|
-
this.
|
|
44
|
-
this.
|
|
45
|
-
this.
|
|
46
|
-
this.
|
|
47
|
-
this.
|
|
48
|
-
this.
|
|
49
|
-
this.
|
|
50
|
-
this.
|
|
51
|
-
this.
|
|
52
|
-
this.
|
|
53
|
-
this.
|
|
54
|
-
this.
|
|
55
|
-
this.
|
|
56
|
-
this.
|
|
57
|
-
this.
|
|
58
|
-
this.
|
|
59
|
-
this.
|
|
60
|
-
this.
|
|
61
|
-
this.
|
|
62
|
-
this.
|
|
63
|
-
this.
|
|
64
|
-
this.
|
|
65
|
-
this.
|
|
66
|
-
this.
|
|
67
|
-
this.
|
|
68
|
-
this.
|
|
69
|
-
this.
|
|
70
|
-
this.
|
|
71
|
-
this.
|
|
72
|
-
this.
|
|
15
|
+
super(...arguments);
|
|
16
|
+
this.onKeydownStart = new AsyncParallelHook(["event", "config", "$table"]);
|
|
17
|
+
this.onKeydown = new AsyncParallelHook(["event", "config", "$table"]);
|
|
18
|
+
this.onKeydownEnd = new AsyncParallelHook(["event", "config", "$table"]);
|
|
19
|
+
this.onPaste = new AsyncParallelHook(["event", "config", "$table"]);
|
|
20
|
+
this.onCopy = new AsyncParallelHook(["event", "config", "$table"]);
|
|
21
|
+
this.onCut = new AsyncParallelHook(["event", "config", "$table"]);
|
|
22
|
+
this.onCurrentChange = new AsyncParallelHook(["event", "config", "$table"]);
|
|
23
|
+
this.onRadioChange = new AsyncParallelHook(["event", "config", "$table"]);
|
|
24
|
+
this.onCheckboxChange = new AsyncParallelHook(["event", "config", "$table"]);
|
|
25
|
+
this.onCheckboxAll = new AsyncParallelHook(["event", "config", "$table"]);
|
|
26
|
+
this.onCheckboxRangeStart = new AsyncParallelHook(["event", "config", "$table"]);
|
|
27
|
+
this.onCheckboxRangeChange = new AsyncParallelHook(["event", "config", "$table"]);
|
|
28
|
+
this.onCheckboxRangeEnd = new AsyncParallelHook(["event", "config", "$table"]);
|
|
29
|
+
this.onCellClick = new AsyncParallelHook(["event", "config", "$table"]);
|
|
30
|
+
this.onCellDblclick = new AsyncParallelHook(["event", "config", "$table"]);
|
|
31
|
+
this.onCellMenu = new AsyncParallelHook(["event", "config", "$table"]);
|
|
32
|
+
this.onCellMouseenter = new AsyncParallelHook(["event", "config", "$table"]);
|
|
33
|
+
this.onCellMouseleave = new AsyncParallelHook(["event", "config", "$table"]);
|
|
34
|
+
this.onHeaderCellClick = new AsyncParallelHook(["event", "config", "$table"]);
|
|
35
|
+
this.onHeaderCellDblclick = new AsyncParallelHook(["event", "config", "$table"]);
|
|
36
|
+
this.onHeaderCellMenu = new AsyncParallelHook(["event", "config", "$table"]);
|
|
37
|
+
this.onFooterCellClick = new AsyncParallelHook(["event", "config", "$table"]);
|
|
38
|
+
this.onFooterCellDblclick = new AsyncParallelHook(["event", "config", "$table"]);
|
|
39
|
+
this.onFooterCellMenu = new AsyncParallelHook(["event", "config", "$table"]);
|
|
40
|
+
this.onSortChange = new AsyncParallelHook(["event", "config", "$table"]);
|
|
41
|
+
this.onFilterChange = new AsyncParallelHook(["event", "config", "$table"]);
|
|
42
|
+
this.onFilterVisible = new AsyncParallelHook(["event", "config", "$table"]);
|
|
43
|
+
this.onResizableChange = new AsyncParallelHook(["event", "config", "$table"]);
|
|
44
|
+
this.onToggleRowExpand = new AsyncParallelHook(["event", "config", "$table"]);
|
|
45
|
+
this.onToggleTreeExpand = new AsyncParallelHook(["event", "config", "$table"]);
|
|
46
|
+
this.onMenuClick = new AsyncParallelHook(["event", "config", "$table"]);
|
|
47
|
+
this.onEditClosed = new AsyncParallelHook(["event", "config", "$table"]);
|
|
48
|
+
this.onEditActived = new AsyncParallelHook(["event", "config", "$table"]);
|
|
49
|
+
this.onEditDisabled = new AsyncParallelHook(["event", "config", "$table"]);
|
|
50
|
+
this.onValidError = new AsyncParallelHook(["event", "config", "$table"]);
|
|
51
|
+
this.onScroll = new AsyncParallelHook(["event", "config", "$table"]);
|
|
52
|
+
this.onCustom = new AsyncParallelHook(["event", "config", "$table"]);
|
|
53
|
+
this.onOpenFnr = new AsyncParallelHook(["event", "config", "$table"]);
|
|
54
|
+
this.onFnrChange = new AsyncParallelHook(["event", "config", "$table"]);
|
|
55
|
+
this.onFnrFind = new AsyncParallelHook(["event", "config", "$table"]);
|
|
56
|
+
this.onFnrFindAll = new AsyncParallelHook(["event", "config", "$table"]);
|
|
57
|
+
this.onFnrReplace = new AsyncParallelHook(["event", "config", "$table"]);
|
|
58
|
+
this.onFnrReplaceAll = new AsyncParallelHook(["event", "config", "$table"]);
|
|
59
|
+
this.onCellAreaCopy = new AsyncParallelHook(["event", "config", "$table"]);
|
|
60
|
+
this.onCellAreaCut = new AsyncParallelHook(["event", "config", "$table"]);
|
|
61
|
+
this.onCellAreaPaste = new AsyncParallelHook(["event", "config", "$table"]);
|
|
62
|
+
this.onCellAreaMerge = new AsyncParallelHook(["event", "config", "$table"]);
|
|
63
|
+
this.onClearCellAreaMerge = new AsyncParallelHook(["event", "config", "$table"]);
|
|
64
|
+
this.onHeaderCellAreaSelection = new AsyncParallelHook(["event", "config", "$table"]);
|
|
65
|
+
this.onCellAreaSelectionStart = new AsyncParallelHook(["event", "config", "$table"]);
|
|
66
|
+
this.onCellAreaSelectionDrag = new AsyncParallelHook(["event", "config", "$table"]);
|
|
67
|
+
this.onCellAreaSelectionEnd = new AsyncParallelHook(["event", "config", "$table"]);
|
|
68
|
+
this.onCellAreaExtensionStart = new AsyncParallelHook(["event", "config", "$table"]);
|
|
69
|
+
this.onCellAreaExtensionDrag = new AsyncParallelHook(["event", "config", "$table"]);
|
|
70
|
+
this.onCellAreaExtensionEnd = new AsyncParallelHook(["event", "config", "$table"]);
|
|
71
|
+
this.onCellAreaArrowsStart = new AsyncParallelHook(["event", "config", "$table"]);
|
|
72
|
+
this.onCellAreaArrowsEnd = new AsyncParallelHook(["event", "config", "$table"]);
|
|
73
|
+
this.onActiveCellChangeStart = new AsyncParallelHook(["event", "config", "$table"]);
|
|
74
|
+
this.onActiveCellChangeEnd = new AsyncParallelHook(["event", "config", "$table"]);
|
|
73
75
|
}
|
|
74
76
|
}
|
|
75
77
|
function useEventHooks() {
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import { SyncWaterfallHook } from '../../../../../../es/shared/utils/tapable';
|
|
1
|
+
import { AsyncParallelHook, SyncWaterfallHook } from '../../../../../../es/shared/utils/tapable';
|
|
2
2
|
import { FieldHookContext, IhoTableFieldItem } from '../../../../../../es/components/iho-table/src/types';
|
|
3
3
|
import { AbstractFieldHooks } from '../../../../../../es/components/iho-table/src/types';
|
|
4
4
|
declare class FieldHooks extends AbstractFieldHooks {
|
|
5
|
+
readonly fieldStart: AsyncParallelHook<[import("../../../../../../es/components/iho-table/src/types").IhoTableConfig], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
5
6
|
readonly field: SyncWaterfallHook<[IhoTableFieldItem, FieldHookContext, import("../../../../../../es/components/iho-table/src/types").IhoTableConfig], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
7
|
+
readonly fieldList: SyncWaterfallHook<[IhoTableFieldItem[], import("../../../../../../es/components/iho-table/src/types").IhoTableConfig], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
8
|
+
readonly fieldEnd: AsyncParallelHook<[import("../../../../../../es/components/iho-table/src/types").IhoTableConfig], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
6
9
|
}
|
|
7
10
|
export declare function useFieldHooks(): {
|
|
8
11
|
create: () => FieldHooks;
|
|
@@ -2,7 +2,7 @@ import '../../../../../shared/utils/tapable/SyncHook.js';
|
|
|
2
2
|
import '../../../../../shared/utils/tapable/SyncBailHook.js';
|
|
3
3
|
import SyncWaterfallHook from '../../../../../shared/utils/tapable/SyncWaterfallHook.js';
|
|
4
4
|
import '../../../../../shared/utils/tapable/SyncLoopHook.js';
|
|
5
|
-
import '../../../../../shared/utils/tapable/AsyncParallelHook.js';
|
|
5
|
+
import AsyncParallelHook from '../../../../../shared/utils/tapable/AsyncParallelHook.js';
|
|
6
6
|
import '../../../../../shared/utils/tapable/AsyncParallelBailHook.js';
|
|
7
7
|
import '../../../../../shared/utils/tapable/AsyncSeriesHook.js';
|
|
8
8
|
import '../../../../../shared/utils/tapable/AsyncSeriesBailHook.js';
|
|
@@ -13,11 +13,14 @@ import { AbstractFieldHooks } from '../../types/pluginType2.js';
|
|
|
13
13
|
class FieldHooks extends AbstractFieldHooks {
|
|
14
14
|
constructor() {
|
|
15
15
|
super(...arguments);
|
|
16
|
+
this.fieldStart = new AsyncParallelHook(["config"]);
|
|
16
17
|
this.field = new SyncWaterfallHook([
|
|
17
18
|
"fieldItem",
|
|
18
19
|
"context",
|
|
19
20
|
"config"
|
|
20
21
|
]);
|
|
22
|
+
this.fieldList = new SyncWaterfallHook(["fieldList", "config"]);
|
|
23
|
+
this.fieldEnd = new AsyncParallelHook(["config"]);
|
|
21
24
|
}
|
|
22
25
|
}
|
|
23
26
|
function useFieldHooks() {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ArrayAble } from '../../../../../es/shared/types';
|
|
2
|
-
import { TablePlugin } from '../../../../../es/components/iho-table/src/types';
|
|
2
|
+
import { IhoTableInstance, TablePlugin } from '../../../../../es/components/iho-table/src/types';
|
|
3
3
|
export declare function useTablePlugin(): {
|
|
4
|
-
use: (plugin: ArrayAble<TablePlugin
|
|
4
|
+
use: (plugin: ArrayAble<TablePlugin>, instance: IhoTableInstance) => {
|
|
5
5
|
use: any;
|
|
6
6
|
};
|
|
7
7
|
};
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { arrayed } from '../../../../shared/utils/index2.js';
|
|
2
2
|
import { isFunction } from 'lodash-es';
|
|
3
|
-
import VXETable from 'vxe-table';
|
|
4
3
|
import { createTableHooks } from './tapHooks/index2.js';
|
|
5
4
|
|
|
6
5
|
function useTablePlugin() {
|
|
7
6
|
const hooks = createTableHooks();
|
|
8
|
-
function use(plugin) {
|
|
7
|
+
function use(plugin, instance) {
|
|
9
8
|
arrayed(plugin).forEach(({ vxe, apply }) => {
|
|
10
|
-
isFunction(vxe) && vxe(
|
|
9
|
+
isFunction(vxe) && vxe(instance);
|
|
11
10
|
isFunction(apply) && apply(hooks);
|
|
12
11
|
});
|
|
13
12
|
return { use };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { mergeWith } from 'lodash-es';
|
|
2
|
+
import { HIGHEST_PRIORITY } from '../../constants/index2.js';
|
|
2
3
|
import { defineTablePlugin } from '../../hooks/useTablePlugin2.js';
|
|
3
4
|
|
|
4
5
|
function defaultConfigPlugin() {
|
|
@@ -6,7 +7,7 @@ function defaultConfigPlugin() {
|
|
|
6
7
|
return defineTablePlugin({
|
|
7
8
|
name: pluginName,
|
|
8
9
|
apply(hooks) {
|
|
9
|
-
hooks.configHooks.config.tap({ name: pluginName, stage:
|
|
10
|
+
hooks.configHooks.config.tap({ name: pluginName, stage: HIGHEST_PRIORITY }, (config) => {
|
|
10
11
|
return mergeWith({
|
|
11
12
|
height: "100%",
|
|
12
13
|
border: true,
|
|
@@ -15,7 +16,7 @@ function defaultConfigPlugin() {
|
|
|
15
16
|
columnConfig: { resizable: true },
|
|
16
17
|
rowConfig: { height: 32, isHover: true, isCurrent: true, keyField: "theUniqueKey" },
|
|
17
18
|
editConfig: {
|
|
18
|
-
trigger: "
|
|
19
|
+
trigger: "click",
|
|
19
20
|
mode: "cell",
|
|
20
21
|
autoClear: false,
|
|
21
22
|
showIcon: false
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
export { defaultConfigPlugin } from './defaultConfigPlugin/index2.js';
|
|
2
2
|
export { lowCodeFieldAdaptorPlugin } from './lowCodeFieldAdaptorPlugin/index2.js';
|
|
3
|
-
export { labelRendererPlugin } from './rendererPlugins/labelRendererPlugin.js';
|
|
4
|
-
export { defaultRendererPlugin } from './rendererPlugins/defaultRendererPlugin.js';
|
|
5
|
-
export { colorRendererPlugin } from './rendererPlugins/colorRendererPlugin.js';
|
|
6
|
-
export { seqRendererPlugin } from './rendererPlugins/seqRendererPlugin.js';
|
|
7
|
-
export { checkRendererPlugin } from './rendererPlugins/checkRendererPlugin.js';
|
|
3
|
+
export { labelRendererPlugin } from './rendererPlugins/widgets/labelRendererPlugin.js';
|
|
4
|
+
export { defaultRendererPlugin } from './rendererPlugins/widgets/defaultRendererPlugin.js';
|
|
5
|
+
export { colorRendererPlugin } from './rendererPlugins/widgets/colorRendererPlugin.js';
|
|
6
|
+
export { seqRendererPlugin } from './rendererPlugins/widgets/seqRendererPlugin.js';
|
|
7
|
+
export { checkRendererPlugin } from './rendererPlugins/widgets/checkRendererPlugin.js';
|
|
8
|
+
export { pictureRendererPlugin } from './rendererPlugins/widgets/pictureRendererPlugin.js';
|
|
9
|
+
export { inputRendererPlugins } from './rendererPlugins/inputs/inputRendererPlugins.js';
|
|
10
|
+
export { rowGroupSettingPlugin } from './rowGroupSettingPlugin/index2.js';
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
export { defaultConfigPlugin } from './defaultConfigPlugin/index2.js';
|
|
2
2
|
export { lowCodeFieldAdaptorPlugin } from './lowCodeFieldAdaptorPlugin/index2.js';
|
|
3
|
-
export { labelRendererPlugin } from './rendererPlugins/labelRendererPlugin.js';
|
|
4
|
-
export { defaultRendererPlugin } from './rendererPlugins/defaultRendererPlugin.js';
|
|
5
|
-
export { colorRendererPlugin } from './rendererPlugins/colorRendererPlugin.js';
|
|
6
|
-
export { seqRendererPlugin } from './rendererPlugins/seqRendererPlugin.js';
|
|
7
|
-
export { checkRendererPlugin } from './rendererPlugins/checkRendererPlugin.js';
|
|
3
|
+
export { labelRendererPlugin } from './rendererPlugins/widgets/labelRendererPlugin.js';
|
|
4
|
+
export { defaultRendererPlugin } from './rendererPlugins/widgets/defaultRendererPlugin.js';
|
|
5
|
+
export { colorRendererPlugin } from './rendererPlugins/widgets/colorRendererPlugin.js';
|
|
6
|
+
export { seqRendererPlugin } from './rendererPlugins/widgets/seqRendererPlugin.js';
|
|
7
|
+
export { checkRendererPlugin } from './rendererPlugins/widgets/checkRendererPlugin.js';
|
|
8
|
+
export { pictureRendererPlugin } from './rendererPlugins/widgets/pictureRendererPlugin.js';
|
|
9
|
+
export { inputRendererPlugins } from './rendererPlugins/inputs/inputRendererPlugins.js';
|
|
10
|
+
export { rowGroupSettingPlugin } from './rowGroupSettingPlugin/index2.js';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { pick } from 'lodash-es';
|
|
2
|
+
import { HIGHEST_PRIORITY, WIDGET_TYPE } from '../../constants/index2.js';
|
|
2
3
|
import { defineTablePlugin } from '../../hooks/useTablePlugin2.js';
|
|
3
4
|
|
|
4
5
|
function lowCodeFieldAdaptorPlugin() {
|
|
@@ -6,7 +7,7 @@ function lowCodeFieldAdaptorPlugin() {
|
|
|
6
7
|
return defineTablePlugin({
|
|
7
8
|
name: pluginName,
|
|
8
9
|
apply(hooks) {
|
|
9
|
-
hooks.fieldHooks.field.tap({ name: pluginName, stage:
|
|
10
|
+
hooks.fieldHooks.field.tap({ name: pluginName, stage: HIGHEST_PRIORITY }, (field) => {
|
|
10
11
|
const _field = field;
|
|
11
12
|
const result = {
|
|
12
13
|
field: _field.columnName,
|
|
@@ -14,13 +15,18 @@ function lowCodeFieldAdaptorPlugin() {
|
|
|
14
15
|
showOverflow: "tooltip",
|
|
15
16
|
...pick(_field, ["title"])
|
|
16
17
|
};
|
|
17
|
-
|
|
18
|
-
result.editRender = { name: _field.settingObj.attr || "DEFAULT" };
|
|
19
|
-
}
|
|
18
|
+
settingObjAdaptor(_field.settingObj, result);
|
|
20
19
|
return result;
|
|
21
20
|
});
|
|
22
21
|
}
|
|
23
22
|
});
|
|
24
23
|
}
|
|
24
|
+
function settingObjAdaptor(settingObj, fieldItem) {
|
|
25
|
+
if (!settingObj)
|
|
26
|
+
return;
|
|
27
|
+
fieldItem.editRender = { name: settingObj.attr || "DEFAULT" };
|
|
28
|
+
fieldItem.editRender.enabled = !Reflect.get(WIDGET_TYPE, fieldItem.editRender.name);
|
|
29
|
+
fieldItem.visible = settingObj.isHide !== "1";
|
|
30
|
+
}
|
|
25
31
|
|
|
26
32
|
export { lowCodeFieldAdaptorPlugin };
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
export { labelRendererPlugin } from './labelRendererPlugin.js';
|
|
2
|
-
export { defaultRendererPlugin } from './defaultRendererPlugin.js';
|
|
3
|
-
export { colorRendererPlugin } from './colorRendererPlugin.js';
|
|
4
|
-
export { seqRendererPlugin } from './seqRendererPlugin.js';
|
|
5
|
-
export { checkRendererPlugin } from './checkRendererPlugin.js';
|
|
1
|
+
export { labelRendererPlugin } from './widgets/labelRendererPlugin.js';
|
|
2
|
+
export { defaultRendererPlugin } from './widgets/defaultRendererPlugin.js';
|
|
3
|
+
export { colorRendererPlugin } from './widgets/colorRendererPlugin.js';
|
|
4
|
+
export { seqRendererPlugin } from './widgets/seqRendererPlugin.js';
|
|
5
|
+
export { checkRendererPlugin } from './widgets/checkRendererPlugin.js';
|
|
6
|
+
export { pictureRendererPlugin } from './widgets/pictureRendererPlugin.js';
|
|
7
|
+
export { inputRendererPlugins } from './inputs/inputRendererPlugins.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './inputRendererPlugins';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { inputRendererPlugins } from './inputRendererPlugins.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function inputRendererPlugins(): import("../../../../../../../es/components/iho-table").TablePlugin;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { createVNode, inject } from 'vue';
|
|
2
|
+
import { NInput } from 'naive-ui';
|
|
3
|
+
import '../../../../index2.js';
|
|
4
|
+
import { INPUT_TYPE, InjectionIhoTableEmits } from '../../../constants/index2.js';
|
|
5
|
+
import { defineTablePlugin } from '../../../hooks/useTablePlugin2.js';
|
|
6
|
+
|
|
7
|
+
function inputRendererPlugins() {
|
|
8
|
+
const pluginName = "inputRendererPlugins";
|
|
9
|
+
return defineTablePlugin({
|
|
10
|
+
name: pluginName,
|
|
11
|
+
vxe(instance) {
|
|
12
|
+
instance.renderer.add(INPUT_TYPE.INPUT, {
|
|
13
|
+
renderCell(renderOpts, {
|
|
14
|
+
row,
|
|
15
|
+
column
|
|
16
|
+
}) {
|
|
17
|
+
return [createVNode("span", null, [row[column.field]])];
|
|
18
|
+
},
|
|
19
|
+
renderEdit(renderOpts, {
|
|
20
|
+
row,
|
|
21
|
+
column,
|
|
22
|
+
$rowIndex
|
|
23
|
+
}) {
|
|
24
|
+
const emit = inject(InjectionIhoTableEmits);
|
|
25
|
+
function onBlur() {
|
|
26
|
+
emit("formChange", {
|
|
27
|
+
value: row[column.field],
|
|
28
|
+
row,
|
|
29
|
+
column,
|
|
30
|
+
index: $rowIndex
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
return [createVNode(NInput, {
|
|
34
|
+
"value": row[column.field],
|
|
35
|
+
"onUpdate:value": ($event) => row[column.field] = $event,
|
|
36
|
+
"onBlur": onBlur
|
|
37
|
+
}, null)];
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
},
|
|
41
|
+
apply(hooks) {
|
|
42
|
+
hooks.eventHooks.onCellClick.tap("test", (payload, config, $table) => {
|
|
43
|
+
console.log($table.getData());
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export { inputRendererPlugins };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function checkRendererPlugin(): import("
|
|
1
|
+
export declare function checkRendererPlugin(): import("../../../../../../../es/components/iho-table").TablePlugin;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import '
|
|
2
|
-
import { defineTablePlugin } from '
|
|
1
|
+
import '../../../../index2.js';
|
|
2
|
+
import { defineTablePlugin } from '../../../hooks/useTablePlugin2.js';
|
|
3
3
|
|
|
4
4
|
function checkRendererPlugin() {
|
|
5
5
|
const pluginName = "checkRendererPlugin";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function colorRendererPlugin(): import("
|
|
1
|
+
export declare function colorRendererPlugin(): import("../../../../../../../es/components/iho-table").TablePlugin;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import '
|
|
3
|
-
import { WIDGET_TYPE
|
|
4
|
-
import {
|
|
1
|
+
import { createVNode } from 'vue';
|
|
2
|
+
import '../../../../index2.js';
|
|
3
|
+
import { WIDGET_TYPE } from '../../../constants/index2.js';
|
|
4
|
+
import { getRowHeight } from '../../../utils/index2.js';
|
|
5
|
+
import { defineTablePlugin } from '../../../hooks/useTablePlugin2.js';
|
|
5
6
|
|
|
6
7
|
function colorRendererPlugin() {
|
|
7
8
|
const pluginName = "checkRendererPlugin";
|
|
@@ -28,15 +29,12 @@ function colorRendererPlugin() {
|
|
|
28
29
|
row,
|
|
29
30
|
column
|
|
30
31
|
}) {
|
|
31
|
-
var _a, _b, _c;
|
|
32
32
|
const value = row[column.field];
|
|
33
33
|
const [color, alias] = value.split("-");
|
|
34
|
-
const config = inject(InjectionIhoTableConfig);
|
|
35
|
-
const height = (_c = (_b = (_a = config == null ? void 0 : config.value) == null ? void 0 : _a.rowConfig) == null ? void 0 : _b.height) != null ? _c : 32;
|
|
36
34
|
return [createVNode("div", {
|
|
37
35
|
"style": {
|
|
38
36
|
background: colorMap[alias] || color,
|
|
39
|
-
height:
|
|
37
|
+
height: getRowHeight() - 8 + "px"
|
|
40
38
|
}
|
|
41
39
|
}, null)];
|
|
42
40
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function defaultRendererPlugin(): import("
|
|
1
|
+
export declare function defaultRendererPlugin(): import("../../../../../../../es/components/iho-table").TablePlugin;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { createVNode } from 'vue';
|
|
2
2
|
import { isString } from 'lodash-es';
|
|
3
|
-
import '
|
|
4
|
-
import { WIDGET_TYPE } from '
|
|
5
|
-
import { IhoTableWarn } from '
|
|
6
|
-
import { defineTablePlugin } from '
|
|
3
|
+
import '../../../../index2.js';
|
|
4
|
+
import { WIDGET_TYPE } from '../../../constants/index2.js';
|
|
5
|
+
import { IhoTableWarn } from '../../../utils/index2.js';
|
|
6
|
+
import { defineTablePlugin } from '../../../hooks/useTablePlugin2.js';
|
|
7
7
|
|
|
8
8
|
function defaultRendererPlugin() {
|
|
9
9
|
const pluginName = "defaultRendererPlugin";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { labelRendererPlugin } from './labelRendererPlugin.js';
|
|
2
|
+
export { defaultRendererPlugin } from './defaultRendererPlugin.js';
|
|
3
|
+
export { colorRendererPlugin } from './colorRendererPlugin.js';
|
|
4
|
+
export { seqRendererPlugin } from './seqRendererPlugin.js';
|
|
5
|
+
export { checkRendererPlugin } from './checkRendererPlugin.js';
|
|
6
|
+
export { pictureRendererPlugin } from './pictureRendererPlugin.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function labelRendererPlugin(): import("
|
|
1
|
+
export declare function labelRendererPlugin(): import("../../../../../../../es/components/iho-table").TablePlugin;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { createVNode } from 'vue';
|
|
2
2
|
import { isArray, isString } from 'lodash-es';
|
|
3
|
-
import '
|
|
4
|
-
import { WIDGET_TYPE } from '
|
|
5
|
-
import { defineTablePlugin } from '
|
|
3
|
+
import '../../../../index2.js';
|
|
4
|
+
import { WIDGET_TYPE } from '../../../constants/index2.js';
|
|
5
|
+
import { defineTablePlugin } from '../../../hooks/useTablePlugin2.js';
|
|
6
6
|
|
|
7
7
|
function labelRendererPlugin() {
|
|
8
8
|
const pluginName = "labelRendererPlugin";
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { defineComponent, watch, createVNode } from 'vue';
|
|
2
|
+
import { arrayed } from '../../../../../../shared/utils/index2.js';
|
|
3
|
+
import '../../../../index2.js';
|
|
4
|
+
import { WIDGET_TYPE } from '../../../constants/index2.js';
|
|
5
|
+
import { getRowHeight, IhoTableWarn } from '../../../utils/index2.js';
|
|
6
|
+
import Viewer from 'viewerjs';
|
|
7
|
+
import 'viewerjs/dist/viewer.css';
|
|
8
|
+
import { defineTablePlugin } from '../../../hooks/useTablePlugin2.js';
|
|
9
|
+
|
|
10
|
+
function pictureRendererPlugin() {
|
|
11
|
+
const pluginName = "pictureRendererPlugin";
|
|
12
|
+
return defineTablePlugin({
|
|
13
|
+
name: pluginName,
|
|
14
|
+
vxe(instance) {
|
|
15
|
+
function createRenderOptions(style) {
|
|
16
|
+
return {
|
|
17
|
+
renderCell(renderOpts, {
|
|
18
|
+
row,
|
|
19
|
+
column
|
|
20
|
+
}) {
|
|
21
|
+
try {
|
|
22
|
+
const value = JSON.parse(row[column.field]);
|
|
23
|
+
const height = getRowHeight();
|
|
24
|
+
return [createVNode("section", {
|
|
25
|
+
"style": "display:flex;justify-content:center"
|
|
26
|
+
}, [createVNode(ViewerImage, {
|
|
27
|
+
"style": {
|
|
28
|
+
width: height + "px",
|
|
29
|
+
height: height + "px",
|
|
30
|
+
...style
|
|
31
|
+
},
|
|
32
|
+
"images": arrayed(value).map((v) => v.url)
|
|
33
|
+
}, null)])];
|
|
34
|
+
} catch (e) {
|
|
35
|
+
IhoTableWarn(`invalid ${renderOpts.name} value of field(${column.field}): ${row[column.field]}`);
|
|
36
|
+
return [];
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
instance.renderer.add(WIDGET_TYPE.PICTURE, createRenderOptions({}));
|
|
42
|
+
instance.renderer.add(WIDGET_TYPE.HEADPORTRAIT, createRenderOptions({
|
|
43
|
+
"border-radius": "50%"
|
|
44
|
+
}));
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
const ViewerImage = defineComponent({
|
|
49
|
+
name: "ViewerImage",
|
|
50
|
+
props: {
|
|
51
|
+
images: {
|
|
52
|
+
type: Array,
|
|
53
|
+
default: () => []
|
|
54
|
+
},
|
|
55
|
+
options: {
|
|
56
|
+
type: Object,
|
|
57
|
+
default: () => ({})
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
setup(props) {
|
|
61
|
+
let $viewer = null;
|
|
62
|
+
function show() {
|
|
63
|
+
if ($viewer)
|
|
64
|
+
return $viewer.show();
|
|
65
|
+
const wrapper = document.createElement("section");
|
|
66
|
+
props.images.map((image) => wrapper.appendChild(createImage(image)));
|
|
67
|
+
$viewer = new Viewer(wrapper, props.options).show();
|
|
68
|
+
}
|
|
69
|
+
function createImage(image) {
|
|
70
|
+
const imageEle = new Image();
|
|
71
|
+
imageEle.src = image;
|
|
72
|
+
return imageEle;
|
|
73
|
+
}
|
|
74
|
+
watch([() => props.images, () => props.options], () => {
|
|
75
|
+
$viewer == null ? void 0 : $viewer.destroy();
|
|
76
|
+
$viewer = null;
|
|
77
|
+
}, {
|
|
78
|
+
deep: true
|
|
79
|
+
});
|
|
80
|
+
return () => createVNode("img", {
|
|
81
|
+
"style": "cursor:pointer",
|
|
82
|
+
"alt": "",
|
|
83
|
+
"src": props.images[0],
|
|
84
|
+
"onClick": show
|
|
85
|
+
}, null);
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
export { pictureRendererPlugin };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function seqRendererPlugin(): import("
|
|
1
|
+
export declare function seqRendererPlugin(): import("../../../../../../../es/components/iho-table").TablePlugin;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { inject, createVNode } from 'vue';
|
|
2
2
|
import { SettingsSharp } from '@vicons/ionicons5';
|
|
3
3
|
import { NIcon } from 'naive-ui';
|
|
4
|
-
import '
|
|
5
|
-
import { WIDGET_TYPE, InjectionIhoTableEmits } from '
|
|
6
|
-
import { defineTablePlugin } from '
|
|
4
|
+
import '../../../../index2.js';
|
|
5
|
+
import { WIDGET_TYPE, InjectionIhoTableEmits } from '../../../constants/index2.js';
|
|
6
|
+
import { defineTablePlugin } from '../../../hooks/useTablePlugin2.js';
|
|
7
7
|
|
|
8
8
|
function seqRendererPlugin() {
|
|
9
9
|
const pluginName = "seqRendererPlugin";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function rowGroupSettingPlugin(): import("../../../../../../es/components/iho-table").TablePlugin;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { rowGroupSettingPlugin } from './index2.js';
|