bkui-vue 0.0.1-beta.404 → 0.0.1-beta.406
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/index.cjs.js +51 -51
- package/dist/index.esm.js +93 -57
- package/dist/index.umd.js +51 -51
- package/dist/style.css +1 -1
- package/dist/style.variable.css +1 -1
- package/lib/plugin-popover/index.js +1 -1
- package/lib/popover/index.d.ts +11 -19
- package/lib/popover/index.js +1 -1
- package/lib/popover/popover.d.ts +5 -9
- package/lib/popover/props.d.ts +2 -4
- package/lib/select/index.d.ts +6 -12
- package/lib/select/select.d.ts +2 -4
- package/lib/table/components/table-cell.d.ts +11 -0
- package/lib/table/index.d.ts +24 -1
- package/lib/table/index.js +1 -1
- package/lib/table/plugins/use-fixed-column.d.ts +15 -1
- package/lib/table/props.d.ts +12 -4
- package/lib/table/table.css +1 -0
- package/lib/table/table.d.ts +11 -0
- package/lib/table/table.less +1 -0
- package/lib/table/table.variable.css +1 -0
- package/lib/table/use-common.d.ts +15 -1
- package/lib/table-column/index.js +1 -1
- package/lib/tag-input/index.d.ts +8 -16
- package/lib/tag-input/tag-input.d.ts +4 -8
- package/lib/tag-input/tag-props.d.ts +2 -4
- package/package.json +2 -2
package/dist/index.esm.js
CHANGED
@@ -11288,7 +11288,7 @@ const PopoverProps = __spreadValues({
|
|
11288
11288
|
disableTransform: PropTypes.bool.def(false),
|
11289
11289
|
reference: PropTypes.any.def(null),
|
11290
11290
|
modifiers: PropTypes.array.def([]),
|
11291
|
-
popoverDelay: PropTypes.number.def(100)
|
11291
|
+
popoverDelay: PropTypes.oneOfType([PropTypes.number, PropTypes.arrayOf(PropTypes.number)]).def(100)
|
11292
11292
|
}, EventProps$1);
|
11293
11293
|
var Reference = defineComponent({
|
11294
11294
|
name: "PopReference",
|
@@ -12812,15 +12812,23 @@ var useFloating = (props2, ctx, {
|
|
12812
12812
|
};
|
12813
12813
|
let popHideTimerId = void 0;
|
12814
12814
|
let isMouseenter = false;
|
12815
|
+
const resolvePopoverDelay = () => {
|
12816
|
+
if (Array.isArray(props2.popoverDelay)) {
|
12817
|
+
return [props2.popoverDelay[0], props2.popoverDelay.slice(-1)[0]];
|
12818
|
+
}
|
12819
|
+
return [props2.popoverDelay, props2.popoverDelay];
|
12820
|
+
};
|
12815
12821
|
const showPopover = () => {
|
12822
|
+
const delay = resolvePopoverDelay()[0];
|
12816
12823
|
setTimeout(() => {
|
12817
12824
|
!props2.disabled && (localIsShow.value = true);
|
12818
|
-
},
|
12825
|
+
}, delay);
|
12819
12826
|
};
|
12820
12827
|
const hidePopover = () => {
|
12828
|
+
const delay = resolvePopoverDelay()[1];
|
12821
12829
|
popHideTimerId = setTimeout(() => {
|
12822
12830
|
localIsShow.value = false;
|
12823
|
-
},
|
12831
|
+
}, delay);
|
12824
12832
|
};
|
12825
12833
|
const hanldePopoverShow = () => {
|
12826
12834
|
var _a;
|
@@ -16968,7 +16976,8 @@ const tableProps = {
|
|
16968
16976
|
]).def(true),
|
16969
16977
|
resizerWay: j("ResizerWay", {
|
16970
16978
|
default: "throttle"
|
16971
|
-
})
|
16979
|
+
}),
|
16980
|
+
observerResize: PropTypes.bool.def(true)
|
16972
16981
|
};
|
16973
16982
|
var Column = defineComponent({
|
16974
16983
|
name: "TableColumn",
|
@@ -18360,7 +18369,8 @@ var TableCell = defineComponent({
|
|
18360
18369
|
watchCellResize: PropTypes.bool.def(true),
|
18361
18370
|
mode: overflowModeType
|
18362
18371
|
})]).def(void 0),
|
18363
|
-
title: PropTypes.string.def(void 0)
|
18372
|
+
title: PropTypes.string.def(void 0),
|
18373
|
+
observerResize: PropTypes.bool.def(true)
|
18364
18374
|
},
|
18365
18375
|
setup(props2, {
|
18366
18376
|
slots
|
@@ -18378,7 +18388,6 @@ var TableCell = defineComponent({
|
|
18378
18388
|
const {
|
18379
18389
|
showOverflowTooltip = false
|
18380
18390
|
} = resolveSetting();
|
18381
|
-
let observerIns = null;
|
18382
18391
|
let bkEllipsisIns = null;
|
18383
18392
|
const resolveTooltipOption = () => {
|
18384
18393
|
let disabled = true;
|
@@ -18436,11 +18445,15 @@ var TableCell = defineComponent({
|
|
18436
18445
|
} = resolveTooltipOption();
|
18437
18446
|
if (!disabled) {
|
18438
18447
|
resolveOverflowTooltip();
|
18439
|
-
if (((_a = props2.column.showOverflowTooltip) == null ? void 0 : _a.watchCellResize) !== false) {
|
18440
|
-
observerIns = observerResize(refRoot.value, () => {
|
18448
|
+
if (((_a = props2.column.showOverflowTooltip) == null ? void 0 : _a.watchCellResize) !== false && props2.observerResize) {
|
18449
|
+
let observerIns = observerResize(refRoot.value, () => {
|
18441
18450
|
resolveOverflowTooltip();
|
18442
18451
|
}, 60, true);
|
18443
18452
|
observerIns.start();
|
18453
|
+
onBeforeUnmount(() => {
|
18454
|
+
observerIns.disconnect();
|
18455
|
+
observerIns = null;
|
18456
|
+
});
|
18444
18457
|
}
|
18445
18458
|
}
|
18446
18459
|
});
|
@@ -18948,15 +18961,15 @@ var useFixedColumn = (_props, colgroups, hasScrollY) => {
|
|
18948
18961
|
column_fixed: !!column.fixed,
|
18949
18962
|
column_fixed_left: column.fixed !== "right",
|
18950
18963
|
column_fixed_right: column.fixed === "right",
|
18951
|
-
shadow: column.fixed === "right" ? scrollX
|
18964
|
+
shadow: column.fixed === "right" ? offsetRight - scrollX > 2 : scrollX > 0
|
18952
18965
|
});
|
18953
18966
|
const resolveFixColPos = (column) => column.fixed === "right" ? "right" : "left";
|
18954
18967
|
const resolveFixOffset = {
|
18955
|
-
left: (ignoreFirst = true) => colgroups.filter((col) => col.fixed && col.fixed !== "right").reduce((offset2, curr, index2) => {
|
18968
|
+
left: (ignoreFirst = true) => colgroups.filter((col) => !col.isHidden && col.fixed && col.fixed !== "right").reduce((offset2, curr, index2) => {
|
18956
18969
|
const outOffset = ignoreFirst && index2 === 0 ? offset2 : offset2 + getColumnReactWidth(curr);
|
18957
18970
|
return outOffset;
|
18958
18971
|
}, 0),
|
18959
|
-
right: (ignoreFirst = true) => colgroups.filter((col) => col.fixed === "right").reduce((offset2, curr, index2) => {
|
18972
|
+
right: (ignoreFirst = true) => colgroups.filter((col) => !col.isHidden && col.fixed === "right").reduce((offset2, curr, index2) => {
|
18960
18973
|
const outOffset = ignoreFirst && index2 === 0 ? offset2 : offset2 + getColumnReactWidth(curr);
|
18961
18974
|
return outOffset;
|
18962
18975
|
}, hasScrollY ? SCROLLY_WIDTH : 0)
|
@@ -18987,7 +19000,7 @@ var useFixedColumn = (_props, colgroups, hasScrollY) => {
|
|
18987
19000
|
return preOffset + offset2;
|
18988
19001
|
};
|
18989
19002
|
const resolveFixedColumnStyle = (column, hasScrollY2 = false) => {
|
18990
|
-
if (!column.fixed) {
|
19003
|
+
if (!column.fixed || column.isHidden) {
|
18991
19004
|
return {};
|
18992
19005
|
}
|
18993
19006
|
const fixedOffset = {
|
@@ -19004,33 +19017,29 @@ var useFixedColumn = (_props, colgroups, hasScrollY) => {
|
|
19004
19017
|
width: `${resolveFixOffset[colPos](false)}px`,
|
19005
19018
|
bottom: "0px"
|
19006
19019
|
});
|
19007
|
-
const
|
19008
|
-
|
19009
|
-
|
19010
|
-
|
19011
|
-
|
19012
|
-
|
19013
|
-
|
19014
|
-
|
19015
|
-
|
19016
|
-
|
19017
|
-
|
19018
|
-
|
19019
|
-
|
19020
|
-
|
19021
|
-
|
19022
|
-
|
19023
|
-
colPos,
|
19024
|
-
column
|
19025
|
-
}) => isExist ? "" : createVNode("div", {
|
19026
|
-
"class": resolveColumnClass(column, scrollX, offsetRight),
|
19027
|
-
"style": resolveColumnStyle(colPos)
|
19028
|
-
}, null));
|
19020
|
+
const fixedColumns = computed(() => {
|
19021
|
+
const colPosExist = {
|
19022
|
+
left: false,
|
19023
|
+
right: false
|
19024
|
+
};
|
19025
|
+
return colgroups.filter((col) => !col.isHidden && col.fixed).map((col) => {
|
19026
|
+
const colPos = resolveFixColPos(col);
|
19027
|
+
const isExist = colPosExist[colPos];
|
19028
|
+
colPosExist[colPos] = true;
|
19029
|
+
return {
|
19030
|
+
isExist,
|
19031
|
+
colPos,
|
19032
|
+
column: col
|
19033
|
+
};
|
19034
|
+
});
|
19035
|
+
});
|
19029
19036
|
const fixedWrapperClass = resolveClassName("table-fixed");
|
19030
19037
|
return {
|
19031
|
-
renderFixedColumns,
|
19032
19038
|
fixedWrapperClass,
|
19033
|
-
resolveFixedColumnStyle
|
19039
|
+
resolveFixedColumnStyle,
|
19040
|
+
fixedColumns,
|
19041
|
+
resolveColumnStyle,
|
19042
|
+
resolveColumnClass
|
19034
19043
|
};
|
19035
19044
|
};
|
19036
19045
|
function _isSlot$1(s2) {
|
@@ -19274,7 +19283,8 @@ class TableRender {
|
|
19274
19283
|
cells.unshift(cellText);
|
19275
19284
|
const showTitle = typeof cellText === "string" ? cellText : void 0;
|
19276
19285
|
return createVNode(TableCell, {
|
19277
|
-
"title": showTitle
|
19286
|
+
"title": showTitle,
|
19287
|
+
"observerResize": this.props.observerResize
|
19278
19288
|
}, _isSlot$1(cells) ? cells : {
|
19279
19289
|
default: () => [cells]
|
19280
19290
|
});
|
@@ -19381,7 +19391,8 @@ class TableRender {
|
|
19381
19391
|
"class": tdCtxClass,
|
19382
19392
|
"column": column,
|
19383
19393
|
"row": row,
|
19384
|
-
"parentSetting": this.props.showOverflowTooltip
|
19394
|
+
"parentSetting": this.props.showOverflowTooltip,
|
19395
|
+
"observerResize": this.props.observerResize
|
19385
19396
|
}, _isSlot$1(_slot = this.renderCell(row, column, rowIndex, rows)) ? _slot : {
|
19386
19397
|
default: () => [_slot]
|
19387
19398
|
})]);
|
@@ -19886,6 +19897,9 @@ const useInit = (props2, targetColumns) => {
|
|
19886
19897
|
[COLUMN_ATTRIBUTE.COL_SOURCE_DATA]: col
|
19887
19898
|
})));
|
19888
19899
|
};
|
19900
|
+
if (typeof props2.settings === "object") {
|
19901
|
+
updateColGroups(props2.settings);
|
19902
|
+
}
|
19889
19903
|
const { dragOffsetXStyle, dragOffsetX, resetResizeEvents, registerResizeEvent } = useColumnResize(colgroups, true);
|
19890
19904
|
const { activeColumns } = useActiveColumns(props2, targetColumns);
|
19891
19905
|
watch(() => [props2.settings], () => {
|
@@ -20178,7 +20192,12 @@ const useInit = (props2, targetColumns) => {
|
|
20178
20192
|
}
|
20179
20193
|
}
|
20180
20194
|
};
|
20181
|
-
const {
|
20195
|
+
const {
|
20196
|
+
fixedColumns,
|
20197
|
+
resolveColumnStyle,
|
20198
|
+
resolveColumnClass,
|
20199
|
+
fixedWrapperClass
|
20200
|
+
} = useFixedColumn(props2, colgroups, false);
|
20182
20201
|
const getSelection = () => indexData.filter((row) => resolveSelection(row));
|
20183
20202
|
return {
|
20184
20203
|
colgroups,
|
@@ -20187,9 +20206,11 @@ const useInit = (props2, targetColumns) => {
|
|
20187
20206
|
reactiveSchema,
|
20188
20207
|
indexData,
|
20189
20208
|
fixedWrapperClass,
|
20209
|
+
fixedColumns,
|
20210
|
+
resolveColumnStyle,
|
20211
|
+
resolveColumnClass,
|
20190
20212
|
initIndexData,
|
20191
20213
|
updateIndexData,
|
20192
|
-
renderFixedColumns,
|
20193
20214
|
setRowExpand,
|
20194
20215
|
updateColGroups,
|
20195
20216
|
clearSelection,
|
@@ -20208,7 +20229,6 @@ var Component$e = defineComponent({
|
|
20208
20229
|
let columnSortFn = null;
|
20209
20230
|
let activeSortColumn = null;
|
20210
20231
|
let columnFilterFn = null;
|
20211
|
-
let observerIns = null;
|
20212
20232
|
const targetColumns = reactive([]);
|
20213
20233
|
const {
|
20214
20234
|
initColumns
|
@@ -20223,7 +20243,9 @@ var Component$e = defineComponent({
|
|
20223
20243
|
dragOffsetX,
|
20224
20244
|
reactiveSchema,
|
20225
20245
|
indexData,
|
20226
|
-
|
20246
|
+
fixedColumns,
|
20247
|
+
resolveColumnStyle,
|
20248
|
+
resolveColumnClass,
|
20227
20249
|
setRowExpand,
|
20228
20250
|
initIndexData,
|
20229
20251
|
fixedWrapperClass,
|
@@ -20424,22 +20446,26 @@ var Component$e = defineComponent({
|
|
20424
20446
|
(_b = (_a = refVirtualRender.value) == null ? void 0 : _a.scrollTo) == null ? void 0 : _b.call(_a, option);
|
20425
20447
|
};
|
20426
20448
|
onMounted(() => {
|
20427
|
-
|
20428
|
-
|
20429
|
-
|
20430
|
-
|
20431
|
-
|
20432
|
-
|
20433
|
-
|
20434
|
-
|
20435
|
-
|
20436
|
-
|
20437
|
-
|
20438
|
-
|
20449
|
+
if (props2.observerResize) {
|
20450
|
+
let observerIns = observerResize(root.value, () => {
|
20451
|
+
if (!root.value) {
|
20452
|
+
return;
|
20453
|
+
}
|
20454
|
+
if (props2.height === "100%" || props2.height === "auto") {
|
20455
|
+
resetTableHeight(root.value);
|
20456
|
+
}
|
20457
|
+
updateBorderClass(root.value);
|
20458
|
+
const offset2 = getColumnsWidthOffsetWidth();
|
20459
|
+
resolveColumnWidth(root.value, colgroups, 20, offset2);
|
20460
|
+
}, 180, true, props2.resizerWay);
|
20461
|
+
observerIns.start();
|
20462
|
+
onBeforeUnmount(() => {
|
20463
|
+
observerIns.disconnect();
|
20464
|
+
observerIns = null;
|
20465
|
+
});
|
20466
|
+
}
|
20439
20467
|
});
|
20440
20468
|
onBeforeUnmount(() => {
|
20441
|
-
observerIns.disconnect();
|
20442
|
-
observerIns = null;
|
20443
20469
|
tableRender.destroy();
|
20444
20470
|
});
|
20445
20471
|
ctx.expose({
|
@@ -20525,7 +20551,17 @@ var Component$e = defineComponent({
|
|
20525
20551
|
createVNode("div", {
|
20526
20552
|
"class": fixedWrapperClass,
|
20527
20553
|
"style": fixedContainerStyle.value
|
20528
|
-
}, [
|
20554
|
+
}, [fixedColumns.value.map(({
|
20555
|
+
isExist,
|
20556
|
+
colPos,
|
20557
|
+
column
|
20558
|
+
}) => {
|
20559
|
+
console.log("fixedWrapperClass");
|
20560
|
+
return isExist ? "" : createVNode("div", {
|
20561
|
+
"class": resolveColumnClass(column, reactiveSchema.scrollTranslateX, tableOffsetRight.value),
|
20562
|
+
"style": resolveColumnStyle(colPos)
|
20563
|
+
}, null);
|
20564
|
+
}), createVNode("div", {
|
20529
20565
|
"class": resizeColumnClass,
|
20530
20566
|
"style": resizeColumnStyle.value
|
20531
20567
|
}, null), createVNode("div", {
|