cnhis-design-vue 3.1.34-beta.3 → 3.1.34-beta.5
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/src/components/edit-form/edit-input.js +2 -1
- package/es/components/fabric-chart/src/hooks/useCenter.js +2 -1
- package/es/components/iho-table/index.d.ts +4 -0
- package/es/components/iho-table/src/IhoTable.vue.d.ts +4 -0
- package/es/components/iho-table/src/components/IhoTableColumn.js +1 -1
- package/es/components/iho-table/src/constants/index.d.ts +6 -0
- package/es/components/iho-table/src/constants/index.js +9 -7
- package/es/components/iho-table/src/plugins/defaultConfigPlugin/index.js +6 -2
- package/es/components/iho-table/src/plugins/filterPlugin/filter.vue.js +18 -13
- package/es/components/iho-table/src/plugins/filterPlugin/index.js +54 -55
- package/es/components/iho-table/src/plugins/lowCodeFieldAdaptorPlugin/index.js +7 -3
- package/es/components/iho-table/src/plugins/virtualTreePlugin/index.js +10 -3
- package/es/components/iho-table/src/types/index.d.ts +3 -0
- package/package.json +2 -2
|
@@ -32,10 +32,11 @@ var EditInput = defineComponent({
|
|
|
32
32
|
attrs,
|
|
33
33
|
emit
|
|
34
34
|
}) {
|
|
35
|
+
var _a;
|
|
35
36
|
const {
|
|
36
37
|
formRef
|
|
37
38
|
} = useCommon(props, attrs);
|
|
38
|
-
const __value = ref(props.type === "number" ? attrs.value
|
|
39
|
+
const __value = ref(props.type === "number" ? (_a = attrs.value) != null ? _a : void 0 : attrs.value);
|
|
39
40
|
const commData = {
|
|
40
41
|
row: props.row,
|
|
41
42
|
column: props.col,
|
|
@@ -230,6 +230,7 @@ function useCenter(canvas, propItems, emits, cumputedX, cumputedY, getXValue, ge
|
|
|
230
230
|
pacemaker = {},
|
|
231
231
|
upArrowStyle = {},
|
|
232
232
|
limitValueStyle = {},
|
|
233
|
+
nonePainPointStyle = {},
|
|
233
234
|
dataList = []
|
|
234
235
|
} = scaleValue;
|
|
235
236
|
const pointList = [];
|
|
@@ -444,7 +445,7 @@ function useCenter(canvas, propItems, emits, cumputedX, cumputedY, getXValue, ge
|
|
|
444
445
|
lockMovementX: true,
|
|
445
446
|
...v.pacemakerShow && type == "pulse" ? pacemaker.style : pointAttr,
|
|
446
447
|
...propItems.event,
|
|
447
|
-
...isNonePain ? { selectable: false, evented: false } : {}
|
|
448
|
+
...isNonePain ? { selectable: false, evented: false, ...nonePainPointStyle } : {}
|
|
448
449
|
};
|
|
449
450
|
if (previousLine) {
|
|
450
451
|
const y = previousLine.get("y2");
|
|
@@ -2076,6 +2076,8 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
2076
2076
|
onActiveCellChangeStart?: ((params: import("vxe-table").VxeTableProDefines.ActiveCellChangeStartEventParams) => void) | undefined;
|
|
2077
2077
|
onActiveCellChangeEnd?: ((params: import("vxe-table").VxeTableProDefines.ActiveCellChangeEndEventParams) => void) | undefined;
|
|
2078
2078
|
uuid?: string | undefined;
|
|
2079
|
+
isTree?: 0 | 2 | 1 | 3 | undefined;
|
|
2080
|
+
isSort?: 0 | 1 | undefined;
|
|
2079
2081
|
showSeq?: boolean | undefined;
|
|
2080
2082
|
selectType?: "checkbox" | "radio" | null | undefined;
|
|
2081
2083
|
rowGroupSetting?: {
|
|
@@ -4464,6 +4466,8 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
4464
4466
|
} | undefined;
|
|
4465
4467
|
params?: any;
|
|
4466
4468
|
uuid?: string | undefined;
|
|
4469
|
+
isTree?: 0 | 2 | 1 | 3 | undefined;
|
|
4470
|
+
isSort?: 0 | 1 | undefined;
|
|
4467
4471
|
showSeq?: boolean | undefined;
|
|
4468
4472
|
selectType?: "checkbox" | "radio" | null | undefined;
|
|
4469
4473
|
rowGroupSetting?: {
|
|
@@ -2075,6 +2075,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2075
2075
|
onActiveCellChangeStart?: ((params: import("vxe-table").VxeTableProDefines.ActiveCellChangeStartEventParams) => void) | undefined;
|
|
2076
2076
|
onActiveCellChangeEnd?: ((params: import("vxe-table").VxeTableProDefines.ActiveCellChangeEndEventParams) => void) | undefined;
|
|
2077
2077
|
uuid?: string | undefined;
|
|
2078
|
+
isTree?: 0 | 2 | 1 | 3 | undefined;
|
|
2079
|
+
isSort?: 0 | 1 | undefined;
|
|
2078
2080
|
showSeq?: boolean | undefined;
|
|
2079
2081
|
selectType?: "checkbox" | "radio" | null | undefined;
|
|
2080
2082
|
rowGroupSetting?: {
|
|
@@ -4463,6 +4465,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
4463
4465
|
} | undefined;
|
|
4464
4466
|
params?: any;
|
|
4465
4467
|
uuid?: string | undefined;
|
|
4468
|
+
isTree?: 0 | 2 | 1 | 3 | undefined;
|
|
4469
|
+
isSort?: 0 | 1 | undefined;
|
|
4466
4470
|
showSeq?: boolean | undefined;
|
|
4467
4471
|
selectType?: "checkbox" | "radio" | null | undefined;
|
|
4468
4472
|
rowGroupSetting?: {
|
|
@@ -27,7 +27,7 @@ const ColumnComponent = defineComponent({
|
|
|
27
27
|
"class": "iho-table__headerWrapper"
|
|
28
28
|
}, [createVNode("section", {
|
|
29
29
|
"style": {
|
|
30
|
-
width: widthAppend(payload.column.renderWidth - (hasAnnotation ? 36 : 20))
|
|
30
|
+
width: widthAppend(payload.column.renderWidth - (hasAnnotation ? 36 : 20) - (props.field.sortable ? 24 : 0))
|
|
31
31
|
}
|
|
32
32
|
}, [[...arrayed(customHeader != null ? customHeader : createVNode(NEllipsis, {
|
|
33
33
|
"style": {
|
|
@@ -57,6 +57,12 @@ export declare enum IHO_TABLE_STRING_STATUS {
|
|
|
57
57
|
NEGATIVE = "0",
|
|
58
58
|
POSITIVE = "1"
|
|
59
59
|
}
|
|
60
|
+
export declare enum IHO_TABLE_TREE_TYPE {
|
|
61
|
+
NOT_TREE = 0,
|
|
62
|
+
UNKNOWN = 1,
|
|
63
|
+
UNKNOWN2 = 2,
|
|
64
|
+
TRANSFORM_TREE_TYPE = 3
|
|
65
|
+
}
|
|
60
66
|
export declare const IhoTableCustomEventNameTuple: readonly ["formChange", "settingClick", "formClick", "keyboard"];
|
|
61
67
|
export declare const IhoTableEventNameTuple: readonly ["formChange", "settingClick", "formClick", "keyboard", ...("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")[]];
|
|
62
68
|
export declare const InjectionIhoTableConfig: InjectionKey<Ref<IhoTableConfig>>;
|
|
@@ -128,12 +128,14 @@ var IHO_TABLE_STRING_STATUS = /* @__PURE__ */ ((IHO_TABLE_STRING_STATUS2) => {
|
|
|
128
128
|
IHO_TABLE_STRING_STATUS2["POSITIVE"] = "1";
|
|
129
129
|
return IHO_TABLE_STRING_STATUS2;
|
|
130
130
|
})(IHO_TABLE_STRING_STATUS || {});
|
|
131
|
-
|
|
132
|
-
"
|
|
133
|
-
"
|
|
134
|
-
"
|
|
135
|
-
"
|
|
136
|
-
|
|
131
|
+
var IHO_TABLE_TREE_TYPE = /* @__PURE__ */ ((IHO_TABLE_TREE_TYPE2) => {
|
|
132
|
+
IHO_TABLE_TREE_TYPE2[IHO_TABLE_TREE_TYPE2["NOT_TREE"] = 0] = "NOT_TREE";
|
|
133
|
+
IHO_TABLE_TREE_TYPE2[IHO_TABLE_TREE_TYPE2["UNKNOWN"] = 1] = "UNKNOWN";
|
|
134
|
+
IHO_TABLE_TREE_TYPE2[IHO_TABLE_TREE_TYPE2["UNKNOWN2"] = 2] = "UNKNOWN2";
|
|
135
|
+
IHO_TABLE_TREE_TYPE2[IHO_TABLE_TREE_TYPE2["TRANSFORM_TREE_TYPE"] = 3] = "TRANSFORM_TREE_TYPE";
|
|
136
|
+
return IHO_TABLE_TREE_TYPE2;
|
|
137
|
+
})(IHO_TABLE_TREE_TYPE || {});
|
|
138
|
+
const IhoTableCustomEventNameTuple = ["formChange", "settingClick", "formClick", "keyboard"];
|
|
137
139
|
const IhoTableEventNameTuple = [...IhoTableCustomEventNameTuple, ...VxeTableEventNameList];
|
|
138
140
|
const InjectionIhoTableConfig = Symbol("injectionIhoTableConfig");
|
|
139
141
|
const InjectionIhoTableFieldList = Symbol("injectionIhoTableFieldList");
|
|
@@ -145,4 +147,4 @@ const InjectionIhoTableEventListener = Symbol(
|
|
|
145
147
|
"InjectionIhoTableEventListener"
|
|
146
148
|
);
|
|
147
149
|
|
|
148
|
-
export { EDITABLE_WIDGET_TYPE, HIGHEST_PRIORITY, IHO_TABLE_NUMBER_STATUS, IHO_TABLE_STRING_STATUS, IhoTableCustomEventNameTuple, IhoTableEventNameTuple, IhoTableRowGroupSequence, InjectionIhoTableConfig, InjectionIhoTableEmits, InjectionIhoTableEventListener, InjectionIhoTableFieldList, InjectionIhoTableHandler, InjectionIhoTableInstance, InjectionIhoTableUUID, VxeEventListenerNameList, VxeTableEventNameList, WIDGET_TYPE };
|
|
150
|
+
export { EDITABLE_WIDGET_TYPE, HIGHEST_PRIORITY, IHO_TABLE_NUMBER_STATUS, IHO_TABLE_STRING_STATUS, IHO_TABLE_TREE_TYPE, IhoTableCustomEventNameTuple, IhoTableEventNameTuple, IhoTableRowGroupSequence, InjectionIhoTableConfig, InjectionIhoTableEmits, InjectionIhoTableEventListener, InjectionIhoTableFieldList, InjectionIhoTableHandler, InjectionIhoTableInstance, InjectionIhoTableUUID, VxeEventListenerNameList, VxeTableEventNameList, WIDGET_TYPE };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { mergeWith } from 'lodash-es';
|
|
2
|
-
import { HIGHEST_PRIORITY } from '../../constants/index.js';
|
|
2
|
+
import { HIGHEST_PRIORITY, IHO_TABLE_TREE_TYPE } from '../../constants/index.js';
|
|
3
3
|
import { defineTablePlugin } from '../../hooks/useTablePlugin.js';
|
|
4
4
|
|
|
5
5
|
function defaultConfigPlugin() {
|
|
@@ -8,7 +8,7 @@ function defaultConfigPlugin() {
|
|
|
8
8
|
name: pluginName,
|
|
9
9
|
apply(hooks) {
|
|
10
10
|
hooks.configHooks.config.tap({ name: pluginName, stage: HIGHEST_PRIORITY }, (config) => {
|
|
11
|
-
|
|
11
|
+
const result = mergeWith(
|
|
12
12
|
{
|
|
13
13
|
height: "100%",
|
|
14
14
|
border: true,
|
|
@@ -28,6 +28,10 @@ function defaultConfigPlugin() {
|
|
|
28
28
|
},
|
|
29
29
|
config
|
|
30
30
|
);
|
|
31
|
+
if (config.isTree === IHO_TABLE_TREE_TYPE.TRANSFORM_TREE_TYPE) {
|
|
32
|
+
result.treeConfig = { ...config.treeConfig, transform: true };
|
|
33
|
+
}
|
|
34
|
+
return result;
|
|
31
35
|
});
|
|
32
36
|
}
|
|
33
37
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, inject, ref, onDeactivated, watch, computed, openBlock, createElementBlock, createVNode, unref, withCtx, createTextVNode, toDisplayString, normalizeClass,
|
|
1
|
+
import { defineComponent, inject, ref, onDeactivated, watch, computed, openBlock, createElementBlock, createElementVNode, renderSlot, createVNode, unref, withCtx, createTextVNode, toDisplayString, normalizeClass, Fragment, renderList, normalizeStyle } from 'vue';
|
|
2
2
|
import { widthAppend } from '../../../../../shared/utils/index.js';
|
|
3
3
|
import { FunnelSharp } from '@vicons/ionicons5';
|
|
4
4
|
import { useVModel, useVirtualList } from '@vueuse/core';
|
|
@@ -7,9 +7,10 @@ import { InjectionIhoTableUUID } from '../../constants/index.js';
|
|
|
7
7
|
import _export_sfc from '../../../../../_virtual/plugin-vue_export-helper.js';
|
|
8
8
|
|
|
9
9
|
const _hoisted_1 = { style: { "display": "flex", "align-items": "center" } };
|
|
10
|
-
const _hoisted_2 = {
|
|
11
|
-
const _hoisted_3 =
|
|
12
|
-
const _hoisted_4 =
|
|
10
|
+
const _hoisted_2 = { style: { "max-width": "calc(100% - 22px)" } };
|
|
11
|
+
const _hoisted_3 = { class: "iho-table__filterWrapper" };
|
|
12
|
+
const _hoisted_4 = ["onClick"];
|
|
13
|
+
const _hoisted_5 = { class: "iho-table__filterFooter" };
|
|
13
14
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
14
15
|
__name: "filter",
|
|
15
16
|
props: {
|
|
@@ -77,12 +78,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
77
78
|
});
|
|
78
79
|
return (_ctx, _cache) => {
|
|
79
80
|
return openBlock(), createElementBlock("section", _hoisted_1, [
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
81
|
+
createElementVNode("section", _hoisted_2, [
|
|
82
|
+
renderSlot(_ctx.$slots, "header", {}, () => [
|
|
83
|
+
createVNode(unref(NEllipsis), null, {
|
|
84
|
+
default: withCtx(() => [
|
|
85
|
+
createTextVNode(toDisplayString(__props.payload.column.title), 1)
|
|
86
|
+
]),
|
|
87
|
+
_: 1
|
|
88
|
+
})
|
|
89
|
+
])
|
|
90
|
+
]),
|
|
86
91
|
createVNode(unref(NPopover), {
|
|
87
92
|
to: `#${unref(uuid)}`,
|
|
88
93
|
show: filterVisible.value
|
|
@@ -95,13 +100,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
95
100
|
}, null, 8, ["class", "component"])
|
|
96
101
|
]),
|
|
97
102
|
default: withCtx(() => [
|
|
98
|
-
createElementVNode("section",
|
|
103
|
+
createElementVNode("section", _hoisted_3, [
|
|
99
104
|
(openBlock(), createElementBlock(Fragment, null, renderList(sortStatusList, (item) => {
|
|
100
105
|
return createElementVNode("div", {
|
|
101
106
|
key: item.status,
|
|
102
107
|
class: normalizeClass(["iho-table__filterButton", { "iho-table__filterButton--active": unref(sortStatusRef) === item.status }]),
|
|
103
108
|
onClick: ($event) => setSort(item.status)
|
|
104
|
-
}, toDisplayString(item.text), 11,
|
|
109
|
+
}, toDisplayString(item.text), 11, _hoisted_4);
|
|
105
110
|
}), 64)),
|
|
106
111
|
createVNode(unref(NInput), {
|
|
107
112
|
value: searchFilterText.value,
|
|
@@ -137,7 +142,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
137
142
|
]),
|
|
138
143
|
_: 1
|
|
139
144
|
}, 8, ["value"]),
|
|
140
|
-
createElementVNode("footer",
|
|
145
|
+
createElementVNode("footer", _hoisted_5, [
|
|
141
146
|
createElementVNode("section", null, toDisplayString(`\u5DF2\u9009\u62E9${checkedCacheRef.value.length}\u9879`), 1),
|
|
142
147
|
createVNode(unref(NButtonGroup), { size: "tiny" }, {
|
|
143
148
|
default: withCtx(() => [
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { computed, createVNode, onBeforeUnmount, reactive } from 'vue';
|
|
2
|
+
import { jsonParse } from '../../../../../shared/utils/index.js';
|
|
2
3
|
import { isObject, isArray } from 'lodash-es';
|
|
3
4
|
import '../../../index.js';
|
|
4
5
|
import { IHO_TABLE_NUMBER_STATUS, IHO_TABLE_STRING_STATUS } from '../../constants/index.js';
|
|
@@ -121,62 +122,60 @@ function filterPlugin() {
|
|
|
121
122
|
const lowCodeField = (_a = fieldItem.editRender) == null ? void 0 : _a.props;
|
|
122
123
|
if (!isObject(lowCodeField))
|
|
123
124
|
return;
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
}
|
|
135
|
-
const {
|
|
136
|
-
filterState,
|
|
137
|
-
setChecked,
|
|
138
|
-
setSort
|
|
139
|
-
} = initFilterState(uuid, fieldItem.field, lowCodeField.filterDefaultValue);
|
|
140
|
-
filterState.options = options;
|
|
141
|
-
const oldHeader = (_g = fieldItem.slots) == null ? void 0 : _g.header;
|
|
142
|
-
const sortStatusRef = computed({
|
|
143
|
-
get: () => {
|
|
144
|
-
return filterState.sortStatus;
|
|
145
|
-
},
|
|
146
|
-
set: (value) => setSort({
|
|
147
|
-
field: fieldItem.field,
|
|
148
|
-
value,
|
|
149
|
-
$table: $table.value,
|
|
150
|
-
emits
|
|
151
|
-
})
|
|
152
|
-
});
|
|
153
|
-
const checkedRef = computed({
|
|
154
|
-
get: () => filterState.checked,
|
|
155
|
-
set: (value) => setChecked({
|
|
156
|
-
field: fieldItem.field,
|
|
157
|
-
value,
|
|
158
|
-
$table: $table.value,
|
|
159
|
-
emits
|
|
160
|
-
})
|
|
161
|
-
});
|
|
162
|
-
const optionsRef = computed(() => filterState.options);
|
|
163
|
-
fieldItem.slots = {
|
|
164
|
-
...fieldItem.slots,
|
|
165
|
-
header(payload) {
|
|
166
|
-
return createVNode(FilterComponent, {
|
|
167
|
-
"payload": payload,
|
|
168
|
-
"options": optionsRef.value,
|
|
169
|
-
"checked": checkedRef.value,
|
|
170
|
-
"onUpdate:checked": ($event) => checkedRef.value = $event,
|
|
171
|
-
"sortStatus": sortStatusRef.value,
|
|
172
|
-
"onUpdate:sortStatus": ($event) => sortStatusRef.value = $event
|
|
173
|
-
}, {
|
|
174
|
-
header: oldHeader
|
|
175
|
-
});
|
|
176
|
-
}
|
|
177
|
-
};
|
|
178
|
-
} catch (e) {
|
|
125
|
+
const fieldSetting = jsonParse(lowCodeField.fieldSetting || "");
|
|
126
|
+
if (!isFieldSetting(fieldSetting) || !showFilter(fieldSetting))
|
|
127
|
+
return;
|
|
128
|
+
fieldItem.sortable = false;
|
|
129
|
+
let options = (_d = (_c = (_b = fieldSetting.mapping) == null ? void 0 : _b.mappingFiled) == null ? void 0 : _c.map((item) => item.value[0])) != null ? _d : [];
|
|
130
|
+
if (isCompatibleColumn(lowCodeField)) {
|
|
131
|
+
options = (_f = (_e = lowCodeField.options) == null ? void 0 : _e.map((option) => ({
|
|
132
|
+
...option,
|
|
133
|
+
key: option.label
|
|
134
|
+
}))) != null ? _f : [];
|
|
179
135
|
}
|
|
136
|
+
const {
|
|
137
|
+
filterState,
|
|
138
|
+
setChecked,
|
|
139
|
+
setSort
|
|
140
|
+
} = initFilterState(uuid, fieldItem.field, lowCodeField.filterDefaultValue);
|
|
141
|
+
filterState.options = options;
|
|
142
|
+
const oldHeader = (_g = fieldItem.slots) == null ? void 0 : _g.header;
|
|
143
|
+
const sortStatusRef = computed({
|
|
144
|
+
get: () => {
|
|
145
|
+
return filterState.sortStatus;
|
|
146
|
+
},
|
|
147
|
+
set: (value) => setSort({
|
|
148
|
+
field: fieldItem.field,
|
|
149
|
+
value,
|
|
150
|
+
$table: $table.value,
|
|
151
|
+
emits
|
|
152
|
+
})
|
|
153
|
+
});
|
|
154
|
+
const checkedRef = computed({
|
|
155
|
+
get: () => filterState.checked,
|
|
156
|
+
set: (value) => setChecked({
|
|
157
|
+
field: fieldItem.field,
|
|
158
|
+
value,
|
|
159
|
+
$table: $table.value,
|
|
160
|
+
emits
|
|
161
|
+
})
|
|
162
|
+
});
|
|
163
|
+
const optionsRef = computed(() => filterState.options);
|
|
164
|
+
fieldItem.slots = {
|
|
165
|
+
...fieldItem.slots,
|
|
166
|
+
header(payload) {
|
|
167
|
+
return createVNode(FilterComponent, {
|
|
168
|
+
"payload": payload,
|
|
169
|
+
"options": optionsRef.value,
|
|
170
|
+
"checked": checkedRef.value,
|
|
171
|
+
"onUpdate:checked": ($event) => checkedRef.value = $event,
|
|
172
|
+
"sortStatus": sortStatusRef.value,
|
|
173
|
+
"onUpdate:sortStatus": ($event) => sortStatusRef.value = $event
|
|
174
|
+
}, {
|
|
175
|
+
header: oldHeader
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
};
|
|
180
179
|
});
|
|
181
180
|
return fieldList;
|
|
182
181
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { pick, cloneDeep } from 'lodash-es';
|
|
1
|
+
import { pick, cloneDeep, isObject } 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';
|
|
@@ -17,6 +17,7 @@ function lowCodeFieldAdaptorPlugin() {
|
|
|
17
17
|
showOverflow: Reflect.has(_field, "showOverflow") ? _field.showOverflow : "tooltip",
|
|
18
18
|
visible: _field.isShow !== IHO_TABLE_NUMBER_STATUS.NEGATIVE,
|
|
19
19
|
minWidth: _field.colWidth,
|
|
20
|
+
sortable: _field.isSort === IHO_TABLE_NUMBER_STATUS.POSITIVE,
|
|
20
21
|
slots: { ..._field.slots, default: _field.slotFn, header: _field.headerSlotFn },
|
|
21
22
|
...pick(_field, ["title", "treeNode", "resizable"])
|
|
22
23
|
};
|
|
@@ -27,7 +28,6 @@ function lowCodeFieldAdaptorPlugin() {
|
|
|
27
28
|
});
|
|
28
29
|
}
|
|
29
30
|
function settingObjAdaptor(fieldItem, lowCodeField, config) {
|
|
30
|
-
var _a;
|
|
31
31
|
const props = cloneDeep(toRaw(lowCodeField));
|
|
32
32
|
props.componentProps = { size: config.size === "mini" ? "small" : config.size, ...props.componentProps };
|
|
33
33
|
fieldItem.editRender = {
|
|
@@ -36,7 +36,11 @@ function settingObjAdaptor(fieldItem, lowCodeField, config) {
|
|
|
36
36
|
props
|
|
37
37
|
};
|
|
38
38
|
fieldItem.editRender.enabled = !Reflect.get(WIDGET_TYPE, fieldItem.editRender.name);
|
|
39
|
-
|
|
39
|
+
if (!isObject(lowCodeField.settingObj))
|
|
40
|
+
return;
|
|
41
|
+
if (Reflect.has(lowCodeField.settingObj, "isHide")) {
|
|
42
|
+
fieldItem.visible = fieldItem.visible && lowCodeField.settingObj.isHide !== IHO_TABLE_STRING_STATUS.POSITIVE;
|
|
43
|
+
}
|
|
40
44
|
}
|
|
41
45
|
|
|
42
46
|
export { lowCodeFieldAdaptorPlugin };
|
|
@@ -41,12 +41,19 @@ function virtualTreePlugin() {
|
|
|
41
41
|
hooks.fieldHooks.fieldList.tap(pluginName, (fieldList, config) => {
|
|
42
42
|
const { transform } = config.treeConfig || DMZ;
|
|
43
43
|
if (transform && config.uuid) {
|
|
44
|
-
|
|
44
|
+
let treeNodeColumnIndex = fieldList.findIndex((field) => field.treeNode);
|
|
45
|
+
if (!~treeNodeColumnIndex) {
|
|
46
|
+
fieldList.some((field, index) => {
|
|
47
|
+
if (field.type)
|
|
48
|
+
return;
|
|
49
|
+
treeNodeColumnIndex = index;
|
|
50
|
+
return field.treeNode = true;
|
|
51
|
+
});
|
|
52
|
+
}
|
|
45
53
|
treeNodeColumnIndexMap.set(config.uuid, {
|
|
46
|
-
index:
|
|
54
|
+
index: treeNodeColumnIndex,
|
|
47
55
|
length: fieldList.length
|
|
48
56
|
});
|
|
49
|
-
!~treeNodeColumnIndex && Reflect.set(fieldList[0], "treeNode", true);
|
|
50
57
|
}
|
|
51
58
|
return fieldList;
|
|
52
59
|
});
|
|
@@ -13,6 +13,8 @@ export declare type IhoTableConfig = VxeTableProps & Partial<{
|
|
|
13
13
|
[K in typeof VxeEventListenerNameList[number]]: (...payload: IhoTableEmitPayload<EventListenerToEventName<K>>) => void;
|
|
14
14
|
}> & Partial<{
|
|
15
15
|
uuid: string;
|
|
16
|
+
isTree: 0 | 1 | 2 | 3;
|
|
17
|
+
isSort: 0 | 1;
|
|
16
18
|
showSeq: boolean;
|
|
17
19
|
selectType: Exclude<VxeTableDefines.ColumnInfo['type'], 'seq' | 'expand' | 'html'>;
|
|
18
20
|
rowGroupSetting: Partial<Record<TupleToUnion<typeof IhoTableRowGroupSequence>, IhoTableRowGroupItem[]>>;
|
|
@@ -55,6 +57,7 @@ export declare type LowCodeTableFieldItem = {
|
|
|
55
57
|
settingObj: IhoTableLowCodeField.SettingObj;
|
|
56
58
|
treeNode: boolean;
|
|
57
59
|
isShow: 0 | 1;
|
|
60
|
+
isSort: 0 | 1;
|
|
58
61
|
formType: string;
|
|
59
62
|
fieldSetting: string;
|
|
60
63
|
componentProps: AnyObject;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cnhis-design-vue",
|
|
3
|
-
"version": "3.1.34-beta.
|
|
3
|
+
"version": "3.1.34-beta.5",
|
|
4
4
|
"license": "ISC",
|
|
5
5
|
"module": "./es/components/index.js",
|
|
6
6
|
"main": "./es/components/index.js",
|
|
@@ -61,5 +61,5 @@
|
|
|
61
61
|
"iOS 7",
|
|
62
62
|
"last 3 iOS versions"
|
|
63
63
|
],
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "a8d46e9ee25e00f378e72e0e30ca668efb1fb9ff"
|
|
65
65
|
}
|