@weitutech/by-components-v3 1.1.20 → 1.1.21
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/dist/by-component-v3.js
CHANGED
|
@@ -121106,14 +121106,19 @@ const ByTable = /* @__PURE__ */ defineComponent({
|
|
|
121106
121106
|
CustomColumnRef.value.dialogVisible = true;
|
|
121107
121107
|
};
|
|
121108
121108
|
const changeTableFields = (cols) => {
|
|
121109
|
+
var _a2, _b;
|
|
121109
121110
|
const noFixedCol = cols.filter((col) => !col.field);
|
|
121110
|
-
const
|
|
121111
|
+
const isVisibleColumn = (col) => col.type === "true" || col.type === true;
|
|
121112
|
+
const leftFixedChildren = (((_a2 = cols.filter((col) => col.field === "left")[0]) == null ? void 0 : _a2.children) || []).filter((child) => isVisibleColumn(child)).map((child) => ({
|
|
121111
121113
|
...child,
|
|
121112
121114
|
fixed: "left"
|
|
121113
|
-
}))
|
|
121115
|
+
}));
|
|
121116
|
+
const rightFixedChildren = (((_b = cols.filter((col) => col.field === "right")[0]) == null ? void 0 : _b.children) || []).filter((child) => isVisibleColumn(child)).map((child) => ({
|
|
121114
121117
|
...child,
|
|
121115
121118
|
fixed: "right"
|
|
121116
|
-
}))
|
|
121119
|
+
}));
|
|
121120
|
+
const visibleNoFixedCols = noFixedCol.filter((col) => isVisibleColumn(col));
|
|
121121
|
+
const result = JSON.parse(JSON.stringify([...leftFixedChildren, ...visibleNoFixedCols, ...rightFixedChildren]));
|
|
121117
121122
|
const slots2 = props2.gridOptions.customColumnConfig.slots;
|
|
121118
121123
|
result.forEach((item) => {
|
|
121119
121124
|
delete item.type;
|
|
@@ -121123,7 +121128,7 @@ const ByTable = /* @__PURE__ */ defineComponent({
|
|
|
121123
121128
|
};
|
|
121124
121129
|
}
|
|
121125
121130
|
if (item.children && item.children.length > 0) {
|
|
121126
|
-
item.children = item.children.filter((col) => col
|
|
121131
|
+
item.children = item.children.filter((col) => isVisibleColumn(col));
|
|
121127
121132
|
item.children.forEach((child) => {
|
|
121128
121133
|
if (slots2.includes(child.field)) {
|
|
121129
121134
|
child.slots = {
|