cnhis-design-vue 3.1.21 → 3.1.22-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/BigTable.vue_vue_type_script_setup_true_lang.js +7 -6
- package/es/components/big-table/style/index.css +1 -1
- package/es/components/field-set/index.d.ts +27 -3
- package/es/components/field-set/src/FieldSet.js +18 -8
- package/es/components/field-set/src/FieldSet.vue.d.ts +7 -3
- package/es/components/form-render/src/hooks/useFieldNormalize2.js +6 -0
- package/es/components/{his-table → iho-table}/index.d.ts +19 -16
- package/es/components/{his-table → iho-table}/index.js +1 -1
- package/es/components/{his-table → iho-table}/index2.js +5 -5
- package/es/components/{his-table/src/HisTable.js → iho-table/src/IhoTable.js} +12 -8
- package/es/components/{his-table/src/HisTable.vue.d.ts → iho-table/src/IhoTable.vue.d.ts} +21 -18
- package/es/components/{his-table/src/components/HisTableColumn.d.ts → iho-table/src/components/IhoTableColumn.d.ts} +3 -3
- package/es/components/{his-table/src/components/HisTableColumn.js → iho-table/src/components/IhoTableColumn.js} +3 -3
- package/es/components/iho-table/src/components/index.d.ts +1 -0
- package/es/components/iho-table/src/components/index.js +1 -0
- package/es/components/iho-table/src/constants/index.d.ts +40 -0
- package/es/components/iho-table/src/constants/index.js +1 -0
- package/es/components/iho-table/src/constants/index2.js +40 -0
- package/es/components/{his-table → iho-table}/src/hooks/index.d.ts +0 -0
- package/es/components/{his-table → iho-table}/src/hooks/index.js +0 -0
- package/es/components/iho-table/src/hooks/tapHooks/index.d.ts +8 -0
- package/es/components/{his-table → iho-table}/src/hooks/tapHooks/index.js +0 -0
- package/es/components/{his-table → iho-table}/src/hooks/tapHooks/index2.js +8 -3
- package/es/components/iho-table/src/hooks/tapHooks/useConfigHooks.d.ts +13 -0
- package/es/components/{his-table → iho-table}/src/hooks/tapHooks/useConfigHooks.js +0 -0
- package/es/components/{his-table → iho-table}/src/hooks/tapHooks/useConfigHooks2.js +1 -0
- package/es/components/{his-table → iho-table}/src/hooks/tapHooks/useEventHooks.d.ts +59 -59
- package/es/components/{his-table → iho-table}/src/hooks/tapHooks/useEventHooks.js +0 -0
- package/es/components/{his-table → iho-table}/src/hooks/tapHooks/useEventHooks2.js +0 -0
- package/es/components/{his-table → iho-table}/src/hooks/tapHooks/useFieldHooks.d.ts +3 -3
- package/es/components/{his-table → iho-table}/src/hooks/tapHooks/useFieldHooks.js +0 -0
- package/es/components/{his-table → iho-table}/src/hooks/tapHooks/useFieldHooks2.js +0 -0
- package/es/components/{his-table → iho-table}/src/hooks/useTablePlugin.d.ts +1 -1
- package/es/components/{his-table → iho-table}/src/hooks/useTablePlugin.js +0 -0
- package/es/components/{his-table → iho-table}/src/hooks/useTablePlugin2.js +6 -1
- package/es/components/{his-table → iho-table}/src/plugins/defaultConfigPlugin/index.d.ts +1 -1
- package/es/components/{his-table → iho-table}/src/plugins/defaultConfigPlugin/index.js +0 -0
- package/es/components/{his-table → iho-table}/src/plugins/defaultConfigPlugin/index2.js +8 -3
- package/es/components/{his-table → iho-table}/src/plugins/index.d.ts +1 -0
- package/es/components/iho-table/src/plugins/index.js +7 -0
- package/es/components/iho-table/src/plugins/index2.js +7 -0
- package/es/components/{his-table → iho-table}/src/plugins/lowCodeFieldAdaptorPlugin/index.d.ts +1 -1
- package/es/components/{his-table → iho-table}/src/plugins/lowCodeFieldAdaptorPlugin/index.js +0 -0
- package/es/components/{his-table → iho-table}/src/plugins/lowCodeFieldAdaptorPlugin/index2.js +9 -5
- package/es/components/iho-table/src/plugins/rendererPlugins/checkRendererPlugin.d.ts +1 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/checkRendererPlugin.js +28 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/colorRendererPlugin.d.ts +1 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/colorRendererPlugin.js +48 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/defaultRendererPlugin.d.ts +1 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/defaultRendererPlugin.js +62 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/index.d.ts +5 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/index.js +5 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/labelRendererPlugin.d.ts +1 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/labelRendererPlugin.js +45 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/seqRendererPlugin.d.ts +1 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/seqRendererPlugin.js +55 -0
- package/es/components/iho-table/src/types/index.d.ts +23 -0
- package/es/components/{his-table → iho-table}/src/types/index.js +1 -1
- package/es/components/{his-table → iho-table}/src/types/pluginType.d.ts +14 -15
- package/es/components/{his-table → iho-table}/src/types/pluginType.js +1 -1
- package/es/components/{his-table → iho-table}/src/types/pluginType2.js +1 -3
- package/es/components/iho-table/src/utils/index.d.ts +2 -0
- package/es/components/iho-table/src/utils/index.js +1 -0
- package/es/components/iho-table/src/utils/index2.js +8 -0
- package/es/components/iho-table/style/index.css +1 -0
- package/es/components/index.css +1 -1
- package/es/components/index.d.ts +3 -3
- package/es/components/index.js +3 -3
- package/es/components/index2.js +3 -3
- package/es/components/info-header/src/InfoHeader.js +3 -3
- package/es/components/info-header/style/index.css +1 -1
- package/es/shared/utils/tapable/SyncHook.js +2 -23
- 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/his-table/src/components/index.d.ts +0 -1
- package/es/components/his-table/src/components/index.js +0 -1
- package/es/components/his-table/src/hooks/tapHooks/index.d.ts +0 -9
- package/es/components/his-table/src/hooks/tapHooks/useConfigHooks.d.ts +0 -12
- package/es/components/his-table/src/hooks/tapHooks/useVxeTableHooks.d.ts +0 -9
- package/es/components/his-table/src/hooks/tapHooks/useVxeTableHooks.js +0 -1
- package/es/components/his-table/src/hooks/tapHooks/useVxeTableHooks2.js +0 -27
- package/es/components/his-table/src/plugins/index.js +0 -2
- package/es/components/his-table/src/plugins/index2.js +0 -2
- package/es/components/his-table/src/plugins/lowCodeFieldAdaptorPlugin/formatter.d.ts +0 -2
- package/es/components/his-table/src/plugins/lowCodeFieldAdaptorPlugin/formatter.js +0 -1
- package/es/components/his-table/src/plugins/lowCodeFieldAdaptorPlugin/formatter2.js +0 -5
- package/es/components/his-table/src/types/index.d.ts +0 -12
- package/es/components/his-table/style/index.css +0 -0
- package/es/shared/utils/tapable/index.d.ts +0 -139
|
@@ -1,65 +1,65 @@
|
|
|
1
1
|
import { AsyncParallelHook } from '../../../../../../es/shared/utils/tapable';
|
|
2
2
|
import { VxeTableEvents } from 'vxe-table/types/table';
|
|
3
3
|
declare class EventHooks {
|
|
4
|
-
readonly onKeydownStart: AsyncParallelHook<[VxeTableEvents.KeydownStart, import("../../../../../../es/components/
|
|
5
|
-
readonly onKeydown: AsyncParallelHook<[VxeTableEvents.Keydown, import("../../../../../../es/components/
|
|
6
|
-
readonly onKeydownEnd: AsyncParallelHook<[VxeTableEvents.KeydownEnd, import("../../../../../../es/components/
|
|
7
|
-
readonly onPaste: AsyncParallelHook<[VxeTableEvents.Paste, import("../../../../../../es/components/
|
|
8
|
-
readonly onCopy: AsyncParallelHook<[VxeTableEvents.Copy, import("../../../../../../es/components/
|
|
9
|
-
readonly onCut: AsyncParallelHook<[VxeTableEvents.Cut, import("../../../../../../es/components/
|
|
10
|
-
readonly onCurrentChange: AsyncParallelHook<[VxeTableEvents.CurrentChange, import("../../../../../../es/components/
|
|
11
|
-
readonly onRadioChange: AsyncParallelHook<[VxeTableEvents.RadioChange, import("../../../../../../es/components/
|
|
12
|
-
readonly onCheckboxChange: AsyncParallelHook<[VxeTableEvents.CheckboxChange, import("../../../../../../es/components/
|
|
13
|
-
readonly onCheckboxAll: AsyncParallelHook<[VxeTableEvents.CheckboxAll, import("../../../../../../es/components/
|
|
14
|
-
readonly onCheckboxRangeStart: AsyncParallelHook<[VxeTableEvents.CheckboxRangeStart, import("../../../../../../es/components/
|
|
15
|
-
readonly onCheckboxRangeChange: AsyncParallelHook<[VxeTableEvents.CheckboxRangeChange, import("../../../../../../es/components/
|
|
16
|
-
readonly onCheckboxRangeEnd: AsyncParallelHook<[VxeTableEvents.CheckboxRangeEnd, import("../../../../../../es/components/
|
|
17
|
-
readonly onCellClick: AsyncParallelHook<[VxeTableEvents.CellClick, import("../../../../../../es/components/
|
|
18
|
-
readonly onCellDblclick: AsyncParallelHook<[VxeTableEvents.CellDblclick, import("../../../../../../es/components/
|
|
19
|
-
readonly onCellMenu: AsyncParallelHook<[VxeTableEvents.CellMenu, import("../../../../../../es/components/
|
|
20
|
-
readonly onCellMouseenter: AsyncParallelHook<[VxeTableEvents.CellMouseenter, import("../../../../../../es/components/
|
|
21
|
-
readonly onCellMouseleave: AsyncParallelHook<[VxeTableEvents.CellMouseleave, import("../../../../../../es/components/
|
|
22
|
-
readonly onHeaderCellClick: AsyncParallelHook<[VxeTableEvents.HeaderCellClick, import("../../../../../../es/components/
|
|
23
|
-
readonly onHeaderCellDblclick: AsyncParallelHook<[VxeTableEvents.HeaderCellDblclick, import("../../../../../../es/components/
|
|
24
|
-
readonly onHeaderCellMenu: AsyncParallelHook<[VxeTableEvents.HeaderCellMenu, import("../../../../../../es/components/
|
|
25
|
-
readonly onFooterCellClick: AsyncParallelHook<[VxeTableEvents.FooterCellClick, import("../../../../../../es/components/
|
|
26
|
-
readonly onFooterCellDblclick: AsyncParallelHook<[VxeTableEvents.FooterCellDblclick, import("../../../../../../es/components/
|
|
27
|
-
readonly onFooterCellMenu: AsyncParallelHook<[VxeTableEvents.FooterCellMenu, import("../../../../../../es/components/
|
|
28
|
-
readonly onSortChange: AsyncParallelHook<[VxeTableEvents.SortChange, import("../../../../../../es/components/
|
|
29
|
-
readonly onFilterChange: AsyncParallelHook<[VxeTableEvents.FilterChange, import("../../../../../../es/components/
|
|
30
|
-
readonly onFilterVisible: AsyncParallelHook<[VxeTableEvents.FilterVisible, import("../../../../../../es/components/
|
|
31
|
-
readonly onResizableChange: AsyncParallelHook<[VxeTableEvents.ResizableChange, import("../../../../../../es/components/
|
|
32
|
-
readonly onToggleRowExpand: AsyncParallelHook<[VxeTableEvents.ToggleRowExpand, import("../../../../../../es/components/
|
|
33
|
-
readonly onToggleTreeExpand: AsyncParallelHook<[VxeTableEvents.ToggleTreeExpand, import("../../../../../../es/components/
|
|
34
|
-
readonly onMenuClick: AsyncParallelHook<[VxeTableEvents.MenuClick, import("../../../../../../es/components/
|
|
35
|
-
readonly onEditClosed: AsyncParallelHook<[VxeTableEvents.EditClosed, import("../../../../../../es/components/
|
|
36
|
-
readonly onEditActived: AsyncParallelHook<[VxeTableEvents.EditActived, import("../../../../../../es/components/
|
|
37
|
-
readonly onEditDisabled: AsyncParallelHook<[VxeTableEvents.EditDisabled, import("../../../../../../es/components/
|
|
38
|
-
readonly onValidError: AsyncParallelHook<[VxeTableEvents.ValidError, import("../../../../../../es/components/
|
|
39
|
-
readonly onScroll: AsyncParallelHook<[VxeTableEvents.Scroll, import("../../../../../../es/components/
|
|
40
|
-
readonly onCustom: AsyncParallelHook<[VxeTableEvents.Custom, import("../../../../../../es/components/
|
|
41
|
-
readonly onOpenFnr: AsyncParallelHook<[VxeTableEvents.OpenFnr, import("../../../../../../es/components/
|
|
42
|
-
readonly onFnrChange: AsyncParallelHook<[VxeTableEvents.FnrChange, import("../../../../../../es/components/
|
|
43
|
-
readonly onFnrFind: AsyncParallelHook<[VxeTableEvents.FnrFind, import("../../../../../../es/components/
|
|
44
|
-
readonly onFnrFindAll: AsyncParallelHook<[VxeTableEvents.FnrFindAll, import("../../../../../../es/components/
|
|
45
|
-
readonly onFnrReplace: AsyncParallelHook<[VxeTableEvents.FnrReplace, import("../../../../../../es/components/
|
|
46
|
-
readonly onFnrReplaceAll: AsyncParallelHook<[VxeTableEvents.FnrReplaceAll, import("../../../../../../es/components/
|
|
47
|
-
readonly onCellAreaCopy: AsyncParallelHook<[VxeTableEvents.CellAreaCopy, import("../../../../../../es/components/
|
|
48
|
-
readonly onCellAreaCut: AsyncParallelHook<[VxeTableEvents.CellAreaCut, import("../../../../../../es/components/
|
|
49
|
-
readonly onCellAreaPaste: AsyncParallelHook<[VxeTableEvents.CellAreaPaste, import("../../../../../../es/components/
|
|
50
|
-
readonly onCellAreaMerge: AsyncParallelHook<[VxeTableEvents.CellAreaMerge, import("../../../../../../es/components/
|
|
51
|
-
readonly onClearCellAreaMerge: AsyncParallelHook<[VxeTableEvents.ClearCellAreaMerge, import("../../../../../../es/components/
|
|
52
|
-
readonly onHeaderCellAreaSelection: AsyncParallelHook<[VxeTableEvents.HeaderCellAreaSelection, import("../../../../../../es/components/
|
|
53
|
-
readonly onCellAreaSelectionStart: AsyncParallelHook<[VxeTableEvents.CellAreaSelectionStart, import("../../../../../../es/components/
|
|
54
|
-
readonly onCellAreaSelectionDrag: AsyncParallelHook<[VxeTableEvents.CellAreaSelectionDrag, import("../../../../../../es/components/
|
|
55
|
-
readonly onCellAreaSelectionEnd: AsyncParallelHook<[VxeTableEvents.CellAreaSelectionEnd, import("../../../../../../es/components/
|
|
56
|
-
readonly onCellAreaExtensionStart: AsyncParallelHook<[VxeTableEvents.CellAreaExtensionStart, import("../../../../../../es/components/
|
|
57
|
-
readonly onCellAreaExtensionDrag: AsyncParallelHook<[VxeTableEvents.CellAreaExtensionDrag, import("../../../../../../es/components/
|
|
58
|
-
readonly onCellAreaExtensionEnd: AsyncParallelHook<[VxeTableEvents.CellAreaExtensionEnd, import("../../../../../../es/components/
|
|
59
|
-
readonly onCellAreaArrowsStart: AsyncParallelHook<[VxeTableEvents.CellAreaArrowsStart, import("../../../../../../es/components/
|
|
60
|
-
readonly onCellAreaArrowsEnd: AsyncParallelHook<[VxeTableEvents.CellAreaArrowsEnd, import("../../../../../../es/components/
|
|
61
|
-
readonly onActiveCellChangeStart: AsyncParallelHook<[VxeTableEvents.ActiveCellChangeStart, import("../../../../../../es/components/
|
|
62
|
-
readonly onActiveCellChangeEnd: AsyncParallelHook<[VxeTableEvents.ActiveCellChangeEnd, import("../../../../../../es/components/
|
|
4
|
+
readonly onKeydownStart: AsyncParallelHook<[VxeTableEvents.KeydownStart, import("../../../../../../es/components/iho-table").IhoTableConfig], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
5
|
+
readonly onKeydown: AsyncParallelHook<[VxeTableEvents.Keydown, import("../../../../../../es/components/iho-table").IhoTableConfig], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
6
|
+
readonly onKeydownEnd: AsyncParallelHook<[VxeTableEvents.KeydownEnd, import("../../../../../../es/components/iho-table").IhoTableConfig], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
7
|
+
readonly onPaste: AsyncParallelHook<[VxeTableEvents.Paste, import("../../../../../../es/components/iho-table").IhoTableConfig], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
8
|
+
readonly onCopy: AsyncParallelHook<[VxeTableEvents.Copy, import("../../../../../../es/components/iho-table").IhoTableConfig], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
9
|
+
readonly onCut: AsyncParallelHook<[VxeTableEvents.Cut, import("../../../../../../es/components/iho-table").IhoTableConfig], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
10
|
+
readonly onCurrentChange: AsyncParallelHook<[VxeTableEvents.CurrentChange, import("../../../../../../es/components/iho-table").IhoTableConfig], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
11
|
+
readonly onRadioChange: AsyncParallelHook<[VxeTableEvents.RadioChange, import("../../../../../../es/components/iho-table").IhoTableConfig], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
12
|
+
readonly onCheckboxChange: AsyncParallelHook<[VxeTableEvents.CheckboxChange, import("../../../../../../es/components/iho-table").IhoTableConfig], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
13
|
+
readonly onCheckboxAll: AsyncParallelHook<[VxeTableEvents.CheckboxAll, import("../../../../../../es/components/iho-table").IhoTableConfig], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
14
|
+
readonly onCheckboxRangeStart: AsyncParallelHook<[VxeTableEvents.CheckboxRangeStart, import("../../../../../../es/components/iho-table").IhoTableConfig], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
15
|
+
readonly onCheckboxRangeChange: AsyncParallelHook<[VxeTableEvents.CheckboxRangeChange, import("../../../../../../es/components/iho-table").IhoTableConfig], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
16
|
+
readonly onCheckboxRangeEnd: AsyncParallelHook<[VxeTableEvents.CheckboxRangeEnd, import("../../../../../../es/components/iho-table").IhoTableConfig], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
17
|
+
readonly onCellClick: AsyncParallelHook<[VxeTableEvents.CellClick, import("../../../../../../es/components/iho-table").IhoTableConfig], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
18
|
+
readonly onCellDblclick: AsyncParallelHook<[VxeTableEvents.CellDblclick, import("../../../../../../es/components/iho-table").IhoTableConfig], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
19
|
+
readonly onCellMenu: AsyncParallelHook<[VxeTableEvents.CellMenu, import("../../../../../../es/components/iho-table").IhoTableConfig], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
20
|
+
readonly onCellMouseenter: AsyncParallelHook<[VxeTableEvents.CellMouseenter, import("../../../../../../es/components/iho-table").IhoTableConfig], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
21
|
+
readonly onCellMouseleave: AsyncParallelHook<[VxeTableEvents.CellMouseleave, import("../../../../../../es/components/iho-table").IhoTableConfig], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
22
|
+
readonly onHeaderCellClick: AsyncParallelHook<[VxeTableEvents.HeaderCellClick, import("../../../../../../es/components/iho-table").IhoTableConfig], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
23
|
+
readonly onHeaderCellDblclick: AsyncParallelHook<[VxeTableEvents.HeaderCellDblclick, import("../../../../../../es/components/iho-table").IhoTableConfig], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
24
|
+
readonly onHeaderCellMenu: AsyncParallelHook<[VxeTableEvents.HeaderCellMenu, import("../../../../../../es/components/iho-table").IhoTableConfig], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
25
|
+
readonly onFooterCellClick: AsyncParallelHook<[VxeTableEvents.FooterCellClick, import("../../../../../../es/components/iho-table").IhoTableConfig], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
26
|
+
readonly onFooterCellDblclick: AsyncParallelHook<[VxeTableEvents.FooterCellDblclick, import("../../../../../../es/components/iho-table").IhoTableConfig], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
27
|
+
readonly onFooterCellMenu: AsyncParallelHook<[VxeTableEvents.FooterCellMenu, import("../../../../../../es/components/iho-table").IhoTableConfig], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
28
|
+
readonly onSortChange: AsyncParallelHook<[VxeTableEvents.SortChange, import("../../../../../../es/components/iho-table").IhoTableConfig], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
29
|
+
readonly onFilterChange: AsyncParallelHook<[VxeTableEvents.FilterChange, import("../../../../../../es/components/iho-table").IhoTableConfig], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
30
|
+
readonly onFilterVisible: AsyncParallelHook<[VxeTableEvents.FilterVisible, import("../../../../../../es/components/iho-table").IhoTableConfig], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
31
|
+
readonly onResizableChange: AsyncParallelHook<[VxeTableEvents.ResizableChange, import("../../../../../../es/components/iho-table").IhoTableConfig], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
32
|
+
readonly onToggleRowExpand: AsyncParallelHook<[VxeTableEvents.ToggleRowExpand, import("../../../../../../es/components/iho-table").IhoTableConfig], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
33
|
+
readonly onToggleTreeExpand: AsyncParallelHook<[VxeTableEvents.ToggleTreeExpand, import("../../../../../../es/components/iho-table").IhoTableConfig], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
34
|
+
readonly onMenuClick: AsyncParallelHook<[VxeTableEvents.MenuClick, import("../../../../../../es/components/iho-table").IhoTableConfig], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
35
|
+
readonly onEditClosed: AsyncParallelHook<[VxeTableEvents.EditClosed, import("../../../../../../es/components/iho-table").IhoTableConfig], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
36
|
+
readonly onEditActived: AsyncParallelHook<[VxeTableEvents.EditActived, import("../../../../../../es/components/iho-table").IhoTableConfig], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
37
|
+
readonly onEditDisabled: AsyncParallelHook<[VxeTableEvents.EditDisabled, import("../../../../../../es/components/iho-table").IhoTableConfig], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
38
|
+
readonly onValidError: AsyncParallelHook<[VxeTableEvents.ValidError, import("../../../../../../es/components/iho-table").IhoTableConfig], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
39
|
+
readonly onScroll: AsyncParallelHook<[VxeTableEvents.Scroll, import("../../../../../../es/components/iho-table").IhoTableConfig], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
40
|
+
readonly onCustom: AsyncParallelHook<[VxeTableEvents.Custom, import("../../../../../../es/components/iho-table").IhoTableConfig], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
41
|
+
readonly onOpenFnr: AsyncParallelHook<[VxeTableEvents.OpenFnr, import("../../../../../../es/components/iho-table").IhoTableConfig], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
42
|
+
readonly onFnrChange: AsyncParallelHook<[VxeTableEvents.FnrChange, import("../../../../../../es/components/iho-table").IhoTableConfig], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
43
|
+
readonly onFnrFind: AsyncParallelHook<[VxeTableEvents.FnrFind, import("../../../../../../es/components/iho-table").IhoTableConfig], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
44
|
+
readonly onFnrFindAll: AsyncParallelHook<[VxeTableEvents.FnrFindAll, import("../../../../../../es/components/iho-table").IhoTableConfig], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
45
|
+
readonly onFnrReplace: AsyncParallelHook<[VxeTableEvents.FnrReplace, import("../../../../../../es/components/iho-table").IhoTableConfig], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
46
|
+
readonly onFnrReplaceAll: AsyncParallelHook<[VxeTableEvents.FnrReplaceAll, import("../../../../../../es/components/iho-table").IhoTableConfig], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
47
|
+
readonly onCellAreaCopy: AsyncParallelHook<[VxeTableEvents.CellAreaCopy, import("../../../../../../es/components/iho-table").IhoTableConfig], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
48
|
+
readonly onCellAreaCut: AsyncParallelHook<[VxeTableEvents.CellAreaCut, import("../../../../../../es/components/iho-table").IhoTableConfig], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
49
|
+
readonly onCellAreaPaste: AsyncParallelHook<[VxeTableEvents.CellAreaPaste, import("../../../../../../es/components/iho-table").IhoTableConfig], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
50
|
+
readonly onCellAreaMerge: AsyncParallelHook<[VxeTableEvents.CellAreaMerge, import("../../../../../../es/components/iho-table").IhoTableConfig], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
51
|
+
readonly onClearCellAreaMerge: AsyncParallelHook<[VxeTableEvents.ClearCellAreaMerge, import("../../../../../../es/components/iho-table").IhoTableConfig], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
52
|
+
readonly onHeaderCellAreaSelection: AsyncParallelHook<[VxeTableEvents.HeaderCellAreaSelection, import("../../../../../../es/components/iho-table").IhoTableConfig], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
53
|
+
readonly onCellAreaSelectionStart: AsyncParallelHook<[VxeTableEvents.CellAreaSelectionStart, import("../../../../../../es/components/iho-table").IhoTableConfig], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
54
|
+
readonly onCellAreaSelectionDrag: AsyncParallelHook<[VxeTableEvents.CellAreaSelectionDrag, import("../../../../../../es/components/iho-table").IhoTableConfig], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
55
|
+
readonly onCellAreaSelectionEnd: AsyncParallelHook<[VxeTableEvents.CellAreaSelectionEnd, import("../../../../../../es/components/iho-table").IhoTableConfig], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
56
|
+
readonly onCellAreaExtensionStart: AsyncParallelHook<[VxeTableEvents.CellAreaExtensionStart, import("../../../../../../es/components/iho-table").IhoTableConfig], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
57
|
+
readonly onCellAreaExtensionDrag: AsyncParallelHook<[VxeTableEvents.CellAreaExtensionDrag, import("../../../../../../es/components/iho-table").IhoTableConfig], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
58
|
+
readonly onCellAreaExtensionEnd: AsyncParallelHook<[VxeTableEvents.CellAreaExtensionEnd, import("../../../../../../es/components/iho-table").IhoTableConfig], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
59
|
+
readonly onCellAreaArrowsStart: AsyncParallelHook<[VxeTableEvents.CellAreaArrowsStart, import("../../../../../../es/components/iho-table").IhoTableConfig], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
60
|
+
readonly onCellAreaArrowsEnd: AsyncParallelHook<[VxeTableEvents.CellAreaArrowsEnd, import("../../../../../../es/components/iho-table").IhoTableConfig], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
61
|
+
readonly onActiveCellChangeStart: AsyncParallelHook<[VxeTableEvents.ActiveCellChangeStart, import("../../../../../../es/components/iho-table").IhoTableConfig], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
62
|
+
readonly onActiveCellChangeEnd: AsyncParallelHook<[VxeTableEvents.ActiveCellChangeEnd, import("../../../../../../es/components/iho-table").IhoTableConfig], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
63
63
|
}
|
|
64
64
|
export declare function useEventHooks(): {
|
|
65
65
|
create: () => EventHooks;
|
|
File without changes
|
|
File without changes
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { SyncWaterfallHook } from '../../../../../../es/shared/utils/tapable';
|
|
2
|
-
import { FieldHookContext,
|
|
3
|
-
import { AbstractFieldHooks } from '../../../../../../es/components/
|
|
2
|
+
import { FieldHookContext, IhoTableFieldItem } from '../../../../../../es/components/iho-table/src/types';
|
|
3
|
+
import { AbstractFieldHooks } from '../../../../../../es/components/iho-table/src/types';
|
|
4
4
|
declare class FieldHooks extends AbstractFieldHooks {
|
|
5
|
-
readonly field: SyncWaterfallHook<[
|
|
5
|
+
readonly field: SyncWaterfallHook<[IhoTableFieldItem, FieldHookContext, import("../../../../../../es/components/iho-table/src/types").IhoTableConfig], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
6
6
|
}
|
|
7
7
|
export declare function useFieldHooks(): {
|
|
8
8
|
create: () => FieldHooks;
|
|
File without changes
|
|
File without changes
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ArrayAble } from '../../../../../es/shared/types';
|
|
2
|
-
import { TablePlugin } from '../../../../../es/components/
|
|
2
|
+
import { TablePlugin } from '../../../../../es/components/iho-table/src/types';
|
|
3
3
|
export declare function useTablePlugin(): {
|
|
4
4
|
use: (plugin: ArrayAble<TablePlugin>) => {
|
|
5
5
|
use: any;
|
|
File without changes
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
import { arrayed } from '../../../../shared/utils/index2.js';
|
|
2
|
+
import { isFunction } from 'lodash-es';
|
|
3
|
+
import VXETable from 'vxe-table';
|
|
2
4
|
import { createTableHooks } from './tapHooks/index2.js';
|
|
3
5
|
|
|
4
6
|
function useTablePlugin() {
|
|
5
7
|
const hooks = createTableHooks();
|
|
6
8
|
function use(plugin) {
|
|
7
|
-
arrayed(plugin).forEach((
|
|
9
|
+
arrayed(plugin).forEach(({ vxe, apply }) => {
|
|
10
|
+
isFunction(vxe) && vxe(VXETable);
|
|
11
|
+
isFunction(apply) && apply(hooks);
|
|
12
|
+
});
|
|
8
13
|
return { use };
|
|
9
14
|
}
|
|
10
15
|
return { use };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function defaultConfigPlugin(): import("../../../../../../es/components/
|
|
1
|
+
export declare function defaultConfigPlugin(): import("../../../../../../es/components/iho-table").TablePlugin;
|
|
File without changes
|
|
@@ -2,13 +2,18 @@ import { mergeWith } from 'lodash-es';
|
|
|
2
2
|
import { defineTablePlugin } from '../../hooks/useTablePlugin2.js';
|
|
3
3
|
|
|
4
4
|
function defaultConfigPlugin() {
|
|
5
|
+
const pluginName = "defaultTablePlugin";
|
|
5
6
|
return defineTablePlugin({
|
|
6
|
-
name:
|
|
7
|
+
name: pluginName,
|
|
7
8
|
apply(hooks) {
|
|
8
|
-
hooks.configHooks.config.tap({ name:
|
|
9
|
+
hooks.configHooks.config.tap({ name: pluginName, stage: 9999 }, (config) => {
|
|
9
10
|
return mergeWith({
|
|
10
11
|
height: "100%",
|
|
11
|
-
|
|
12
|
+
border: true,
|
|
13
|
+
showSeq: true,
|
|
14
|
+
selectType: "checkbox",
|
|
15
|
+
columnConfig: { resizable: true },
|
|
16
|
+
rowConfig: { height: 32, isHover: true, isCurrent: true, keyField: "theUniqueKey" },
|
|
12
17
|
editConfig: {
|
|
13
18
|
trigger: "manual",
|
|
14
19
|
mode: "cell",
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { defaultConfigPlugin } from './defaultConfigPlugin/index2.js';
|
|
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';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { defaultConfigPlugin } from './defaultConfigPlugin/index2.js';
|
|
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';
|
package/es/components/{his-table → iho-table}/src/plugins/lowCodeFieldAdaptorPlugin/index.d.ts
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function lowCodeFieldAdaptorPlugin(): import("../../../../../../es/components/
|
|
1
|
+
export declare function lowCodeFieldAdaptorPlugin(): import("../../../../../../es/components/iho-table").TablePlugin;
|
package/es/components/{his-table → iho-table}/src/plugins/lowCodeFieldAdaptorPlugin/index.js
RENAMED
|
File without changes
|
package/es/components/{his-table → iho-table}/src/plugins/lowCodeFieldAdaptorPlugin/index2.js
RENAMED
|
@@ -1,19 +1,23 @@
|
|
|
1
1
|
import { pick } from 'lodash-es';
|
|
2
2
|
import { defineTablePlugin } from '../../hooks/useTablePlugin2.js';
|
|
3
|
-
import { fieldFormatter } from './formatter2.js';
|
|
4
3
|
|
|
5
4
|
function lowCodeFieldAdaptorPlugin() {
|
|
5
|
+
const pluginName = "lowCodeFieldAdaptorPlugin";
|
|
6
6
|
return defineTablePlugin({
|
|
7
|
-
name:
|
|
7
|
+
name: pluginName,
|
|
8
8
|
apply(hooks) {
|
|
9
|
-
hooks.fieldHooks.field.tap({ name:
|
|
9
|
+
hooks.fieldHooks.field.tap({ name: pluginName, stage: -9999 }, (field) => {
|
|
10
10
|
const _field = field;
|
|
11
|
-
|
|
11
|
+
const result = {
|
|
12
12
|
field: _field.columnName,
|
|
13
13
|
width: _field.colWidth,
|
|
14
|
-
|
|
14
|
+
showOverflow: "tooltip",
|
|
15
15
|
...pick(_field, ["title"])
|
|
16
16
|
};
|
|
17
|
+
if (_field.settingObj) {
|
|
18
|
+
result.editRender = { name: _field.settingObj.attr || "DEFAULT" };
|
|
19
|
+
}
|
|
20
|
+
return result;
|
|
17
21
|
});
|
|
18
22
|
}
|
|
19
23
|
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function checkRendererPlugin(): import("../../../../../../es/components/iho-table").TablePlugin;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import '../../../index2.js';
|
|
2
|
+
import { defineTablePlugin } from '../../hooks/useTablePlugin2.js';
|
|
3
|
+
|
|
4
|
+
function checkRendererPlugin() {
|
|
5
|
+
const pluginName = "checkRendererPlugin";
|
|
6
|
+
return defineTablePlugin({
|
|
7
|
+
name: pluginName,
|
|
8
|
+
apply(hooks) {
|
|
9
|
+
hooks.fieldHooks.field.tap({
|
|
10
|
+
name: pluginName,
|
|
11
|
+
before: "seqRendererPlugin"
|
|
12
|
+
}, (field, {
|
|
13
|
+
index,
|
|
14
|
+
insertBefore
|
|
15
|
+
}, config) => {
|
|
16
|
+
if (index === 0 && config.selectType) {
|
|
17
|
+
insertBefore({
|
|
18
|
+
field: pluginName,
|
|
19
|
+
type: config.selectType
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
return field;
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export { checkRendererPlugin };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function colorRendererPlugin(): import("../../../../../../es/components/iho-table").TablePlugin;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { inject, createVNode } from 'vue';
|
|
2
|
+
import '../../../index2.js';
|
|
3
|
+
import { WIDGET_TYPE, InjectionIhoTableConfig } from '../../constants/index2.js';
|
|
4
|
+
import { defineTablePlugin } from '../../hooks/useTablePlugin2.js';
|
|
5
|
+
|
|
6
|
+
function colorRendererPlugin() {
|
|
7
|
+
const pluginName = "checkRendererPlugin";
|
|
8
|
+
const colorMap = {
|
|
9
|
+
blue: "blue",
|
|
10
|
+
sky: "skyblue",
|
|
11
|
+
azure: "azure",
|
|
12
|
+
palegreen: "palegreen",
|
|
13
|
+
yellow: "yellow",
|
|
14
|
+
darkorange: "darkorange",
|
|
15
|
+
magenta: "magenta",
|
|
16
|
+
purple: "purple",
|
|
17
|
+
maroon: "maroon",
|
|
18
|
+
orange: "orange",
|
|
19
|
+
green: "green",
|
|
20
|
+
red: "red",
|
|
21
|
+
grey: "grey"
|
|
22
|
+
};
|
|
23
|
+
return defineTablePlugin({
|
|
24
|
+
name: pluginName,
|
|
25
|
+
vxe(instance) {
|
|
26
|
+
instance.renderer.add(WIDGET_TYPE.COLOR, {
|
|
27
|
+
renderCell(renderOpts, {
|
|
28
|
+
row,
|
|
29
|
+
column
|
|
30
|
+
}) {
|
|
31
|
+
var _a, _b, _c;
|
|
32
|
+
const value = row[column.field];
|
|
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
|
+
return [createVNode("div", {
|
|
37
|
+
"style": {
|
|
38
|
+
background: colorMap[alias] || color,
|
|
39
|
+
height: height - 8 + "px"
|
|
40
|
+
}
|
|
41
|
+
}, null)];
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export { colorRendererPlugin };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function defaultRendererPlugin(): import("../../../../../../es/components/iho-table").TablePlugin;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { createVNode } from 'vue';
|
|
2
|
+
import { isString } from 'lodash-es';
|
|
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
|
+
|
|
8
|
+
function defaultRendererPlugin() {
|
|
9
|
+
const pluginName = "defaultRendererPlugin";
|
|
10
|
+
return defineTablePlugin({
|
|
11
|
+
name: pluginName,
|
|
12
|
+
vxe(instance) {
|
|
13
|
+
instance.renderer.add(WIDGET_TYPE.DEFAULT, {
|
|
14
|
+
renderCell(renderOpts, {
|
|
15
|
+
row,
|
|
16
|
+
column
|
|
17
|
+
}) {
|
|
18
|
+
const value = row[column.field];
|
|
19
|
+
return isRichContent(value) ? renderRichContent(value) : [value];
|
|
20
|
+
function renderRichContent(content) {
|
|
21
|
+
const parsedContent = parseRichContent(content);
|
|
22
|
+
return [createVNode("div", {
|
|
23
|
+
"style": {
|
|
24
|
+
color: parsedContent.background
|
|
25
|
+
}
|
|
26
|
+
}, [renderIcon(parsedContent.icon), parsedContent.change_text])];
|
|
27
|
+
function renderIcon(icon) {
|
|
28
|
+
if (!icon)
|
|
29
|
+
return null;
|
|
30
|
+
if (icon.match(/#[\da-f]{6}|[\da-f]{3}/i)) {
|
|
31
|
+
return createVNode("i", {
|
|
32
|
+
"class": "icon-dot",
|
|
33
|
+
"style": {
|
|
34
|
+
"--table-icon-color": icon,
|
|
35
|
+
"--table-icon-shadow": icon
|
|
36
|
+
}
|
|
37
|
+
}, null);
|
|
38
|
+
}
|
|
39
|
+
return createVNode("i", {
|
|
40
|
+
"class": parsedContent.icon
|
|
41
|
+
}, null);
|
|
42
|
+
}
|
|
43
|
+
function parseRichContent(richContent) {
|
|
44
|
+
try {
|
|
45
|
+
return JSON.parse(richContent.replace(/^###/, ""));
|
|
46
|
+
} catch (e) {
|
|
47
|
+
IhoTableWarn(`invalid json-content ${richContent}`);
|
|
48
|
+
return {};
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
function isRichContent(content) {
|
|
53
|
+
return isString(content) && !!content.match(/^###\{[^{}]+}$/);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
instance.renderer.add(WIDGET_TYPE.STATUS, instance.renderer.get(WIDGET_TYPE.DEFAULT));
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export { defaultRendererPlugin };
|
|
@@ -0,0 +1,5 @@
|
|
|
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';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function labelRendererPlugin(): import("../../../../../../es/components/iho-table").TablePlugin;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { createVNode } from 'vue';
|
|
2
|
+
import { isArray, isString } from 'lodash-es';
|
|
3
|
+
import '../../../index2.js';
|
|
4
|
+
import { WIDGET_TYPE } from '../../constants/index2.js';
|
|
5
|
+
import { defineTablePlugin } from '../../hooks/useTablePlugin2.js';
|
|
6
|
+
|
|
7
|
+
function labelRendererPlugin() {
|
|
8
|
+
const pluginName = "labelRendererPlugin";
|
|
9
|
+
return defineTablePlugin({
|
|
10
|
+
name: pluginName,
|
|
11
|
+
vxe(instance) {
|
|
12
|
+
instance.renderer.add(WIDGET_TYPE.LABEL, {
|
|
13
|
+
renderCell(renderOpts, {
|
|
14
|
+
row,
|
|
15
|
+
column
|
|
16
|
+
}) {
|
|
17
|
+
try {
|
|
18
|
+
const value = JSON.parse(row[column.field]);
|
|
19
|
+
const labels = isArray(value.labels) ? value.labels : parseLabelString(value.labelStr);
|
|
20
|
+
return labels.map(renderLabelItem);
|
|
21
|
+
} catch (e) {
|
|
22
|
+
return [];
|
|
23
|
+
}
|
|
24
|
+
function parseLabelString(str) {
|
|
25
|
+
if (!isString(str))
|
|
26
|
+
return [];
|
|
27
|
+
return str.split(",").map((s) => ({
|
|
28
|
+
labelName: s
|
|
29
|
+
}));
|
|
30
|
+
}
|
|
31
|
+
function renderLabelItem(item) {
|
|
32
|
+
return createVNode("div", {
|
|
33
|
+
"style": {
|
|
34
|
+
backgroundColor: item.color || "#5585f5",
|
|
35
|
+
color: "white"
|
|
36
|
+
}
|
|
37
|
+
}, [item.labelName]);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export { labelRendererPlugin };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function seqRendererPlugin(): import("../../../../../../es/components/iho-table").TablePlugin;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { inject, createVNode } from 'vue';
|
|
2
|
+
import { SettingsSharp } from '@vicons/ionicons5';
|
|
3
|
+
import { NIcon } from 'naive-ui';
|
|
4
|
+
import '../../../index2.js';
|
|
5
|
+
import { WIDGET_TYPE, InjectionIhoTableEmits } from '../../constants/index2.js';
|
|
6
|
+
import { defineTablePlugin } from '../../hooks/useTablePlugin2.js';
|
|
7
|
+
|
|
8
|
+
function seqRendererPlugin() {
|
|
9
|
+
const pluginName = "seqRendererPlugin";
|
|
10
|
+
return defineTablePlugin({
|
|
11
|
+
name: pluginName,
|
|
12
|
+
vxe(instance) {
|
|
13
|
+
instance.renderer.add(WIDGET_TYPE.SEQUENCE, {
|
|
14
|
+
renderCell(renderOpts, {
|
|
15
|
+
$rowIndex
|
|
16
|
+
}) {
|
|
17
|
+
return [`${$rowIndex}`];
|
|
18
|
+
},
|
|
19
|
+
renderHeader() {
|
|
20
|
+
const emits = inject(InjectionIhoTableEmits);
|
|
21
|
+
function onClick() {
|
|
22
|
+
emits && emits("settingClick");
|
|
23
|
+
}
|
|
24
|
+
return [createVNode(NIcon, {
|
|
25
|
+
"size": "14",
|
|
26
|
+
"color": "#777",
|
|
27
|
+
"component": SettingsSharp,
|
|
28
|
+
"onClick": onClick
|
|
29
|
+
}, null)];
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
},
|
|
33
|
+
apply(hooks) {
|
|
34
|
+
hooks.fieldHooks.field.tap(pluginName, (field, {
|
|
35
|
+
index,
|
|
36
|
+
insertBefore
|
|
37
|
+
}, config) => {
|
|
38
|
+
if (index === 0 && config.showSeq) {
|
|
39
|
+
insertBefore({
|
|
40
|
+
align: "center",
|
|
41
|
+
fixed: "left",
|
|
42
|
+
width: 34,
|
|
43
|
+
field: pluginName,
|
|
44
|
+
editRender: {
|
|
45
|
+
name: WIDGET_TYPE.SEQUENCE
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
return field;
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export { seqRendererPlugin };
|