cnhis-design-vue 3.1.30-beta.7 → 3.1.31-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/components/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/form-render/src/hooks/useBusinessBinding.d.ts +1 -1
- package/es/components/form-render/src/hooks/useBusinessBinding.js +16 -9
- package/es/components/form-render/src/utils/business.js +1 -1
- package/es/components/iho-table/index.d.ts +45 -39
- package/es/components/iho-table/index.js +1 -0
- package/es/components/iho-table/src/IhoTable.js +9 -4
- package/es/components/iho-table/src/IhoTable.vue.d.ts +45 -39
- package/es/components/iho-table/src/components/IhoTableColumn.js +8 -5
- package/es/components/iho-table/src/constants/index.d.ts +1 -1
- package/es/components/iho-table/src/constants/index.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/iho-table/src/hooks/useTableContext.d.ts +1 -1
- package/es/components/iho-table/src/plugins/filterPlugin/filter.js +189 -0
- package/es/components/iho-table/src/plugins/filterPlugin/filter.vue.d.ts +126 -0
- package/es/components/iho-table/src/plugins/filterPlugin/index.d.ts +1 -0
- package/es/components/iho-table/src/plugins/filterPlugin/index.js +74 -0
- package/es/components/iho-table/src/plugins/filterPlugin/types.d.ts +11 -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 -3
- 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 +17 -5
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/separateUtils.d.ts +2 -4
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/separateUtils.js +2 -17
- 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 +36 -10
- package/es/components/iho-table/src/utils/index.d.ts +12 -1
- package/es/components/iho-table/src/utils/index.js +36 -2
- package/es/components/iho-table/style/index.css +1 -1
- package/es/components/index.css +1 -1
- package/es/components/index.js +1 -0
- package/es/shared/types/index.d.ts +2 -2
- package/package.json +2 -2
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { CSSProperties, PropType, ref } from 'vue';
|
|
2
|
+
import { VxeColumnPropTypes } from 'vxe-table';
|
|
3
|
+
import { FilterState, IHO_TABLE_FILTER_STATUS } from '../../../../../../es/components/iho-table/src/plugins/filterPlugin/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
|
+
}, {
|
|
14
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
15
|
+
payload: {
|
|
16
|
+
type: PropType<VxeColumnPropTypes.HeaderSlotParams>;
|
|
17
|
+
required: true;
|
|
18
|
+
};
|
|
19
|
+
filterState: {
|
|
20
|
+
type: PropType<FilterState>;
|
|
21
|
+
required: true;
|
|
22
|
+
};
|
|
23
|
+
}>> & {}>>;
|
|
24
|
+
uuid: string;
|
|
25
|
+
globEmit: <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;
|
|
26
|
+
options: import("vue").Ref<import("../../../../../shared/types").AnyObject[]>;
|
|
27
|
+
checked: import("vue").Ref<string[]>;
|
|
28
|
+
sortStatus: import("vue").Ref<IHO_TABLE_FILTER_STATUS>;
|
|
29
|
+
filterVisible: import("vue").Ref<boolean>;
|
|
30
|
+
searchFilterText: import("vue").Ref<string>;
|
|
31
|
+
close: () => void;
|
|
32
|
+
OPTION_ITEM_HEIGHT: number;
|
|
33
|
+
VIEW_CAPACITY: number;
|
|
34
|
+
checkedCache: string[];
|
|
35
|
+
list: import("vue").Ref<import("@vueuse/core").UseVirtualListItem<import("../../../../../shared/types").AnyObject>[]>;
|
|
36
|
+
containerProps: {
|
|
37
|
+
ref: import("vue").Ref<any>;
|
|
38
|
+
onScroll: () => void;
|
|
39
|
+
style: Partial<CSSStyleDeclaration>;
|
|
40
|
+
};
|
|
41
|
+
wrapperProps: import("vue").ComputedRef<{
|
|
42
|
+
style: {
|
|
43
|
+
width: string;
|
|
44
|
+
height: string;
|
|
45
|
+
marginTop: string;
|
|
46
|
+
};
|
|
47
|
+
}>;
|
|
48
|
+
containerStyleWithHeight: import("vue").ComputedRef<CSSProperties>;
|
|
49
|
+
confirmSort: () => void;
|
|
50
|
+
cancelSort: () => void;
|
|
51
|
+
sortStatusList: {
|
|
52
|
+
status: IHO_TABLE_FILTER_STATUS;
|
|
53
|
+
text: string;
|
|
54
|
+
}[];
|
|
55
|
+
setSortStatus: (value: IHO_TABLE_FILTER_STATUS) => void;
|
|
56
|
+
toggleFilter: () => void;
|
|
57
|
+
FilterOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
58
|
+
ref: typeof ref;
|
|
59
|
+
NButton: any;
|
|
60
|
+
NButtonGroup: any;
|
|
61
|
+
NCheckbox: any;
|
|
62
|
+
NCheckboxGroup: import("vue").DefineComponent<{
|
|
63
|
+
readonly min: NumberConstructor;
|
|
64
|
+
readonly max: NumberConstructor;
|
|
65
|
+
readonly size: PropType<"small" | "medium" | "large">;
|
|
66
|
+
readonly value: PropType<(string | number)[] | null>;
|
|
67
|
+
readonly defaultValue: {
|
|
68
|
+
readonly type: PropType<(string | number)[] | null>;
|
|
69
|
+
readonly default: null;
|
|
70
|
+
};
|
|
71
|
+
readonly disabled: {
|
|
72
|
+
readonly type: PropType<boolean | undefined>;
|
|
73
|
+
readonly default: undefined;
|
|
74
|
+
};
|
|
75
|
+
readonly 'onUpdate:value': PropType<import("naive-ui/es/_utils").MaybeArray<(value: (string | number)[], meta: {
|
|
76
|
+
actionType: "check" | "uncheck";
|
|
77
|
+
value: string | number;
|
|
78
|
+
}) => void>>;
|
|
79
|
+
readonly onUpdateValue: PropType<import("naive-ui/es/_utils").MaybeArray<(value: (string | number)[], meta: {
|
|
80
|
+
actionType: "check" | "uncheck";
|
|
81
|
+
value: string | number;
|
|
82
|
+
}) => void>>;
|
|
83
|
+
readonly onChange: PropType<import("naive-ui/es/_utils").MaybeArray<(value: (string | number)[]) => void> | undefined>;
|
|
84
|
+
}, {
|
|
85
|
+
mergedClsPrefix: import("vue").ComputedRef<string>;
|
|
86
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
87
|
+
readonly min: NumberConstructor;
|
|
88
|
+
readonly max: NumberConstructor;
|
|
89
|
+
readonly size: PropType<"small" | "medium" | "large">;
|
|
90
|
+
readonly value: PropType<(string | number)[] | null>;
|
|
91
|
+
readonly defaultValue: {
|
|
92
|
+
readonly type: PropType<(string | number)[] | null>;
|
|
93
|
+
readonly default: null;
|
|
94
|
+
};
|
|
95
|
+
readonly disabled: {
|
|
96
|
+
readonly type: PropType<boolean | undefined>;
|
|
97
|
+
readonly default: undefined;
|
|
98
|
+
};
|
|
99
|
+
readonly 'onUpdate:value': PropType<import("naive-ui/es/_utils").MaybeArray<(value: (string | number)[], meta: {
|
|
100
|
+
actionType: "check" | "uncheck";
|
|
101
|
+
value: string | number;
|
|
102
|
+
}) => void>>;
|
|
103
|
+
readonly onUpdateValue: PropType<import("naive-ui/es/_utils").MaybeArray<(value: (string | number)[], meta: {
|
|
104
|
+
actionType: "check" | "uncheck";
|
|
105
|
+
value: string | number;
|
|
106
|
+
}) => void>>;
|
|
107
|
+
readonly onChange: PropType<import("naive-ui/es/_utils").MaybeArray<(value: (string | number)[]) => void> | undefined>;
|
|
108
|
+
}>>, {
|
|
109
|
+
readonly disabled: boolean | undefined;
|
|
110
|
+
readonly defaultValue: (string | number)[] | null;
|
|
111
|
+
}>;
|
|
112
|
+
NEllipsis: any;
|
|
113
|
+
NIcon: any;
|
|
114
|
+
NInput: any;
|
|
115
|
+
NPopover: any;
|
|
116
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
117
|
+
payload: {
|
|
118
|
+
type: PropType<VxeColumnPropTypes.HeaderSlotParams>;
|
|
119
|
+
required: true;
|
|
120
|
+
};
|
|
121
|
+
filterState: {
|
|
122
|
+
type: PropType<FilterState>;
|
|
123
|
+
required: true;
|
|
124
|
+
};
|
|
125
|
+
}>>, {}>;
|
|
126
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function filterPlugin(): import("../../../../../../es/components/iho-table").TablePlugin;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { isObject, isArray } from 'lodash-es';
|
|
2
|
+
import { 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 { useUUIDMap, 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 { getItemFromUUID, removeItemFromUUID } = useUUIDMap(() => /* @__PURE__ */ new Map());
|
|
13
|
+
function initFilterState(uuid, fieldName) {
|
|
14
|
+
const stateMap = getItemFromUUID(uuid);
|
|
15
|
+
return stateMap.set(
|
|
16
|
+
fieldName,
|
|
17
|
+
stateMap.get(fieldName) || {
|
|
18
|
+
options: [],
|
|
19
|
+
checked: [],
|
|
20
|
+
sortStatus: IHO_TABLE_FILTER_STATUS.DEFAULT
|
|
21
|
+
}
|
|
22
|
+
).get(fieldName);
|
|
23
|
+
}
|
|
24
|
+
return defineTablePlugin({
|
|
25
|
+
name: pluginName,
|
|
26
|
+
apply(hooks) {
|
|
27
|
+
hooks.fieldHooks.fieldList.tap(pluginName, (fieldList, { uuid }) => {
|
|
28
|
+
fieldList.forEach((fieldItem) => {
|
|
29
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
30
|
+
const lowCodeField = (_a = fieldItem.editRender) == null ? void 0 : _a.props;
|
|
31
|
+
if (!isObject(lowCodeField))
|
|
32
|
+
return;
|
|
33
|
+
try {
|
|
34
|
+
const fieldSetting = JSON.parse(lowCodeField.fieldSetting || "");
|
|
35
|
+
if (!isFieldSetting(fieldSetting) || !showFilter(fieldSetting))
|
|
36
|
+
return;
|
|
37
|
+
let options = (_d = (_c = (_b = fieldSetting.mapping) == null ? void 0 : _b.mappingFiled) == null ? void 0 : _c.map((item) => item.value[0])) != null ? _d : [];
|
|
38
|
+
if (isCompatibleColumn(lowCodeField)) {
|
|
39
|
+
options = (_f = (_e = lowCodeField.options) == null ? void 0 : _e.map((option) => ({ ...option, key: option.label }))) != null ? _f : [];
|
|
40
|
+
}
|
|
41
|
+
const filterState = initFilterState(uuid, fieldItem.field);
|
|
42
|
+
filterState.options = options;
|
|
43
|
+
const oldHeader = (_g = fieldItem.slots) == null ? void 0 : _g.header;
|
|
44
|
+
fieldItem.slots = {
|
|
45
|
+
...fieldItem.slots,
|
|
46
|
+
header(payload) {
|
|
47
|
+
return h(FilterComponent, { payload, filterState }, { header: oldHeader });
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
} catch (e) {
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
return fieldList;
|
|
54
|
+
});
|
|
55
|
+
hooks.setupHooks.setup.tap(pluginName, (config) => {
|
|
56
|
+
onBeforeUnmount(() => config.value.uuid && removeItemFromUUID(config.value.uuid));
|
|
57
|
+
});
|
|
58
|
+
function isCompatibleColumn(field) {
|
|
59
|
+
const filterTypes = ["SEARCH", "SELECT", "RADIO", "CHECKBOX"];
|
|
60
|
+
const notParticipatingSearch = field.notParticipatingSearch || "";
|
|
61
|
+
return notParticipatingSearch !== IHO_TABLE_NUMBER_STATUS.POSITIVE && filterTypes.includes(IhoTableUtils.getCellType(field)) && isArray(field.options) && field.options.length;
|
|
62
|
+
}
|
|
63
|
+
function isFieldSetting(value) {
|
|
64
|
+
return isObject(value);
|
|
65
|
+
}
|
|
66
|
+
function showFilter(fieldSetting) {
|
|
67
|
+
var _a;
|
|
68
|
+
return fieldSetting.notParticipatingSearch !== IHO_TABLE_STRING_STATUS.POSITIVE && ((_a = fieldSetting.mapping) == null ? void 0 : _a.type) === "manual";
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export { filterPlugin };
|
|
@@ -0,0 +1,11 @@
|
|
|
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
|
+
sortStatus: IHO_TABLE_FILTER_STATUS;
|
|
11
|
+
};
|
|
@@ -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 };
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import * as index from './anchorPlugin/index.js';
|
|
2
2
|
import * as index$1 from './defaultConfigPlugin/index.js';
|
|
3
|
-
import * as index$2 from './
|
|
4
|
-
import * as index$3 from './
|
|
3
|
+
import * as index$2 from './filterPlugin/index.js';
|
|
4
|
+
import * as index$3 from './lowCodeFieldAdaptorPlugin/index.js';
|
|
5
|
+
import * as index$4 from './rendererPlugins/editableWidgets/dateRendererPlugin/index.js';
|
|
5
6
|
import * as inputRendererPlugin from './rendererPlugins/editableWidgets/inputRendererPlugin.js';
|
|
6
7
|
import * as numberRendererPlugin from './rendererPlugins/editableWidgets/numberRendererPlugin.js';
|
|
7
|
-
import * as index$
|
|
8
|
-
import * as index$
|
|
8
|
+
import * as index$5 from './rendererPlugins/editableWidgets/selectRendererPlugin/index.js';
|
|
9
|
+
import * as index$6 from './rendererPlugins/editableWidgets/separateRendererPlugin/index.js';
|
|
9
10
|
import * as timeRendererPlugin from './rendererPlugins/editableWidgets/timeRendererPlugin.js';
|
|
10
11
|
import * as checkRendererPlugin from './rendererPlugins/widgets/checkRendererPlugin.js';
|
|
11
12
|
import * as colorRendererPlugin from './rendererPlugins/widgets/colorRendererPlugin.js';
|
|
@@ -13,19 +14,20 @@ import * as defaultRendererPlugin from './rendererPlugins/widgets/defaultRendere
|
|
|
13
14
|
import * as labelRendererPlugin from './rendererPlugins/widgets/labelRendererPlugin.js';
|
|
14
15
|
import * as pictureRendererPlugin from './rendererPlugins/widgets/pictureRendererPlugin.js';
|
|
15
16
|
import * as seqRendererPlugin from './rendererPlugins/widgets/seqRendererPlugin.js';
|
|
16
|
-
import * as index$
|
|
17
|
-
import * as index$
|
|
17
|
+
import * as index$7 from './rowGroupSettingPlugin/index.js';
|
|
18
|
+
import * as index$8 from './virtualTreePlugin/index.js';
|
|
18
19
|
import { separateMetaModule } from '../../../../shared/utils/index.js';
|
|
19
20
|
|
|
20
21
|
const modules = Object.assign({
|
|
21
22
|
"./anchorPlugin/index.tsx": index,
|
|
22
23
|
"./defaultConfigPlugin/index.ts": index$1,
|
|
23
|
-
"./
|
|
24
|
-
"./
|
|
24
|
+
"./filterPlugin/index.ts": index$2,
|
|
25
|
+
"./lowCodeFieldAdaptorPlugin/index.ts": index$3,
|
|
26
|
+
"./rendererPlugins/editableWidgets/dateRendererPlugin/index.tsx": index$4,
|
|
25
27
|
"./rendererPlugins/editableWidgets/inputRendererPlugin.tsx": inputRendererPlugin,
|
|
26
28
|
"./rendererPlugins/editableWidgets/numberRendererPlugin.tsx": numberRendererPlugin,
|
|
27
|
-
"./rendererPlugins/editableWidgets/selectRendererPlugin/index.tsx": index$
|
|
28
|
-
"./rendererPlugins/editableWidgets/separateRendererPlugin/index.tsx": index$
|
|
29
|
+
"./rendererPlugins/editableWidgets/selectRendererPlugin/index.tsx": index$5,
|
|
30
|
+
"./rendererPlugins/editableWidgets/separateRendererPlugin/index.tsx": index$6,
|
|
29
31
|
"./rendererPlugins/editableWidgets/timeRendererPlugin.tsx": timeRendererPlugin,
|
|
30
32
|
"./rendererPlugins/widgets/checkRendererPlugin.tsx": checkRendererPlugin,
|
|
31
33
|
"./rendererPlugins/widgets/colorRendererPlugin.tsx": colorRendererPlugin,
|
|
@@ -33,8 +35,8 @@ const modules = Object.assign({
|
|
|
33
35
|
"./rendererPlugins/widgets/labelRendererPlugin.tsx": labelRendererPlugin,
|
|
34
36
|
"./rendererPlugins/widgets/pictureRendererPlugin.tsx": pictureRendererPlugin,
|
|
35
37
|
"./rendererPlugins/widgets/seqRendererPlugin.tsx": seqRendererPlugin,
|
|
36
|
-
"./rowGroupSettingPlugin/index.ts": index$
|
|
37
|
-
"./virtualTreePlugin/index.ts": index$
|
|
38
|
+
"./rowGroupSettingPlugin/index.ts": index$7,
|
|
39
|
+
"./virtualTreePlugin/index.ts": index$8
|
|
38
40
|
});
|
|
39
41
|
var PluginPresets = separateMetaModule(modules);
|
|
40
42
|
|
|
@@ -2,6 +2,7 @@ import { pick, cloneDeep } from 'lodash-es';
|
|
|
2
2
|
import { toRaw } from 'vue';
|
|
3
3
|
import { HIGHEST_PRIORITY, IHO_TABLE_NUMBER_STATUS, WIDGET_TYPE, IHO_TABLE_STRING_STATUS } from '../../constants/index.js';
|
|
4
4
|
import { defineTablePlugin } from '../../hooks/useTablePlugin.js';
|
|
5
|
+
import { IhoTableUtils } from '../../utils/index.js';
|
|
5
6
|
|
|
6
7
|
function lowCodeFieldAdaptorPlugin() {
|
|
7
8
|
const pluginName = "lowCodeFieldAdaptorPlugin";
|
|
@@ -25,14 +26,14 @@ function lowCodeFieldAdaptorPlugin() {
|
|
|
25
26
|
});
|
|
26
27
|
}
|
|
27
28
|
function settingObjAdaptor(fieldItem, lowCodeField) {
|
|
28
|
-
var _a
|
|
29
|
+
var _a;
|
|
29
30
|
fieldItem.editRender = {
|
|
30
31
|
autofocus: "input",
|
|
31
|
-
name: (
|
|
32
|
+
name: IhoTableUtils.getCellType(lowCodeField),
|
|
32
33
|
props: cloneDeep(toRaw(lowCodeField))
|
|
33
34
|
};
|
|
34
35
|
fieldItem.editRender.enabled = !Reflect.get(WIDGET_TYPE, fieldItem.editRender.name);
|
|
35
|
-
fieldItem.visible = ((
|
|
36
|
+
fieldItem.visible = ((_a = lowCodeField.settingObj) == null ? void 0 : _a.isHide) !== IHO_TABLE_STRING_STATUS.POSITIVE;
|
|
36
37
|
}
|
|
37
38
|
|
|
38
39
|
export { lowCodeFieldAdaptorPlugin };
|
|
@@ -42,7 +42,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
42
42
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
43
43
|
}>>;
|
|
44
44
|
emit: (event: "update:value", ...args: any[]) => void;
|
|
45
|
-
globEmit: <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("../../../../../../../../es/components/iho-table").IhoTableEmitPayload<T>) => void;
|
|
45
|
+
globEmit: <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("../../../../../../../../es/components/iho-table").IhoTableEmitPayload<T>) => void;
|
|
46
46
|
formRef: import("vue").Ref<HTMLElement | null>;
|
|
47
47
|
isShow: import("vue").Ref<boolean>;
|
|
48
48
|
formattedValue: import("vue").Ref<string | undefined>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { createVNode, mergeProps } from 'vue';
|
|
1
|
+
import { createVNode, inject, mergeProps } from 'vue';
|
|
2
2
|
import '../../../../../index.js';
|
|
3
|
-
import { EDITABLE_WIDGET_TYPE } from '../../../../constants/index.js';
|
|
3
|
+
import { EDITABLE_WIDGET_TYPE, InjectionIhoTableEmits } from '../../../../constants/index.js';
|
|
4
4
|
import EditDate from './editDate.js';
|
|
5
5
|
import { defineTablePlugin } from '../../../../hooks/useTablePlugin.js';
|
|
6
6
|
|
|
@@ -25,13 +25,24 @@ function dateRendererPlugin() {
|
|
|
25
25
|
column,
|
|
26
26
|
$rowIndex
|
|
27
27
|
}) {
|
|
28
|
+
const globEmit = inject(InjectionIhoTableEmits);
|
|
29
|
+
const common = {
|
|
30
|
+
value: row[column.field],
|
|
31
|
+
row,
|
|
32
|
+
column,
|
|
33
|
+
index: $rowIndex
|
|
34
|
+
};
|
|
35
|
+
function onClick() {
|
|
36
|
+
globEmit("formClick", common);
|
|
37
|
+
}
|
|
28
38
|
return [createVNode(EditDate, mergeProps({
|
|
29
39
|
"value": row[column.field],
|
|
30
40
|
"onUpdate:value": ($event) => row[column.field] = $event
|
|
31
41
|
}, (props == null ? void 0 : props.componentProps) || {}, {
|
|
32
42
|
"column": column,
|
|
33
43
|
"row": row,
|
|
34
|
-
"index": $rowIndex
|
|
44
|
+
"index": $rowIndex,
|
|
45
|
+
"onClick": onClick
|
|
35
46
|
}), null)];
|
|
36
47
|
}
|
|
37
48
|
});
|
package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/inputRendererPlugin.js
CHANGED
|
@@ -24,18 +24,23 @@ function inputRendererPlugin() {
|
|
|
24
24
|
$rowIndex
|
|
25
25
|
}) {
|
|
26
26
|
const emit = inject(InjectionIhoTableEmits);
|
|
27
|
+
const common = {
|
|
28
|
+
value: row[column.field],
|
|
29
|
+
row,
|
|
30
|
+
column,
|
|
31
|
+
index: $rowIndex
|
|
32
|
+
};
|
|
27
33
|
function onBlur() {
|
|
28
|
-
emit("formChange",
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
index: $rowIndex
|
|
33
|
-
});
|
|
34
|
+
emit("formChange", common);
|
|
35
|
+
}
|
|
36
|
+
function onClick() {
|
|
37
|
+
emit("formClick", common);
|
|
34
38
|
}
|
|
35
39
|
return [createVNode(NInput, mergeProps({
|
|
36
40
|
"value": row[column.field],
|
|
37
41
|
"onUpdate:value": ($event) => row[column.field] = $event,
|
|
38
|
-
"onBlur": onBlur
|
|
42
|
+
"onBlur": onBlur,
|
|
43
|
+
"onClick": onClick
|
|
39
44
|
}, props == null ? void 0 : props.componentProps), null)];
|
|
40
45
|
}
|
|
41
46
|
});
|
package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/numberRendererPlugin.js
CHANGED
|
@@ -32,7 +32,8 @@ function numberRendererPlugin() {
|
|
|
32
32
|
clearable: true,
|
|
33
33
|
placeholder,
|
|
34
34
|
onBlur,
|
|
35
|
-
onUpdateValue
|
|
35
|
+
onUpdateValue,
|
|
36
|
+
onClick
|
|
36
37
|
};
|
|
37
38
|
const common = {
|
|
38
39
|
value: row[column.field],
|
|
@@ -49,6 +50,9 @@ function numberRendererPlugin() {
|
|
|
49
50
|
function onUpdateValue() {
|
|
50
51
|
emit("formChange", common);
|
|
51
52
|
}
|
|
53
|
+
function onClick() {
|
|
54
|
+
emit("formClick", common);
|
|
55
|
+
}
|
|
52
56
|
return [createVNode(NInputNumber, mergeProps({
|
|
53
57
|
"value": row[column.field],
|
|
54
58
|
"onUpdate:value": ($event) => row[column.field] = $event
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { createVNode, mergeProps } from 'vue';
|
|
1
|
+
import { createVNode, inject, mergeProps } from 'vue';
|
|
2
2
|
import '../../../../../index.js';
|
|
3
|
-
import { EDITABLE_WIDGET_TYPE } from '../../../../constants/index.js';
|
|
3
|
+
import { EDITABLE_WIDGET_TYPE, InjectionIhoTableEmits } from '../../../../constants/index.js';
|
|
4
4
|
import EditSelect from './editSelect.js';
|
|
5
5
|
import { getDefaultValue } from './selectUtils.js';
|
|
6
6
|
import { defineTablePlugin } from '../../../../hooks/useTablePlugin.js';
|
|
@@ -26,12 +26,23 @@ function selectRendererPlugin() {
|
|
|
26
26
|
column,
|
|
27
27
|
$rowIndex
|
|
28
28
|
}) {
|
|
29
|
+
const emit = inject(InjectionIhoTableEmits);
|
|
30
|
+
function onClick() {
|
|
31
|
+
const common = {
|
|
32
|
+
value: row[column.field],
|
|
33
|
+
row,
|
|
34
|
+
column,
|
|
35
|
+
index: $rowIndex
|
|
36
|
+
};
|
|
37
|
+
emit("formClick", common);
|
|
38
|
+
}
|
|
29
39
|
return [createVNode(EditSelect, mergeProps((props == null ? void 0 : props.componentProps) || {}, {
|
|
30
40
|
"column": column,
|
|
31
41
|
"row": row,
|
|
32
42
|
"index": $rowIndex,
|
|
33
43
|
"value": row[column.field],
|
|
34
|
-
"onUpdate:value": ($event) => row[column.field] = $event
|
|
44
|
+
"onUpdate:value": ($event) => row[column.field] = $event,
|
|
45
|
+
"onClick": onClick
|
|
35
46
|
}), null)];
|
|
36
47
|
}
|
|
37
48
|
});
|
|
@@ -49,7 +49,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
49
49
|
}>> & {
|
|
50
50
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
51
51
|
}>>;
|
|
52
|
-
globEmit: <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("../../../../../../../../es/components/iho-table").IhoTableEmitPayload<T>) => void;
|
|
52
|
+
globEmit: <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("../../../../../../../../es/components/iho-table").IhoTableEmitPayload<T>) => void;
|
|
53
53
|
tableHandler: import("../../../../../../../../es/components/iho-table").IhoTableHandler;
|
|
54
54
|
popoverRef: import("vue").Ref<any>;
|
|
55
55
|
editContent: import("vue").Ref<any>;
|
|
@@ -2,9 +2,9 @@ import { reactive, inject, createVNode, toRaw, h, onBeforeUnmount } from 'vue';
|
|
|
2
2
|
import { traverse } from '../../../../../../../shared/utils/index.js';
|
|
3
3
|
import { isFunction, isObject } from 'lodash-es';
|
|
4
4
|
import '../../../../../index.js';
|
|
5
|
-
import { EDITABLE_WIDGET_TYPE, InjectionIhoTableUUID } from '../../../../constants/index.js';
|
|
6
|
-
import { getRowHeight } from '../../../../utils/index.js';
|
|
7
|
-
import { isSeparateColumn,
|
|
5
|
+
import { EDITABLE_WIDGET_TYPE, InjectionIhoTableUUID, InjectionIhoTableEmits } from '../../../../constants/index.js';
|
|
6
|
+
import { getRowHeight, getColumnRenderWidth } from '../../../../utils/index.js';
|
|
7
|
+
import { isSeparateColumn, contentSeparate, getColumnInfoMaxLength, generateSeparateRowData } from './separateUtils.js';
|
|
8
8
|
import EditSeparate from './editSeparate.js';
|
|
9
9
|
import { defineTablePlugin } from '../../../../hooks/useTablePlugin.js';
|
|
10
10
|
|
|
@@ -37,10 +37,12 @@ function separateRendererPlugins() {
|
|
|
37
37
|
},
|
|
38
38
|
renderEdit(renderOpts, {
|
|
39
39
|
column,
|
|
40
|
-
row
|
|
40
|
+
row,
|
|
41
|
+
$rowIndex
|
|
41
42
|
}) {
|
|
42
43
|
var _a, _b;
|
|
43
44
|
const uuid = inject(InjectionIhoTableUUID);
|
|
45
|
+
const emit = inject(InjectionIhoTableEmits);
|
|
44
46
|
const separateRow = getSeparateRowData(uuid, row);
|
|
45
47
|
const height = getRowHeight();
|
|
46
48
|
const slots = {};
|
|
@@ -48,6 +50,15 @@ function separateRendererPlugins() {
|
|
|
48
50
|
const separate = toRaw(renderOpts.props.separateSlot);
|
|
49
51
|
slots.menu = isFunction(separate) ? separate : isObject(separate) ? (props) => h(separate, props) : void 0;
|
|
50
52
|
}
|
|
53
|
+
const common = {
|
|
54
|
+
value: row[column.field],
|
|
55
|
+
row,
|
|
56
|
+
column,
|
|
57
|
+
index: $rowIndex
|
|
58
|
+
};
|
|
59
|
+
function onClick() {
|
|
60
|
+
emit("formClick", common);
|
|
61
|
+
}
|
|
51
62
|
return [createVNode(EditSeparate, {
|
|
52
63
|
"value": row[column.field],
|
|
53
64
|
"onUpdate:value": ($event) => row[column.field] = $event,
|
|
@@ -55,7 +66,8 @@ function separateRendererPlugins() {
|
|
|
55
66
|
"height": height,
|
|
56
67
|
"column": column,
|
|
57
68
|
"row": row,
|
|
58
|
-
"displayContent": (_b = separateRow == null ? void 0 : separateRow.separateData) == null ? void 0 : _b[column.field]
|
|
69
|
+
"displayContent": (_b = separateRow == null ? void 0 : separateRow.separateData) == null ? void 0 : _b[column.field],
|
|
70
|
+
"onClick": onClick
|
|
59
71
|
}, slots)];
|
|
60
72
|
}
|
|
61
73
|
});
|
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
import { AnyObject
|
|
2
|
-
import {
|
|
3
|
-
import { VxeTableDefines, VxeTableInstance } from 'vxe-table';
|
|
1
|
+
import { AnyObject } from '../../../../../../../../es/shared/types';
|
|
2
|
+
import { VxeTableDefines } from 'vxe-table';
|
|
4
3
|
import { IhoTableFieldItem } from '../../../../../../../../es/components/iho-table';
|
|
5
4
|
declare type ParsedRowDataInfo = {
|
|
6
5
|
field: string;
|
|
7
6
|
data: string[];
|
|
8
7
|
};
|
|
9
8
|
export declare function getColumnInfoMaxLength(parsedRowDataInfo: ParsedRowDataInfo[]): number;
|
|
10
|
-
export declare function getColumnRenderWidth(column: AnyObject, $table: MaybeRef<Nullable<VxeTableInstance>>): Promise<number>;
|
|
11
9
|
export declare function generateSeparateRowData(parsedRowDataInfo: ParsedRowDataInfo[], index: number): AnyObject;
|
|
12
10
|
export declare function contentSeparate(value: unknown, field: IhoTableFieldItem, width: number): any[];
|
|
13
11
|
export declare function isSeparateColumn(field: IhoTableFieldItem | VxeTableDefines.ColumnInfo): boolean | "" | undefined;
|
|
@@ -1,25 +1,10 @@
|
|
|
1
1
|
import { getStringWidth } from '../../../../../../../shared/utils/index.js';
|
|
2
|
-
import {
|
|
3
|
-
import { nextTick, unref } from 'vue';
|
|
2
|
+
import { isArray, cloneDeep, isString, isNumber } from 'lodash-es';
|
|
4
3
|
import { EDITABLE_WIDGET_TYPE } from '../../../../constants/index.js';
|
|
5
4
|
|
|
6
5
|
function getColumnInfoMaxLength(parsedRowDataInfo) {
|
|
7
6
|
return Math.max(...parsedRowDataInfo.map((r) => r.data.length), 1);
|
|
8
7
|
}
|
|
9
|
-
async function getColumnRenderWidth(column, $table) {
|
|
10
|
-
const prev = getRenderWidth();
|
|
11
|
-
if (!prev) {
|
|
12
|
-
await nextTick();
|
|
13
|
-
}
|
|
14
|
-
return getRenderWidth() || getColumnWidth();
|
|
15
|
-
function getRenderWidth() {
|
|
16
|
-
var _a, _b;
|
|
17
|
-
return (_b = (_a = unref($table)) == null ? void 0 : _a.getColumnByField(column.field)) == null ? void 0 : _b.renderWidth;
|
|
18
|
-
}
|
|
19
|
-
function getColumnWidth() {
|
|
20
|
-
return isNumber(column.width) ? column.width : 64;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
8
|
function generateSeparateRowData(parsedRowDataInfo, index) {
|
|
24
9
|
return parsedRowDataInfo.reduce((res, info) => {
|
|
25
10
|
res[info.field] = info.data[index];
|
|
@@ -54,4 +39,4 @@ function isSeparateColumn(field) {
|
|
|
54
39
|
return field.field && ((_a = field.editRender) == null ? void 0 : _a.name) === EDITABLE_WIDGET_TYPE.SEPARATE;
|
|
55
40
|
}
|
|
56
41
|
|
|
57
|
-
export { contentSeparate, generateSeparateRowData, getColumnInfoMaxLength,
|
|
42
|
+
export { contentSeparate, generateSeparateRowData, getColumnInfoMaxLength, isSeparateColumn };
|
package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin.js
CHANGED
|
@@ -33,15 +33,20 @@ function timeRendererPlugin() {
|
|
|
33
33
|
placeholder,
|
|
34
34
|
valueFormat,
|
|
35
35
|
format: valueFormat || "yyyy-MM-dd HH:mm:ss",
|
|
36
|
-
onUpdateFormattedValue: onUpdateValue
|
|
36
|
+
onUpdateFormattedValue: onUpdateValue,
|
|
37
|
+
onClick
|
|
38
|
+
};
|
|
39
|
+
const common = {
|
|
40
|
+
value: row[column.field],
|
|
41
|
+
row,
|
|
42
|
+
column,
|
|
43
|
+
index: $rowIndex
|
|
37
44
|
};
|
|
38
45
|
function onUpdateValue() {
|
|
39
|
-
emit("formChange",
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
index: $rowIndex
|
|
44
|
-
});
|
|
46
|
+
emit("formChange", common);
|
|
47
|
+
}
|
|
48
|
+
function onClick() {
|
|
49
|
+
emit("formClick", common);
|
|
45
50
|
}
|
|
46
51
|
return [createVNode(NTimePicker, mergeProps({
|
|
47
52
|
"formattedValue": row[column.field],
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { inject, createVNode } from 'vue';
|
|
2
2
|
import { SettingsSharp } from '@vicons/ionicons5';
|
|
3
|
+
import { isFunction } from 'lodash-es';
|
|
3
4
|
import { NIcon } from 'naive-ui';
|
|
4
5
|
import '../../../../index.js';
|
|
5
6
|
import { InjectionIhoTableEmits } from '../../../constants/index.js';
|
|
@@ -14,8 +15,9 @@ function seqRendererPlugin() {
|
|
|
14
15
|
index,
|
|
15
16
|
insertBefore
|
|
16
17
|
}, config) => {
|
|
18
|
+
var _a;
|
|
17
19
|
if (index === 0 && config.showSeq) {
|
|
18
|
-
|
|
20
|
+
const columnConfig = {
|
|
19
21
|
align: "center",
|
|
20
22
|
fixed: "left",
|
|
21
23
|
width: 50,
|
|
@@ -39,7 +41,11 @@ function seqRendererPlugin() {
|
|
|
39
41
|
}, null)];
|
|
40
42
|
}
|
|
41
43
|
}
|
|
42
|
-
}
|
|
44
|
+
};
|
|
45
|
+
if (isFunction((_a = config.columnConfig) == null ? void 0 : _a.seqSlotFn)) {
|
|
46
|
+
columnConfig.slots.default = config.columnConfig.seqSlotFn;
|
|
47
|
+
}
|
|
48
|
+
insertBefore(columnConfig);
|
|
43
49
|
}
|
|
44
50
|
return field;
|
|
45
51
|
});
|