cnhis-design-vue 3.1.30-beta.6 → 3.1.30
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 +0 -1
- package/es/components/big-table/index.js +0 -1
- package/es/components/button-print/index.d.ts +1268 -0
- package/es/components/button-print/index.js +1 -0
- package/es/components/button-print/src/ButtonPrint.vue.d.ts +1269 -3
- package/es/components/button-print/src/ButtonPrint.vue_vue_type_script_setup_true_lang.js +86 -44
- package/es/components/button-print/src/components/IdentityVerification.js +42 -11
- package/es/components/button-print/src/components/IdentityVerification.vue.d.ts +1253 -0
- package/es/components/button-print/src/components/edit.js +142 -0
- package/es/components/button-print/src/components/edit.vue.d.ts +1237 -0
- package/es/components/button-print/src/utils/browserPrint.d.ts +1 -0
- package/es/components/button-print/src/utils/browserPrint.js +40 -0
- package/es/components/button-print/src/utils/index.d.ts +1 -0
- package/es/components/button-print/src/utils/index.js +1 -0
- package/es/components/button-print/style/index.css +1 -1
- package/es/components/iho-table/index.d.ts +7 -3
- package/es/components/iho-table/index.js +2 -0
- package/es/components/iho-table/src/IhoTable.js +8 -4
- package/es/components/iho-table/src/IhoTable.vue.d.ts +6 -2
- package/es/components/iho-table/src/components/IhoTableColumn.js +12 -9
- package/es/components/iho-table/src/constants/index.d.ts +1 -1
- package/es/components/iho-table/src/constants/index.js +1 -0
- package/es/components/{big-table → iho-table}/src/hooks/export.d.ts +1 -0
- package/es/components/iho-table/src/hooks/export.js +2 -0
- package/es/components/iho-table/src/hooks/tapHooks/useConfigHooks.d.ts +3 -1
- package/es/components/iho-table/src/hooks/tapHooks/useEventHooks.d.ts +1 -1
- package/es/components/{big-table → iho-table}/src/hooks/useColumnConfigAdaptor.d.ts +0 -0
- package/es/components/{big-table → iho-table}/src/hooks/useColumnConfigAdaptor.js +0 -0
- package/es/components/iho-table/src/hooks/useTableContext.d.ts +1 -1
- package/es/components/iho-table/src/plugins/defaultConfigPlugin/index.js +1 -0
- package/es/components/iho-table/src/plugins/filterPlugin/filter.d.ts +23 -0
- package/es/components/iho-table/src/plugins/filterPlugin/filter.js +99 -0
- package/es/components/iho-table/src/plugins/filterPlugin/index.d.ts +1 -0
- package/es/components/iho-table/src/plugins/filterPlugin/index.js +80 -0
- package/es/components/iho-table/src/plugins/filterPlugin/types.d.ts +14 -0
- package/es/components/iho-table/src/plugins/filterPlugin/types.js +8 -0
- package/es/components/iho-table/src/plugins/index.js +14 -12
- package/es/components/iho-table/src/plugins/lowCodeFieldAdaptorPlugin/index.js +4 -4
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.d.ts +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/index.js +14 -3
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/inputRendererPlugin.js +12 -7
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/numberRendererPlugin.js +5 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/index.js +14 -3
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/editSeparate.vue.d.ts +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/index.js +24 -10
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin.js +12 -7
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/seqRendererPlugin.js +8 -2
- package/es/components/iho-table/src/types/index.d.ts +32 -10
- package/es/components/iho-table/src/utils/index.d.ts +4 -1
- package/es/components/iho-table/src/utils/index.js +7 -1
- package/es/components/iho-table/style/index.css +1 -1
- package/es/components/index.css +1 -1
- package/es/components/index.d.ts +1 -2
- package/es/components/index.js +3 -2
- package/es/components/keyboard/src/Keyboard.js +1 -1
- package/es/shared/types/index.d.ts +2 -2
- package/package.json +2 -2
- package/es/components/big-table/src/hooks/export.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useBrowserPrint(data: Blob, mode: string): void;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
function useBrowserPrint(data, mode) {
|
|
2
|
+
if (!data)
|
|
3
|
+
return console.log("\u6587\u6863\u6D41\u4E0D\u5B58\u5728\uFF01");
|
|
4
|
+
const blob = new Blob([data], { type: "application/pdf;charset=utf-8" });
|
|
5
|
+
const src = window.URL.createObjectURL(blob);
|
|
6
|
+
switch (mode) {
|
|
7
|
+
case "printDirect":
|
|
8
|
+
{
|
|
9
|
+
const iframe = document.createElement("iframe");
|
|
10
|
+
iframe.style.display = "none";
|
|
11
|
+
iframe.style.pageBreakBefore = "always";
|
|
12
|
+
iframe.src = src;
|
|
13
|
+
document.body.appendChild(iframe);
|
|
14
|
+
iframe.onload = () => {
|
|
15
|
+
var _a;
|
|
16
|
+
iframe.focus();
|
|
17
|
+
(_a = iframe.contentWindow) == null ? void 0 : _a.print();
|
|
18
|
+
window.URL.revokeObjectURL(iframe.src);
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
break;
|
|
22
|
+
case "preview":
|
|
23
|
+
window.open(src);
|
|
24
|
+
break;
|
|
25
|
+
default:
|
|
26
|
+
{
|
|
27
|
+
const a = document.createElement("a");
|
|
28
|
+
a.style.display = "none";
|
|
29
|
+
a.href = src;
|
|
30
|
+
a.download = "";
|
|
31
|
+
document.body.appendChild(a);
|
|
32
|
+
a.click();
|
|
33
|
+
document.body.removeChild(a);
|
|
34
|
+
window.URL.revokeObjectURL(a.href);
|
|
35
|
+
}
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export { useBrowserPrint };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.dropdown-button{border-color:#d5d5d5!important;color:#212121}.c-dropdown .n-dropdown-menu-wrapper span.active{color:#5585f5}.login-form-button{border-radius:24px;color:#fff;font-size:16px;height:50px;width:100%}.login-form-button-print{padding-top:15px}.login-form-button-print .n-input{border-radius:6px;color:#757575;font-size:14px;height:50px;line-height:50px}
|
|
1
|
+
.dropdown-button{border-color:#d5d5d5!important;color:#212121}.c-dropdown .n-dropdown-menu-wrapper span.active{color:#5585f5}.login-form-button{border-radius:24px;color:#fff;font-size:16px;height:50px;width:100%}.login-form-button-print{padding-top:15px}.login-form-button-print .n-input{border-radius:6px;color:#757575;font-size:14px;height:50px;line-height:50px}.c-button-print-modal .n-form-item-feedback-wrapper{display:none}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SFCWithInstall } from '../../../es/shared/types';
|
|
2
2
|
import { IhoTableInstance } from '../../../es/components/iho-table/src/types';
|
|
3
|
-
export * from './src/hooks/
|
|
3
|
+
export * from './src/hooks/export';
|
|
4
4
|
export * from './src/types';
|
|
5
5
|
export declare const useIhoTablePresetPlugins: (instance: IhoTableInstance) => void;
|
|
6
6
|
declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
@@ -98,8 +98,9 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
98
98
|
onActiveCellChangeStart?: ((...args: any[]) => any) | undefined;
|
|
99
99
|
onActiveCellChangeEnd?: ((...args: any[]) => any) | undefined;
|
|
100
100
|
onSettingClick?: ((...args: any[]) => any) | undefined;
|
|
101
|
+
onFormClick?: ((...args: any[]) => any) | undefined;
|
|
101
102
|
}>>;
|
|
102
|
-
emits: (event: "toggleRowExpand" | "toggleTreeExpand" | "copy" | "scroll" | "formChange" | "settingClick" | "cut" | "paste" | "keydown" | "keydownStart" | "keydownEnd" | "currentChange" | "radioChange" | "checkboxChange" | "checkboxAll" | "checkboxRangeStart" | "checkboxRangeChange" | "checkboxRangeEnd" | "cellClick" | "cellDblclick" | "cellMenu" | "cellMouseenter" | "cellMouseleave" | "headerCellClick" | "headerCellDblclick" | "headerCellMenu" | "footerCellClick" | "footerCellDblclick" | "footerCellMenu" | "sortChange" | "filterChange" | "filterVisible" | "resizableChange" | "menuClick" | "editClosed" | "editActived" | "editDisabled" | "validError" | "custom" | "openFnr" | "fnrChange" | "fnrFind" | "fnrFindAll" | "fnrReplace" | "fnrReplaceAll" | "cellAreaCopy" | "cellAreaCut" | "cellAreaPaste" | "cellAreaMerge" | "clearCellAreaMerge" | "headerCellAreaSelection" | "cellAreaSelectionStart" | "cellAreaSelectionDrag" | "cellAreaSelectionEnd" | "cellAreaExtensionStart" | "cellAreaExtensionDrag" | "cellAreaExtensionEnd" | "cellAreaArrowsStart" | "cellAreaArrowsEnd" | "activeCellChangeStart" | "activeCellChangeEnd", ...args: any[]) => void;
|
|
103
|
+
emits: (event: "toggleRowExpand" | "toggleTreeExpand" | "copy" | "scroll" | "formChange" | "settingClick" | "formClick" | "cut" | "paste" | "keydown" | "keydownStart" | "keydownEnd" | "currentChange" | "radioChange" | "checkboxChange" | "checkboxAll" | "checkboxRangeStart" | "checkboxRangeChange" | "checkboxRangeEnd" | "cellClick" | "cellDblclick" | "cellMenu" | "cellMouseenter" | "cellMouseleave" | "headerCellClick" | "headerCellDblclick" | "headerCellMenu" | "footerCellClick" | "footerCellDblclick" | "footerCellMenu" | "sortChange" | "filterChange" | "filterVisible" | "resizableChange" | "menuClick" | "editClosed" | "editActived" | "editDisabled" | "validError" | "custom" | "openFnr" | "fnrChange" | "fnrFind" | "fnrFindAll" | "fnrReplace" | "fnrReplaceAll" | "cellAreaCopy" | "cellAreaCut" | "cellAreaPaste" | "cellAreaMerge" | "clearCellAreaMerge" | "headerCellAreaSelection" | "cellAreaSelectionStart" | "cellAreaSelectionDrag" | "cellAreaSelectionEnd" | "cellAreaExtensionStart" | "cellAreaExtensionDrag" | "cellAreaExtensionEnd" | "cellAreaArrowsStart" | "cellAreaArrowsEnd" | "activeCellChangeStart" | "activeCellChangeEnd", ...args: any[]) => void;
|
|
103
104
|
uuid: string;
|
|
104
105
|
$table: import("vue").Ref<import("vxe-table").VxeTableInstance | undefined>;
|
|
105
106
|
hooks: Readonly<{
|
|
@@ -769,6 +770,7 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
769
770
|
resizable?: boolean | undefined;
|
|
770
771
|
width?: import("vxe-table").VxeColumnPropTypes.Width | undefined;
|
|
771
772
|
minWidth?: import("vxe-table").VxeColumnPropTypes.MinWidth | undefined;
|
|
773
|
+
seqSlotFn: string | ((params: import("vxe-table").VxeColumnPropTypes.DefaultSlotParams) => import("vxe-table").SlotVNodeType | import("vxe-table").SlotVNodeType[]) | null | undefined;
|
|
772
774
|
} | undefined;
|
|
773
775
|
rowConfig?: {
|
|
774
776
|
useKey?: boolean | undefined;
|
|
@@ -3156,6 +3158,7 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
3156
3158
|
resizable?: boolean | undefined;
|
|
3157
3159
|
width?: import("vxe-table").VxeColumnPropTypes.Width | undefined;
|
|
3158
3160
|
minWidth?: import("vxe-table").VxeColumnPropTypes.MinWidth | undefined;
|
|
3161
|
+
seqSlotFn: string | ((params: import("vxe-table").VxeColumnPropTypes.DefaultSlotParams) => import("vxe-table").SlotVNodeType | import("vxe-table").SlotVNodeType[]) | null | undefined;
|
|
3159
3162
|
} | undefined;
|
|
3160
3163
|
rowConfig?: {
|
|
3161
3164
|
useKey?: boolean | undefined;
|
|
@@ -4475,7 +4478,7 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
4475
4478
|
type: import("vue").PropType<import("../../../es/shared/types").AnyObject>;
|
|
4476
4479
|
};
|
|
4477
4480
|
}>>, {}>;
|
|
4478
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("toggleRowExpand" | "toggleTreeExpand" | "copy" | "scroll" | "formChange" | "settingClick" | "cut" | "paste" | "keydown" | "keydownStart" | "keydownEnd" | "currentChange" | "radioChange" | "checkboxChange" | "checkboxAll" | "checkboxRangeStart" | "checkboxRangeChange" | "checkboxRangeEnd" | "cellClick" | "cellDblclick" | "cellMenu" | "cellMouseenter" | "cellMouseleave" | "headerCellClick" | "headerCellDblclick" | "headerCellMenu" | "footerCellClick" | "footerCellDblclick" | "footerCellMenu" | "sortChange" | "filterChange" | "filterVisible" | "resizableChange" | "menuClick" | "editClosed" | "editActived" | "editDisabled" | "validError" | "custom" | "openFnr" | "fnrChange" | "fnrFind" | "fnrFindAll" | "fnrReplace" | "fnrReplaceAll" | "cellAreaCopy" | "cellAreaCut" | "cellAreaPaste" | "cellAreaMerge" | "clearCellAreaMerge" | "headerCellAreaSelection" | "cellAreaSelectionStart" | "cellAreaSelectionDrag" | "cellAreaSelectionEnd" | "cellAreaExtensionStart" | "cellAreaExtensionDrag" | "cellAreaExtensionEnd" | "cellAreaArrowsStart" | "cellAreaArrowsEnd" | "activeCellChangeStart" | "activeCellChangeEnd")[], "toggleRowExpand" | "toggleTreeExpand" | "copy" | "scroll" | "formChange" | "settingClick" | "cut" | "paste" | "keydown" | "keydownStart" | "keydownEnd" | "currentChange" | "radioChange" | "checkboxChange" | "checkboxAll" | "checkboxRangeStart" | "checkboxRangeChange" | "checkboxRangeEnd" | "cellClick" | "cellDblclick" | "cellMenu" | "cellMouseenter" | "cellMouseleave" | "headerCellClick" | "headerCellDblclick" | "headerCellMenu" | "footerCellClick" | "footerCellDblclick" | "footerCellMenu" | "sortChange" | "filterChange" | "filterVisible" | "resizableChange" | "menuClick" | "editClosed" | "editActived" | "editDisabled" | "validError" | "custom" | "openFnr" | "fnrChange" | "fnrFind" | "fnrFindAll" | "fnrReplace" | "fnrReplaceAll" | "cellAreaCopy" | "cellAreaCut" | "cellAreaPaste" | "cellAreaMerge" | "clearCellAreaMerge" | "headerCellAreaSelection" | "cellAreaSelectionStart" | "cellAreaSelectionDrag" | "cellAreaSelectionEnd" | "cellAreaExtensionStart" | "cellAreaExtensionDrag" | "cellAreaExtensionEnd" | "cellAreaArrowsStart" | "cellAreaArrowsEnd" | "activeCellChangeStart" | "activeCellChangeEnd", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
4481
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("toggleRowExpand" | "toggleTreeExpand" | "copy" | "scroll" | "formChange" | "settingClick" | "formClick" | "cut" | "paste" | "keydown" | "keydownStart" | "keydownEnd" | "currentChange" | "radioChange" | "checkboxChange" | "checkboxAll" | "checkboxRangeStart" | "checkboxRangeChange" | "checkboxRangeEnd" | "cellClick" | "cellDblclick" | "cellMenu" | "cellMouseenter" | "cellMouseleave" | "headerCellClick" | "headerCellDblclick" | "headerCellMenu" | "footerCellClick" | "footerCellDblclick" | "footerCellMenu" | "sortChange" | "filterChange" | "filterVisible" | "resizableChange" | "menuClick" | "editClosed" | "editActived" | "editDisabled" | "validError" | "custom" | "openFnr" | "fnrChange" | "fnrFind" | "fnrFindAll" | "fnrReplace" | "fnrReplaceAll" | "cellAreaCopy" | "cellAreaCut" | "cellAreaPaste" | "cellAreaMerge" | "clearCellAreaMerge" | "headerCellAreaSelection" | "cellAreaSelectionStart" | "cellAreaSelectionDrag" | "cellAreaSelectionEnd" | "cellAreaExtensionStart" | "cellAreaExtensionDrag" | "cellAreaExtensionEnd" | "cellAreaArrowsStart" | "cellAreaArrowsEnd" | "activeCellChangeStart" | "activeCellChangeEnd")[], "toggleRowExpand" | "toggleTreeExpand" | "copy" | "scroll" | "formChange" | "settingClick" | "formClick" | "cut" | "paste" | "keydown" | "keydownStart" | "keydownEnd" | "currentChange" | "radioChange" | "checkboxChange" | "checkboxAll" | "checkboxRangeStart" | "checkboxRangeChange" | "checkboxRangeEnd" | "cellClick" | "cellDblclick" | "cellMenu" | "cellMouseenter" | "cellMouseleave" | "headerCellClick" | "headerCellDblclick" | "headerCellMenu" | "footerCellClick" | "footerCellDblclick" | "footerCellMenu" | "sortChange" | "filterChange" | "filterVisible" | "resizableChange" | "menuClick" | "editClosed" | "editActived" | "editDisabled" | "validError" | "custom" | "openFnr" | "fnrChange" | "fnrFind" | "fnrFindAll" | "fnrReplace" | "fnrReplaceAll" | "cellAreaCopy" | "cellAreaCut" | "cellAreaPaste" | "cellAreaMerge" | "clearCellAreaMerge" | "headerCellAreaSelection" | "cellAreaSelectionStart" | "cellAreaSelectionDrag" | "cellAreaSelectionEnd" | "cellAreaExtensionStart" | "cellAreaExtensionDrag" | "cellAreaExtensionEnd" | "cellAreaArrowsStart" | "cellAreaArrowsEnd" | "activeCellChangeStart" | "activeCellChangeEnd", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
4479
4482
|
tableConfig: {
|
|
4480
4483
|
type: import("vue").PropType<import("../../../es/components/iho-table/src/types").IhoTableConfig>;
|
|
4481
4484
|
default: () => {};
|
|
@@ -4553,6 +4556,7 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
4553
4556
|
onActiveCellChangeStart?: ((...args: any[]) => any) | undefined;
|
|
4554
4557
|
onActiveCellChangeEnd?: ((...args: any[]) => any) | undefined;
|
|
4555
4558
|
onSettingClick?: ((...args: any[]) => any) | undefined;
|
|
4559
|
+
onFormClick?: ((...args: any[]) => any) | undefined;
|
|
4556
4560
|
}, {
|
|
4557
4561
|
fieldList: import("../../../es/components/iho-table/src/types").LowCodeTableFieldItem[];
|
|
4558
4562
|
tableConfig: import("../../../es/components/iho-table/src/types").IhoTableConfig;
|
|
@@ -16,8 +16,10 @@ import '../../shared/utils/tapable/AsyncSeriesBailHook.js';
|
|
|
16
16
|
import '../../shared/utils/tapable/AsyncSeriesLoopHook.js';
|
|
17
17
|
import '../../shared/utils/tapable/AsyncSeriesWaterfallHook.js';
|
|
18
18
|
export { AbstractConfigHooks, AbstractDataHooks, AbstractDomInsertHooks, AbstractEventHooks, AbstractFieldHooks, AbstractSetupHooks } from './src/types/pluginType.js';
|
|
19
|
+
import './src/utils/index.js';
|
|
19
20
|
import { useTablePlugin } from './src/hooks/useTablePlugin.js';
|
|
20
21
|
export { defineTablePlugin, useTablePlugin } from './src/hooks/useTablePlugin.js';
|
|
22
|
+
export { useColumnConfigAdaptor } from './src/hooks/useColumnConfigAdaptor.js';
|
|
21
23
|
|
|
22
24
|
const { use } = useTablePlugin();
|
|
23
25
|
const useIhoTablePresetPlugins = (instance) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, provide, ref, computed, watch, resolveComponent, openBlock, createElementBlock, createBlock, resolveDynamicComponent,
|
|
1
|
+
import { defineComponent, provide, ref, computed, watch, resolveComponent, openBlock, createElementBlock, unref, createBlock, resolveDynamicComponent, createVNode, mergeProps, createSlots, withCtx, Fragment, renderList, renderSlot } from 'vue';
|
|
2
2
|
import { uuidGenerator } from '../../../shared/utils/index.js';
|
|
3
3
|
import { useDebounceFn } from '@vueuse/core';
|
|
4
4
|
import { VxeEventListenerNameList, InjectionIhoTableEmits, InjectionIhoTableUUID, InjectionIhoTableInstance, InjectionIhoTableConfig, InjectionIhoTableFieldList, InjectionIhoTableHandler } from './constants/index.js';
|
|
@@ -9,7 +9,7 @@ import { getEventName } from './utils/index.js';
|
|
|
9
9
|
import ColumnComponent from './components/IhoTableColumn.js';
|
|
10
10
|
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.js';
|
|
11
11
|
|
|
12
|
-
const _hoisted_1 =
|
|
12
|
+
const _hoisted_1 = ["id"];
|
|
13
13
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
14
14
|
__name: "IhoTable",
|
|
15
15
|
props: {
|
|
@@ -21,6 +21,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
21
21
|
emits: [
|
|
22
22
|
"formChange",
|
|
23
23
|
"settingClick",
|
|
24
|
+
"formClick",
|
|
24
25
|
...VxeEventListenerNameList.map(getEventName)
|
|
25
26
|
],
|
|
26
27
|
setup(__props, { expose, emit: emits }) {
|
|
@@ -91,7 +92,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
91
92
|
hooks.setupHooks.setup.call(configRef, fieldListRef);
|
|
92
93
|
return (_ctx, _cache) => {
|
|
93
94
|
const _component_vxe_table = resolveComponent("vxe-table");
|
|
94
|
-
return openBlock(), createElementBlock("section",
|
|
95
|
+
return openBlock(), createElementBlock("section", {
|
|
96
|
+
class: "iho-table",
|
|
97
|
+
id: unref(uuid)
|
|
98
|
+
}, [
|
|
95
99
|
(openBlock(), createBlock(resolveDynamicComponent(unref(header)))),
|
|
96
100
|
createVNode(_component_vxe_table, mergeProps({
|
|
97
101
|
ref_key: "$table",
|
|
@@ -118,7 +122,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
118
122
|
})
|
|
119
123
|
]), 1040, ["data"]),
|
|
120
124
|
(openBlock(), createBlock(resolveDynamicComponent(unref(footer))))
|
|
121
|
-
]);
|
|
125
|
+
], 8, _hoisted_1);
|
|
122
126
|
};
|
|
123
127
|
}
|
|
124
128
|
});
|
|
@@ -97,8 +97,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
97
97
|
onActiveCellChangeStart?: ((...args: any[]) => any) | undefined;
|
|
98
98
|
onActiveCellChangeEnd?: ((...args: any[]) => any) | undefined;
|
|
99
99
|
onSettingClick?: ((...args: any[]) => any) | undefined;
|
|
100
|
+
onFormClick?: ((...args: any[]) => any) | undefined;
|
|
100
101
|
}>>;
|
|
101
|
-
emits: (event: "toggleRowExpand" | "toggleTreeExpand" | "copy" | "scroll" | "formChange" | "settingClick" | "cut" | "paste" | "keydown" | "keydownStart" | "keydownEnd" | "currentChange" | "radioChange" | "checkboxChange" | "checkboxAll" | "checkboxRangeStart" | "checkboxRangeChange" | "checkboxRangeEnd" | "cellClick" | "cellDblclick" | "cellMenu" | "cellMouseenter" | "cellMouseleave" | "headerCellClick" | "headerCellDblclick" | "headerCellMenu" | "footerCellClick" | "footerCellDblclick" | "footerCellMenu" | "sortChange" | "filterChange" | "filterVisible" | "resizableChange" | "menuClick" | "editClosed" | "editActived" | "editDisabled" | "validError" | "custom" | "openFnr" | "fnrChange" | "fnrFind" | "fnrFindAll" | "fnrReplace" | "fnrReplaceAll" | "cellAreaCopy" | "cellAreaCut" | "cellAreaPaste" | "cellAreaMerge" | "clearCellAreaMerge" | "headerCellAreaSelection" | "cellAreaSelectionStart" | "cellAreaSelectionDrag" | "cellAreaSelectionEnd" | "cellAreaExtensionStart" | "cellAreaExtensionDrag" | "cellAreaExtensionEnd" | "cellAreaArrowsStart" | "cellAreaArrowsEnd" | "activeCellChangeStart" | "activeCellChangeEnd", ...args: any[]) => void;
|
|
102
|
+
emits: (event: "toggleRowExpand" | "toggleTreeExpand" | "copy" | "scroll" | "formChange" | "settingClick" | "formClick" | "cut" | "paste" | "keydown" | "keydownStart" | "keydownEnd" | "currentChange" | "radioChange" | "checkboxChange" | "checkboxAll" | "checkboxRangeStart" | "checkboxRangeChange" | "checkboxRangeEnd" | "cellClick" | "cellDblclick" | "cellMenu" | "cellMouseenter" | "cellMouseleave" | "headerCellClick" | "headerCellDblclick" | "headerCellMenu" | "footerCellClick" | "footerCellDblclick" | "footerCellMenu" | "sortChange" | "filterChange" | "filterVisible" | "resizableChange" | "menuClick" | "editClosed" | "editActived" | "editDisabled" | "validError" | "custom" | "openFnr" | "fnrChange" | "fnrFind" | "fnrFindAll" | "fnrReplace" | "fnrReplaceAll" | "cellAreaCopy" | "cellAreaCut" | "cellAreaPaste" | "cellAreaMerge" | "clearCellAreaMerge" | "headerCellAreaSelection" | "cellAreaSelectionStart" | "cellAreaSelectionDrag" | "cellAreaSelectionEnd" | "cellAreaExtensionStart" | "cellAreaExtensionDrag" | "cellAreaExtensionEnd" | "cellAreaArrowsStart" | "cellAreaArrowsEnd" | "activeCellChangeStart" | "activeCellChangeEnd", ...args: any[]) => void;
|
|
102
103
|
uuid: string;
|
|
103
104
|
$table: import("vue").Ref<VxeTableInstance | undefined>;
|
|
104
105
|
hooks: Readonly<{
|
|
@@ -768,6 +769,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
768
769
|
resizable?: boolean | undefined;
|
|
769
770
|
width?: import("vxe-table").VxeColumnPropTypes.Width | undefined;
|
|
770
771
|
minWidth?: import("vxe-table").VxeColumnPropTypes.MinWidth | undefined;
|
|
772
|
+
seqSlotFn: string | ((params: import("vxe-table").VxeColumnPropTypes.DefaultSlotParams) => import("vxe-table").SlotVNodeType | import("vxe-table").SlotVNodeType[]) | null | undefined;
|
|
771
773
|
} | undefined;
|
|
772
774
|
rowConfig?: {
|
|
773
775
|
useKey?: boolean | undefined;
|
|
@@ -3155,6 +3157,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
3155
3157
|
resizable?: boolean | undefined;
|
|
3156
3158
|
width?: import("vxe-table").VxeColumnPropTypes.Width | undefined;
|
|
3157
3159
|
minWidth?: import("vxe-table").VxeColumnPropTypes.MinWidth | undefined;
|
|
3160
|
+
seqSlotFn: string | ((params: import("vxe-table").VxeColumnPropTypes.DefaultSlotParams) => import("vxe-table").SlotVNodeType | import("vxe-table").SlotVNodeType[]) | null | undefined;
|
|
3158
3161
|
} | undefined;
|
|
3159
3162
|
rowConfig?: {
|
|
3160
3163
|
useKey?: boolean | undefined;
|
|
@@ -4474,7 +4477,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
4474
4477
|
type: PropType<AnyObject>;
|
|
4475
4478
|
};
|
|
4476
4479
|
}>>, {}>;
|
|
4477
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("toggleRowExpand" | "toggleTreeExpand" | "copy" | "scroll" | "formChange" | "settingClick" | "cut" | "paste" | "keydown" | "keydownStart" | "keydownEnd" | "currentChange" | "radioChange" | "checkboxChange" | "checkboxAll" | "checkboxRangeStart" | "checkboxRangeChange" | "checkboxRangeEnd" | "cellClick" | "cellDblclick" | "cellMenu" | "cellMouseenter" | "cellMouseleave" | "headerCellClick" | "headerCellDblclick" | "headerCellMenu" | "footerCellClick" | "footerCellDblclick" | "footerCellMenu" | "sortChange" | "filterChange" | "filterVisible" | "resizableChange" | "menuClick" | "editClosed" | "editActived" | "editDisabled" | "validError" | "custom" | "openFnr" | "fnrChange" | "fnrFind" | "fnrFindAll" | "fnrReplace" | "fnrReplaceAll" | "cellAreaCopy" | "cellAreaCut" | "cellAreaPaste" | "cellAreaMerge" | "clearCellAreaMerge" | "headerCellAreaSelection" | "cellAreaSelectionStart" | "cellAreaSelectionDrag" | "cellAreaSelectionEnd" | "cellAreaExtensionStart" | "cellAreaExtensionDrag" | "cellAreaExtensionEnd" | "cellAreaArrowsStart" | "cellAreaArrowsEnd" | "activeCellChangeStart" | "activeCellChangeEnd")[], "toggleRowExpand" | "toggleTreeExpand" | "copy" | "scroll" | "formChange" | "settingClick" | "cut" | "paste" | "keydown" | "keydownStart" | "keydownEnd" | "currentChange" | "radioChange" | "checkboxChange" | "checkboxAll" | "checkboxRangeStart" | "checkboxRangeChange" | "checkboxRangeEnd" | "cellClick" | "cellDblclick" | "cellMenu" | "cellMouseenter" | "cellMouseleave" | "headerCellClick" | "headerCellDblclick" | "headerCellMenu" | "footerCellClick" | "footerCellDblclick" | "footerCellMenu" | "sortChange" | "filterChange" | "filterVisible" | "resizableChange" | "menuClick" | "editClosed" | "editActived" | "editDisabled" | "validError" | "custom" | "openFnr" | "fnrChange" | "fnrFind" | "fnrFindAll" | "fnrReplace" | "fnrReplaceAll" | "cellAreaCopy" | "cellAreaCut" | "cellAreaPaste" | "cellAreaMerge" | "clearCellAreaMerge" | "headerCellAreaSelection" | "cellAreaSelectionStart" | "cellAreaSelectionDrag" | "cellAreaSelectionEnd" | "cellAreaExtensionStart" | "cellAreaExtensionDrag" | "cellAreaExtensionEnd" | "cellAreaArrowsStart" | "cellAreaArrowsEnd" | "activeCellChangeStart" | "activeCellChangeEnd", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
4480
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("toggleRowExpand" | "toggleTreeExpand" | "copy" | "scroll" | "formChange" | "settingClick" | "formClick" | "cut" | "paste" | "keydown" | "keydownStart" | "keydownEnd" | "currentChange" | "radioChange" | "checkboxChange" | "checkboxAll" | "checkboxRangeStart" | "checkboxRangeChange" | "checkboxRangeEnd" | "cellClick" | "cellDblclick" | "cellMenu" | "cellMouseenter" | "cellMouseleave" | "headerCellClick" | "headerCellDblclick" | "headerCellMenu" | "footerCellClick" | "footerCellDblclick" | "footerCellMenu" | "sortChange" | "filterChange" | "filterVisible" | "resizableChange" | "menuClick" | "editClosed" | "editActived" | "editDisabled" | "validError" | "custom" | "openFnr" | "fnrChange" | "fnrFind" | "fnrFindAll" | "fnrReplace" | "fnrReplaceAll" | "cellAreaCopy" | "cellAreaCut" | "cellAreaPaste" | "cellAreaMerge" | "clearCellAreaMerge" | "headerCellAreaSelection" | "cellAreaSelectionStart" | "cellAreaSelectionDrag" | "cellAreaSelectionEnd" | "cellAreaExtensionStart" | "cellAreaExtensionDrag" | "cellAreaExtensionEnd" | "cellAreaArrowsStart" | "cellAreaArrowsEnd" | "activeCellChangeStart" | "activeCellChangeEnd")[], "toggleRowExpand" | "toggleTreeExpand" | "copy" | "scroll" | "formChange" | "settingClick" | "formClick" | "cut" | "paste" | "keydown" | "keydownStart" | "keydownEnd" | "currentChange" | "radioChange" | "checkboxChange" | "checkboxAll" | "checkboxRangeStart" | "checkboxRangeChange" | "checkboxRangeEnd" | "cellClick" | "cellDblclick" | "cellMenu" | "cellMouseenter" | "cellMouseleave" | "headerCellClick" | "headerCellDblclick" | "headerCellMenu" | "footerCellClick" | "footerCellDblclick" | "footerCellMenu" | "sortChange" | "filterChange" | "filterVisible" | "resizableChange" | "menuClick" | "editClosed" | "editActived" | "editDisabled" | "validError" | "custom" | "openFnr" | "fnrChange" | "fnrFind" | "fnrFindAll" | "fnrReplace" | "fnrReplaceAll" | "cellAreaCopy" | "cellAreaCut" | "cellAreaPaste" | "cellAreaMerge" | "clearCellAreaMerge" | "headerCellAreaSelection" | "cellAreaSelectionStart" | "cellAreaSelectionDrag" | "cellAreaSelectionEnd" | "cellAreaExtensionStart" | "cellAreaExtensionDrag" | "cellAreaExtensionEnd" | "cellAreaArrowsStart" | "cellAreaArrowsEnd" | "activeCellChangeStart" | "activeCellChangeEnd", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
4478
4481
|
tableConfig: {
|
|
4479
4482
|
type: PropType<IhoTableConfig>;
|
|
4480
4483
|
default: () => {};
|
|
@@ -4552,6 +4555,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
4552
4555
|
onActiveCellChangeStart?: ((...args: any[]) => any) | undefined;
|
|
4553
4556
|
onActiveCellChangeEnd?: ((...args: any[]) => any) | undefined;
|
|
4554
4557
|
onSettingClick?: ((...args: any[]) => any) | undefined;
|
|
4558
|
+
onFormClick?: ((...args: any[]) => any) | undefined;
|
|
4555
4559
|
}, {
|
|
4556
4560
|
fieldList: LowCodeTableFieldItem[];
|
|
4557
4561
|
tableConfig: IhoTableConfig;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent, resolveComponent, createVNode } from 'vue';
|
|
2
|
-
import { widthAppend, arrayed } from '../../../../shared/utils/index.js';
|
|
2
|
+
import { widthAppend, arrayed, vIf } from '../../../../shared/utils/index.js';
|
|
3
3
|
import { isEmpty, omit, isObject, isString, isFunction } from 'lodash-es';
|
|
4
4
|
import Annotation from '../../../annotation-edit/index.js';
|
|
5
5
|
import { NEllipsis } from 'naive-ui';
|
|
@@ -30,19 +30,22 @@ const ColumnComponent = defineComponent({
|
|
|
30
30
|
}
|
|
31
31
|
}, {
|
|
32
32
|
default: () => props.field.title
|
|
33
|
-
}))], hasAnnotation
|
|
33
|
+
}))], vIf(hasAnnotation, createVNode(Annotation, {
|
|
34
34
|
"modelValue": props.annotation[props.field.field],
|
|
35
35
|
"onUpdate:modelValue": ($event) => props.annotation[props.field.field] = $event
|
|
36
|
-
}, null)
|
|
36
|
+
}, null))]);
|
|
37
37
|
}
|
|
38
38
|
function columnSlot({
|
|
39
|
-
slots
|
|
39
|
+
slots,
|
|
40
|
+
annotation
|
|
40
41
|
}) {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
42
|
+
const result = {
|
|
43
|
+
...slots
|
|
44
|
+
};
|
|
45
|
+
if (annotation !== false) {
|
|
46
|
+
result.header = (payload) => renderHeader(payload, slots == null ? void 0 : slots.header);
|
|
47
|
+
}
|
|
48
|
+
return result;
|
|
46
49
|
}
|
|
47
50
|
function renderColumn(field) {
|
|
48
51
|
return createVNode(VxeColumn, omit(field, ["slots"]), columnSlot(field));
|
|
@@ -56,7 +56,7 @@ export declare enum IHO_TABLE_STRING_STATUS {
|
|
|
56
56
|
NEGATIVE = "0",
|
|
57
57
|
POSITIVE = "1"
|
|
58
58
|
}
|
|
59
|
-
export declare const IhoTableEventNameTuple: readonly ["formChange", "settingClick", ...("toggleRowExpand" | "toggleTreeExpand" | "copy" | "scroll" | "cut" | "paste" | "keydown" | "keydownStart" | "keydownEnd" | "currentChange" | "radioChange" | "checkboxChange" | "checkboxAll" | "checkboxRangeStart" | "checkboxRangeChange" | "checkboxRangeEnd" | "cellClick" | "cellDblclick" | "cellMenu" | "cellMouseenter" | "cellMouseleave" | "headerCellClick" | "headerCellDblclick" | "headerCellMenu" | "footerCellClick" | "footerCellDblclick" | "footerCellMenu" | "sortChange" | "filterChange" | "filterVisible" | "resizableChange" | "menuClick" | "editClosed" | "editActived" | "editDisabled" | "validError" | "custom" | "openFnr" | "fnrChange" | "fnrFind" | "fnrFindAll" | "fnrReplace" | "fnrReplaceAll" | "cellAreaCopy" | "cellAreaCut" | "cellAreaPaste" | "cellAreaMerge" | "clearCellAreaMerge" | "headerCellAreaSelection" | "cellAreaSelectionStart" | "cellAreaSelectionDrag" | "cellAreaSelectionEnd" | "cellAreaExtensionStart" | "cellAreaExtensionDrag" | "cellAreaExtensionEnd" | "cellAreaArrowsStart" | "cellAreaArrowsEnd" | "activeCellChangeStart" | "activeCellChangeEnd")[]];
|
|
59
|
+
export declare const IhoTableEventNameTuple: readonly ["formChange", "settingClick", "formClick", ...("toggleRowExpand" | "toggleTreeExpand" | "copy" | "scroll" | "cut" | "paste" | "keydown" | "keydownStart" | "keydownEnd" | "currentChange" | "radioChange" | "checkboxChange" | "checkboxAll" | "checkboxRangeStart" | "checkboxRangeChange" | "checkboxRangeEnd" | "cellClick" | "cellDblclick" | "cellMenu" | "cellMouseenter" | "cellMouseleave" | "headerCellClick" | "headerCellDblclick" | "headerCellMenu" | "footerCellClick" | "footerCellDblclick" | "footerCellMenu" | "sortChange" | "filterChange" | "filterVisible" | "resizableChange" | "menuClick" | "editClosed" | "editActived" | "editDisabled" | "validError" | "custom" | "openFnr" | "fnrChange" | "fnrFind" | "fnrFindAll" | "fnrReplace" | "fnrReplaceAll" | "cellAreaCopy" | "cellAreaCut" | "cellAreaPaste" | "cellAreaMerge" | "clearCellAreaMerge" | "headerCellAreaSelection" | "cellAreaSelectionStart" | "cellAreaSelectionDrag" | "cellAreaSelectionEnd" | "cellAreaExtensionStart" | "cellAreaExtensionDrag" | "cellAreaExtensionEnd" | "cellAreaArrowsStart" | "cellAreaArrowsEnd" | "activeCellChangeStart" | "activeCellChangeEnd")[]];
|
|
60
60
|
export declare const InjectionIhoTableConfig: InjectionKey<Ref<IhoTableConfig>>;
|
|
61
61
|
export declare const InjectionIhoTableFieldList: InjectionKey<Ref<IhoTableFieldItem[]>>;
|
|
62
62
|
export declare const InjectionIhoTableEmits: InjectionKey<(<T extends typeof IhoTableEventNameTuple[number]>(event: T, ...args: IhoTableEmitPayload<T>) => void)>;
|
|
@@ -130,6 +130,7 @@ var IHO_TABLE_STRING_STATUS = /* @__PURE__ */ ((IHO_TABLE_STRING_STATUS2) => {
|
|
|
130
130
|
const IhoTableEventNameTuple = [
|
|
131
131
|
"formChange",
|
|
132
132
|
"settingClick",
|
|
133
|
+
"formClick",
|
|
133
134
|
...VxeEventListenerNameList.map(getEventName)
|
|
134
135
|
];
|
|
135
136
|
const InjectionIhoTableConfig = Symbol("injectionIhoTableConfig");
|
|
@@ -5,7 +5,9 @@ declare class ConfigHooks extends AbstractConfigHooks {
|
|
|
5
5
|
readonly config: SyncWaterfallHook<IhoTableConfig, import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
6
6
|
readonly rowConfig: SyncWaterfallHook<[undefined, IhoTableConfig] | [import("vxe-table").VxeTablePropTypes.RowConfig, IhoTableConfig], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
7
7
|
readonly editConfig: SyncWaterfallHook<[undefined, IhoTableConfig] | [import("vxe-table").VxeTablePropTypes.EditConfig, IhoTableConfig], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
8
|
-
readonly columnConfig: SyncWaterfallHook<[undefined, IhoTableConfig] | [import("vxe-table").VxeTablePropTypes.ColumnConfig
|
|
8
|
+
readonly columnConfig: SyncWaterfallHook<[undefined, IhoTableConfig] | [import("vxe-table").VxeTablePropTypes.ColumnConfig & {
|
|
9
|
+
seqSlotFn: string | ((params: import("vxe-table").VxeColumnPropTypes.DefaultSlotParams) => import("vxe-table").SlotVNodeType | import("vxe-table").SlotVNodeType[]) | null | undefined;
|
|
10
|
+
}, IhoTableConfig], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
9
11
|
readonly resizableConfig: SyncWaterfallHook<[undefined, IhoTableConfig] | [import("vxe-table").VxeTablePropTypes.ResizableConfig, IhoTableConfig], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
10
12
|
readonly seqConfig: SyncWaterfallHook<[undefined, IhoTableConfig] | [import("vxe-table").VxeTablePropTypes.SeqConfig, IhoTableConfig], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
11
13
|
readonly sortConfig: SyncWaterfallHook<[undefined, IhoTableConfig] | [import("vxe-table").VxeTablePropTypes.SortConfig, IhoTableConfig], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
|
|
@@ -184,7 +184,7 @@ export declare function useEventHooks(): {
|
|
|
184
184
|
create: () => EventHooks;
|
|
185
185
|
};
|
|
186
186
|
export declare class IhoTableEventListener {
|
|
187
|
-
eventMap: Map<"toggleRowExpand" | "toggleTreeExpand" | "copy" | "scroll" | "formChange" | "settingClick" | "cut" | "paste" | "keydown" | "keydownStart" | "keydownEnd" | "currentChange" | "radioChange" | "checkboxChange" | "checkboxAll" | "checkboxRangeStart" | "checkboxRangeChange" | "checkboxRangeEnd" | "cellClick" | "cellDblclick" | "cellMenu" | "cellMouseenter" | "cellMouseleave" | "headerCellClick" | "headerCellDblclick" | "headerCellMenu" | "footerCellClick" | "footerCellDblclick" | "footerCellMenu" | "sortChange" | "filterChange" | "filterVisible" | "resizableChange" | "menuClick" | "editClosed" | "editActived" | "editDisabled" | "validError" | "custom" | "openFnr" | "fnrChange" | "fnrFind" | "fnrFindAll" | "fnrReplace" | "fnrReplaceAll" | "cellAreaCopy" | "cellAreaCut" | "cellAreaPaste" | "cellAreaMerge" | "clearCellAreaMerge" | "headerCellAreaSelection" | "cellAreaSelectionStart" | "cellAreaSelectionDrag" | "cellAreaSelectionEnd" | "cellAreaExtensionStart" | "cellAreaExtensionDrag" | "cellAreaExtensionEnd" | "cellAreaArrowsStart" | "cellAreaArrowsEnd" | "activeCellChangeStart" | "activeCellChangeEnd", Set<Func<any[], any>>>;
|
|
187
|
+
eventMap: Map<"toggleRowExpand" | "toggleTreeExpand" | "copy" | "scroll" | "formChange" | "settingClick" | "formClick" | "cut" | "paste" | "keydown" | "keydownStart" | "keydownEnd" | "currentChange" | "radioChange" | "checkboxChange" | "checkboxAll" | "checkboxRangeStart" | "checkboxRangeChange" | "checkboxRangeEnd" | "cellClick" | "cellDblclick" | "cellMenu" | "cellMouseenter" | "cellMouseleave" | "headerCellClick" | "headerCellDblclick" | "headerCellMenu" | "footerCellClick" | "footerCellDblclick" | "footerCellMenu" | "sortChange" | "filterChange" | "filterVisible" | "resizableChange" | "menuClick" | "editClosed" | "editActived" | "editDisabled" | "validError" | "custom" | "openFnr" | "fnrChange" | "fnrFind" | "fnrFindAll" | "fnrReplace" | "fnrReplaceAll" | "cellAreaCopy" | "cellAreaCut" | "cellAreaPaste" | "cellAreaMerge" | "clearCellAreaMerge" | "headerCellAreaSelection" | "cellAreaSelectionStart" | "cellAreaSelectionDrag" | "cellAreaSelectionEnd" | "cellAreaExtensionStart" | "cellAreaExtensionDrag" | "cellAreaExtensionEnd" | "cellAreaArrowsStart" | "cellAreaArrowsEnd" | "activeCellChangeStart" | "activeCellChangeEnd", Set<Func<any[], any>>>;
|
|
188
188
|
addEventListener<T extends IhoTableEventNameUnion>(key: T, handler: (...payload: IhoTableEmitPayload<T>) => void): void;
|
|
189
189
|
trigger<T extends IhoTableEventNameUnion>(key: T, payload: IhoTableEmitPayload<T>): void;
|
|
190
190
|
}
|
|
File without changes
|
|
File without changes
|
|
@@ -2,7 +2,7 @@ export declare function useTableContext(): {
|
|
|
2
2
|
configRef: import("vue").Ref<import("../types").IhoTableConfig>;
|
|
3
3
|
fieldListRef: import("vue").Ref<import("../types").IhoTableFieldItem[]>;
|
|
4
4
|
tableHandler: import("../types").IhoTableHandler;
|
|
5
|
-
tableEmit: <T extends "toggleRowExpand" | "toggleTreeExpand" | "copy" | "scroll" | "formChange" | "settingClick" | "cut" | "paste" | "keydown" | "keydownStart" | "keydownEnd" | "currentChange" | "radioChange" | "checkboxChange" | "checkboxAll" | "checkboxRangeStart" | "checkboxRangeChange" | "checkboxRangeEnd" | "cellClick" | "cellDblclick" | "cellMenu" | "cellMouseenter" | "cellMouseleave" | "headerCellClick" | "headerCellDblclick" | "headerCellMenu" | "footerCellClick" | "footerCellDblclick" | "footerCellMenu" | "sortChange" | "filterChange" | "filterVisible" | "resizableChange" | "menuClick" | "editClosed" | "editActived" | "editDisabled" | "validError" | "custom" | "openFnr" | "fnrChange" | "fnrFind" | "fnrFindAll" | "fnrReplace" | "fnrReplaceAll" | "cellAreaCopy" | "cellAreaCut" | "cellAreaPaste" | "cellAreaMerge" | "clearCellAreaMerge" | "headerCellAreaSelection" | "cellAreaSelectionStart" | "cellAreaSelectionDrag" | "cellAreaSelectionEnd" | "cellAreaExtensionStart" | "cellAreaExtensionDrag" | "cellAreaExtensionEnd" | "cellAreaArrowsStart" | "cellAreaArrowsEnd" | "activeCellChangeStart" | "activeCellChangeEnd">(event: T, ...args: import("../types").IhoTableEmitPayload<T>) => void;
|
|
5
|
+
tableEmit: <T extends "toggleRowExpand" | "toggleTreeExpand" | "copy" | "scroll" | "formChange" | "settingClick" | "formClick" | "cut" | "paste" | "keydown" | "keydownStart" | "keydownEnd" | "currentChange" | "radioChange" | "checkboxChange" | "checkboxAll" | "checkboxRangeStart" | "checkboxRangeChange" | "checkboxRangeEnd" | "cellClick" | "cellDblclick" | "cellMenu" | "cellMouseenter" | "cellMouseleave" | "headerCellClick" | "headerCellDblclick" | "headerCellMenu" | "footerCellClick" | "footerCellDblclick" | "footerCellMenu" | "sortChange" | "filterChange" | "filterVisible" | "resizableChange" | "menuClick" | "editClosed" | "editActived" | "editDisabled" | "validError" | "custom" | "openFnr" | "fnrChange" | "fnrFind" | "fnrFindAll" | "fnrReplace" | "fnrReplaceAll" | "cellAreaCopy" | "cellAreaCut" | "cellAreaPaste" | "cellAreaMerge" | "clearCellAreaMerge" | "headerCellAreaSelection" | "cellAreaSelectionStart" | "cellAreaSelectionDrag" | "cellAreaSelectionEnd" | "cellAreaExtensionStart" | "cellAreaExtensionDrag" | "cellAreaExtensionEnd" | "cellAreaArrowsStart" | "cellAreaArrowsEnd" | "activeCellChangeStart" | "activeCellChangeEnd">(event: T, ...args: import("../types").IhoTableEmitPayload<T>) => void;
|
|
6
6
|
eventListener: import("./tapHooks/useEventHooks").IhoTableEventListener;
|
|
7
7
|
$table: import("vue").Ref<import("../../../../shared/types").UndefinedAble<import("vxe-table").VxeTableInstance>>;
|
|
8
8
|
uuid: string;
|
|
@@ -17,6 +17,7 @@ function defaultConfigPlugin() {
|
|
|
17
17
|
columnConfig: { resizable: true },
|
|
18
18
|
rowConfig: { height: 48, isHover: true, isCurrent: true, keyField: "theUniqueKey" },
|
|
19
19
|
mouseConfig: { selected: true },
|
|
20
|
+
showOverflow: "tooltip",
|
|
20
21
|
editConfig: {
|
|
21
22
|
trigger: "click",
|
|
22
23
|
mode: "cell",
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import { VxeColumnPropTypes } from 'vxe-table';
|
|
3
|
+
import { FilterState } from './types';
|
|
4
|
+
declare const _default: import("vue").DefineComponent<{
|
|
5
|
+
payload: {
|
|
6
|
+
type: PropType<VxeColumnPropTypes.HeaderSlotParams>;
|
|
7
|
+
required: true;
|
|
8
|
+
};
|
|
9
|
+
filterState: {
|
|
10
|
+
type: PropType<FilterState>;
|
|
11
|
+
required: true;
|
|
12
|
+
};
|
|
13
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
14
|
+
payload: {
|
|
15
|
+
type: PropType<VxeColumnPropTypes.HeaderSlotParams>;
|
|
16
|
+
required: true;
|
|
17
|
+
};
|
|
18
|
+
filterState: {
|
|
19
|
+
type: PropType<FilterState>;
|
|
20
|
+
required: true;
|
|
21
|
+
};
|
|
22
|
+
}>>, {}>;
|
|
23
|
+
export default _default;
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { defineComponent, inject, computed, ref, toRefs, createVNode, unref } from 'vue';
|
|
2
|
+
import { FilterOutline } from '@vicons/ionicons5';
|
|
3
|
+
import { useVirtualList } from '@vueuse/core';
|
|
4
|
+
import { NPopover, NIcon, NCheckboxGroup, NCheckbox, NInput } from 'naive-ui';
|
|
5
|
+
import { InjectionIhoTableUUID } from '../../constants/index.js';
|
|
6
|
+
import { IHO_TABLE_FILTER_STATUS } from './types.js';
|
|
7
|
+
|
|
8
|
+
var FilterComponent = defineComponent({
|
|
9
|
+
name: "IhoTableFilter",
|
|
10
|
+
props: {
|
|
11
|
+
payload: {
|
|
12
|
+
type: Object,
|
|
13
|
+
required: true
|
|
14
|
+
},
|
|
15
|
+
filterState: {
|
|
16
|
+
type: Object,
|
|
17
|
+
required: true
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
setup(props, {
|
|
21
|
+
slots
|
|
22
|
+
}) {
|
|
23
|
+
const uuid = inject(InjectionIhoTableUUID);
|
|
24
|
+
const columnRef = computed(() => props.payload.column);
|
|
25
|
+
const filterVisible = ref(false);
|
|
26
|
+
const {
|
|
27
|
+
options,
|
|
28
|
+
checked,
|
|
29
|
+
checkAll,
|
|
30
|
+
searchFilterText,
|
|
31
|
+
sortStatus
|
|
32
|
+
} = toRefs(props.filterState);
|
|
33
|
+
const {
|
|
34
|
+
list,
|
|
35
|
+
containerProps,
|
|
36
|
+
wrapperProps
|
|
37
|
+
} = useVirtualList(options, {
|
|
38
|
+
itemHeight: 32,
|
|
39
|
+
overscan: 5
|
|
40
|
+
});
|
|
41
|
+
function renderTrigger() {
|
|
42
|
+
return createVNode(NIcon, {
|
|
43
|
+
"component": FilterOutline,
|
|
44
|
+
"onClick": toggleFilter
|
|
45
|
+
}, null);
|
|
46
|
+
function toggleFilter() {
|
|
47
|
+
filterVisible.value = !filterVisible.value;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
function renderFilter() {
|
|
51
|
+
return createVNode("section", {
|
|
52
|
+
"class": "iho-table__filterWrapper"
|
|
53
|
+
}, [renderFilterButton(sortStatus, IHO_TABLE_FILTER_STATUS.ASCENDING, "\u5347\u5E8F A to Z"), renderFilterButton(sortStatus, IHO_TABLE_FILTER_STATUS.DESCENDING, "\u964D\u5E8F Z to A"), renderSearcher(searchFilterText), renderOptions()]);
|
|
54
|
+
function renderOptions() {
|
|
55
|
+
return createVNode(NCheckboxGroup, null, {
|
|
56
|
+
default() {
|
|
57
|
+
return createVNode("section", {
|
|
58
|
+
"ref": containerProps.ref,
|
|
59
|
+
"style": containerProps.style,
|
|
60
|
+
"onScroll": containerProps.onScroll
|
|
61
|
+
}, [createVNode("section", {
|
|
62
|
+
"style": wrapperProps.value.style
|
|
63
|
+
}, [list.value.map((option) => {
|
|
64
|
+
return createVNode("div", null, [createVNode(NCheckbox, {
|
|
65
|
+
"value": option.data.value,
|
|
66
|
+
"label": option.data.key
|
|
67
|
+
}, null)]);
|
|
68
|
+
})])]);
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
function renderSearcher(searchFilterText2) {
|
|
73
|
+
return createVNode(NInput, {
|
|
74
|
+
"value": searchFilterText2.value,
|
|
75
|
+
"onUpdate:value": ($event) => searchFilterText2.value = $event
|
|
76
|
+
}, null);
|
|
77
|
+
}
|
|
78
|
+
function renderFilterButton(sortStatus2, status, text) {
|
|
79
|
+
return createVNode("div", {
|
|
80
|
+
"class": ["iho-table__filterButton", {
|
|
81
|
+
"iho-table__filterButton--active": unref(sortStatus2) === status
|
|
82
|
+
}],
|
|
83
|
+
"onClick": () => sortStatus2.value = status
|
|
84
|
+
}, [text]);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
return () => {
|
|
88
|
+
return createVNode("section", null, [unref(columnRef).title, createVNode(NPopover, {
|
|
89
|
+
"to": `#${uuid}`,
|
|
90
|
+
"show": filterVisible.value
|
|
91
|
+
}, {
|
|
92
|
+
trigger: renderTrigger,
|
|
93
|
+
default: renderFilter
|
|
94
|
+
})]);
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
export { FilterComponent as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function filterPlugin(): import("../../../../../../es/components/iho-table").TablePlugin;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { isObject, isArray } from 'lodash-es';
|
|
2
|
+
import { reactive, h, onBeforeUnmount } from 'vue';
|
|
3
|
+
import '../../../index.js';
|
|
4
|
+
import { IHO_TABLE_NUMBER_STATUS, IHO_TABLE_STRING_STATUS } from '../../constants/index.js';
|
|
5
|
+
import { IHO_TABLE_FILTER_STATUS } from './types.js';
|
|
6
|
+
import { IhoTableUtils } from '../../utils/index.js';
|
|
7
|
+
import FilterComponent from './filter.js';
|
|
8
|
+
import { defineTablePlugin } from '../../hooks/useTablePlugin.js';
|
|
9
|
+
|
|
10
|
+
function filterPlugin() {
|
|
11
|
+
const pluginName = "filterPlugin";
|
|
12
|
+
const uuidTargetMap = reactive(/* @__PURE__ */ new Map());
|
|
13
|
+
function initFilterState(uuid, fieldName) {
|
|
14
|
+
const stateMap = uuidTargetMap.set(uuid, uuidTargetMap.get(uuid) || /* @__PURE__ */ new Map()).get(uuid);
|
|
15
|
+
return stateMap.set(
|
|
16
|
+
fieldName,
|
|
17
|
+
stateMap.get(fieldName) || {
|
|
18
|
+
options: [],
|
|
19
|
+
checked: [],
|
|
20
|
+
indeterminate: false,
|
|
21
|
+
checkAll: false,
|
|
22
|
+
searchFilterText: "",
|
|
23
|
+
sortStatus: IHO_TABLE_FILTER_STATUS.DEFAULT
|
|
24
|
+
}
|
|
25
|
+
).get(fieldName);
|
|
26
|
+
}
|
|
27
|
+
function clearFilterState(uuid) {
|
|
28
|
+
uuidTargetMap.delete(uuid);
|
|
29
|
+
}
|
|
30
|
+
return defineTablePlugin({
|
|
31
|
+
name: pluginName,
|
|
32
|
+
apply(hooks) {
|
|
33
|
+
hooks.fieldHooks.fieldList.tap(pluginName, (fieldList, { uuid }) => {
|
|
34
|
+
fieldList.forEach((fieldItem) => {
|
|
35
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
36
|
+
const lowCodeField = (_a = fieldItem.editRender) == null ? void 0 : _a.props;
|
|
37
|
+
if (!isObject(lowCodeField))
|
|
38
|
+
return;
|
|
39
|
+
try {
|
|
40
|
+
const fieldSetting = JSON.parse(lowCodeField.fieldSetting || "");
|
|
41
|
+
if (!isFieldSetting(fieldSetting) || !showFilter(fieldSetting))
|
|
42
|
+
return;
|
|
43
|
+
let options = (_d = (_c = (_b = fieldSetting.mapping) == null ? void 0 : _b.mappingField) == null ? void 0 : _c.map((item) => item.value[0])) != null ? _d : [];
|
|
44
|
+
if (isCompatibleColumn(lowCodeField)) {
|
|
45
|
+
options = (_f = (_e = lowCodeField.options) == null ? void 0 : _e.map((option) => ({ ...option, key: option.label }))) != null ? _f : [];
|
|
46
|
+
}
|
|
47
|
+
const filterState = initFilterState(uuid, fieldItem.field);
|
|
48
|
+
filterState.options = options;
|
|
49
|
+
const oldHeader = (_g = fieldItem.slots) == null ? void 0 : _g.header;
|
|
50
|
+
fieldItem.slots = {
|
|
51
|
+
...fieldItem.slots,
|
|
52
|
+
header(payload) {
|
|
53
|
+
return h(FilterComponent, { payload, filterState }, { header: oldHeader });
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
} catch (e) {
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
return fieldList;
|
|
60
|
+
});
|
|
61
|
+
hooks.setupHooks.setup.tap(pluginName, (config) => {
|
|
62
|
+
onBeforeUnmount(() => config.value.uuid && clearFilterState(config.value.uuid));
|
|
63
|
+
});
|
|
64
|
+
function isCompatibleColumn(field) {
|
|
65
|
+
const filterTypes = ["SEARCH", "SELECT", "RADIO", "CHECKBOX"];
|
|
66
|
+
const notParticipatingSearch = field.notParticipatingSearch || "";
|
|
67
|
+
return notParticipatingSearch !== IHO_TABLE_NUMBER_STATUS.POSITIVE && filterTypes.includes(IhoTableUtils.getCellType(field)) && isArray(field.options) && field.options.length;
|
|
68
|
+
}
|
|
69
|
+
function isFieldSetting(value) {
|
|
70
|
+
return isObject(value);
|
|
71
|
+
}
|
|
72
|
+
function showFilter(fieldSetting) {
|
|
73
|
+
var _a;
|
|
74
|
+
return fieldSetting.notParticipatingSearch !== IHO_TABLE_STRING_STATUS.POSITIVE && ((_a = fieldSetting.mapping) == null ? void 0 : _a.type) === "manual";
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export { filterPlugin };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { AnyObject } from '../../../../../../es/shared/types';
|
|
2
|
+
export declare enum IHO_TABLE_FILTER_STATUS {
|
|
3
|
+
DEFAULT = 0,
|
|
4
|
+
ASCENDING = 1,
|
|
5
|
+
DESCENDING = 2
|
|
6
|
+
}
|
|
7
|
+
export declare type FilterState = {
|
|
8
|
+
options: AnyObject[];
|
|
9
|
+
checked: string[];
|
|
10
|
+
indeterminate: boolean;
|
|
11
|
+
checkAll: boolean;
|
|
12
|
+
searchFilterText: string;
|
|
13
|
+
sortStatus: IHO_TABLE_FILTER_STATUS;
|
|
14
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
var IHO_TABLE_FILTER_STATUS = /* @__PURE__ */ ((IHO_TABLE_FILTER_STATUS2) => {
|
|
2
|
+
IHO_TABLE_FILTER_STATUS2[IHO_TABLE_FILTER_STATUS2["DEFAULT"] = 0] = "DEFAULT";
|
|
3
|
+
IHO_TABLE_FILTER_STATUS2[IHO_TABLE_FILTER_STATUS2["ASCENDING"] = 1] = "ASCENDING";
|
|
4
|
+
IHO_TABLE_FILTER_STATUS2[IHO_TABLE_FILTER_STATUS2["DESCENDING"] = 2] = "DESCENDING";
|
|
5
|
+
return IHO_TABLE_FILTER_STATUS2;
|
|
6
|
+
})(IHO_TABLE_FILTER_STATUS || {});
|
|
7
|
+
|
|
8
|
+
export { IHO_TABLE_FILTER_STATUS };
|