bkui-vue 0.0.1-beta.383 → 0.0.1-beta.385
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 +57 -57
- package/dist/index.esm.js +40 -15
- package/dist/index.umd.js +57 -57
- package/dist/style.css +1 -1
- package/dist/style.variable.css +1 -1
- package/lib/breadcrumb/breadcrumb-item.d.ts +4 -2
- package/lib/breadcrumb/index.d.ts +4 -2
- package/lib/breadcrumb/index.js +1 -1
- package/lib/styles/reset.css +1 -1
- package/lib/styles/reset.less +2 -4
- package/lib/styles/reset.variable.css +1 -1
- package/lib/table/index.js +1 -1
- package/lib/table/plugins/use-fixed-column.d.ts +1 -1
- package/lib/table/render.d.ts +5 -1
- package/lib/table/table.css +0 -1
- package/lib/table/table.less +1 -1
- package/lib/table/table.variable.css +0 -1
- package/lib/table/use-common.d.ts +2 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
@@ -9187,7 +9187,9 @@ var BreadcrumbItem = defineComponent({
|
|
9187
9187
|
to: PropTypes.oneOfType([PropTypes.string, PropTypes.object]).def(""),
|
9188
9188
|
replace: PropTypes.bool
|
9189
9189
|
},
|
9190
|
+
emits: ["click"],
|
9190
9191
|
setup(props2, {
|
9192
|
+
emit,
|
9191
9193
|
slots
|
9192
9194
|
}) {
|
9193
9195
|
const {
|
@@ -9195,7 +9197,8 @@ var BreadcrumbItem = defineComponent({
|
|
9195
9197
|
} = getCurrentInstance();
|
9196
9198
|
const parent = inject("breadcrumb");
|
9197
9199
|
const router = appContext.config.globalProperties.$router;
|
9198
|
-
const handleClick = () => {
|
9200
|
+
const handleClick = (e) => {
|
9201
|
+
emit("click", e);
|
9199
9202
|
const {
|
9200
9203
|
to,
|
9201
9204
|
replace
|
@@ -18686,7 +18689,7 @@ var useFixedColumn = (_props, colgroups, hasScrollY) => {
|
|
18686
18689
|
return outOffset;
|
18687
18690
|
}, hasScrollY ? SCROLLY_WIDTH : 0)
|
18688
18691
|
};
|
18689
|
-
const getPreColumnOffset = (fixedPos, column) => {
|
18692
|
+
const getPreColumnOffset = (fixedPos, column, offset2 = 0) => {
|
18690
18693
|
const sourceId = column[COLUMN_ATTRIBUTE.COL_UID];
|
18691
18694
|
const opt = fixedPos === "right" ? -1 : 1;
|
18692
18695
|
const {
|
@@ -18702,24 +18705,24 @@ var useFixedColumn = (_props, colgroups, hasScrollY) => {
|
|
18702
18705
|
const id = current[COLUMN_ATTRIBUTE.COL_UID];
|
18703
18706
|
if (curFixedPos === fixedPos && sourceId !== id) {
|
18704
18707
|
const width = getColumnReactWidth(current);
|
18705
|
-
preOffset
|
18708
|
+
preOffset = preOffset + width;
|
18706
18709
|
}
|
18707
|
-
if (
|
18710
|
+
if (sourceId === id) {
|
18708
18711
|
break;
|
18709
18712
|
}
|
18710
18713
|
}
|
18711
|
-
return preOffset;
|
18714
|
+
return preOffset + offset2;
|
18712
18715
|
};
|
18713
|
-
const resolveFixedColumnStyle = (column) => {
|
18716
|
+
const resolveFixedColumnStyle = (column, hasScrollY2 = false) => {
|
18714
18717
|
if (!column.fixed) {
|
18715
18718
|
return {};
|
18716
18719
|
}
|
18717
18720
|
const fixedOffset = {
|
18718
18721
|
left: 0,
|
18719
|
-
right:
|
18722
|
+
right: hasScrollY2 ? SCROLLY_WIDTH : -1
|
18720
18723
|
};
|
18721
18724
|
const fixedPos = resolveFixColPos(column);
|
18722
|
-
fixedOffset[fixedPos] = getPreColumnOffset(fixedPos, column);
|
18725
|
+
fixedOffset[fixedPos] = getPreColumnOffset(fixedPos, column, fixedOffset[fixedPos]);
|
18723
18726
|
return {
|
18724
18727
|
[fixedPos]: `${fixedOffset[fixedPos]}px`
|
18725
18728
|
};
|
@@ -18761,7 +18764,7 @@ function _isSlot$1(s2) {
|
|
18761
18764
|
return typeof s2 === "function" || Object.prototype.toString.call(s2) === "[object Object]" && !isVNode(s2);
|
18762
18765
|
}
|
18763
18766
|
class TableRender {
|
18764
|
-
constructor(props2, ctx, reactiveProp, colgroups) {
|
18767
|
+
constructor(props2, ctx, reactiveProp, colgroups, styleRef) {
|
18765
18768
|
__publicField(this, "getRowHeight", (row, rowIndex) => {
|
18766
18769
|
const {
|
18767
18770
|
size,
|
@@ -18788,6 +18791,7 @@ class TableRender {
|
|
18788
18791
|
this.plugins = new TablePlugins(props2, ctx);
|
18789
18792
|
this.uuid = uuid_1.v4();
|
18790
18793
|
this.events = /* @__PURE__ */ new Map();
|
18794
|
+
this.styleRef = styleRef;
|
18791
18795
|
}
|
18792
18796
|
get propActiveCols() {
|
18793
18797
|
return this.reactiveProp.activeColumns;
|
@@ -19006,6 +19010,18 @@ class TableRender {
|
|
19006
19010
|
const {
|
19007
19011
|
resolveFixedColumnStyle
|
19008
19012
|
} = useFixedColumn(this.props, this.colgroups);
|
19013
|
+
const getScrollFix = () => {
|
19014
|
+
if (this.styleRef.value.hasScrollY) {
|
19015
|
+
const fixStyle = {
|
19016
|
+
width: `${SCROLLY_WIDTH + 2}px`,
|
19017
|
+
right: "-1px"
|
19018
|
+
};
|
19019
|
+
return createVNode("th", {
|
19020
|
+
"style": fixStyle,
|
19021
|
+
"class": "column_fixed"
|
19022
|
+
}, null);
|
19023
|
+
}
|
19024
|
+
};
|
19009
19025
|
return createVNode("thead", {
|
19010
19026
|
"style": rowStyle
|
19011
19027
|
}, [createVNode(TableRow, null, {
|
@@ -19013,9 +19029,9 @@ class TableRender {
|
|
19013
19029
|
"colspan": 1,
|
19014
19030
|
"rowspan": 1,
|
19015
19031
|
"class": this.getHeadColumnClass(column, index2),
|
19016
|
-
"style": resolveFixedColumnStyle(column),
|
19032
|
+
"style": resolveFixedColumnStyle(column, this.styleRef.value.hasScrollY),
|
19017
19033
|
"onClick": () => this.handleColumnHeadClick(index2, column)
|
19018
|
-
}, resolveEventListener(column)), [renderHeadCell(column, index2)]))])]
|
19034
|
+
}, resolveEventListener(column)), [renderHeadCell(column, index2)])), getScrollFix()])]
|
19019
19035
|
})]);
|
19020
19036
|
}
|
19021
19037
|
renderTBody(rows) {
|
@@ -19436,8 +19452,9 @@ var useColumnResize = (colgroups, immediate = true) => {
|
|
19436
19452
|
const useClass = (props2, targetColumns, root, reactiveProp, pageData) => {
|
19437
19453
|
const { getColumns } = useColumn(props2, targetColumns);
|
19438
19454
|
const autoHeight = ref(200);
|
19439
|
-
const hasScrollY = ref(
|
19455
|
+
const hasScrollY = ref(false);
|
19440
19456
|
const hasFooter = computed(() => props2.pagination && props2.data.length);
|
19457
|
+
const hasScrollYRef = computed(() => hasScrollY.value);
|
19441
19458
|
const tableClass = computed(() => classes({
|
19442
19459
|
[resolveClassName("table")]: true,
|
19443
19460
|
"has-footer": hasFooter.value,
|
@@ -19553,7 +19570,8 @@ const useClass = (props2, targetColumns, root, reactiveProp, pageData) => {
|
|
19553
19570
|
updateBorderClass,
|
19554
19571
|
getColumnsWidthOffsetWidth,
|
19555
19572
|
hasFooter,
|
19556
|
-
hasScrollY
|
19573
|
+
hasScrollY,
|
19574
|
+
hasScrollYRef
|
19557
19575
|
};
|
19558
19576
|
};
|
19559
19577
|
const useInit = (props2, targetColumns) => {
|
@@ -19948,12 +19966,16 @@ var Component$e = defineComponent({
|
|
19948
19966
|
wrapperStyle,
|
19949
19967
|
contentStyle,
|
19950
19968
|
headStyle,
|
19969
|
+
hasScrollYRef,
|
19951
19970
|
updateBorderClass,
|
19952
19971
|
resetTableHeight,
|
19953
19972
|
getColumnsWidthOffsetWidth,
|
19954
19973
|
hasFooter
|
19955
19974
|
} = useClass(props2, targetColumns, root, reactiveSchema, pageData);
|
19956
|
-
const
|
19975
|
+
const styleRef = computed(() => ({
|
19976
|
+
hasScrollY: hasScrollYRef.value
|
19977
|
+
}));
|
19978
|
+
const tableRender = new TableRender(props2, ctx, reactiveSchema, colgroups, styleRef);
|
19957
19979
|
const updateOffsetRight = () => {
|
19958
19980
|
const $tableContent = root.value.querySelector(".bk-table-body-content");
|
19959
19981
|
const $table = $tableContent.querySelector("table");
|
@@ -20170,6 +20192,9 @@ var Component$e = defineComponent({
|
|
20170
20192
|
const footerStyle = computed(() => ({
|
20171
20193
|
"--footer-height": hasFooter.value ? `${props2.paginationHeihgt}px` : "0"
|
20172
20194
|
}));
|
20195
|
+
const fixedContainerStyle = computed(() => __spreadValues({
|
20196
|
+
right: hasScrollYRef.value ? `${SCROLLY_WIDTH}px` : 0
|
20197
|
+
}, footerStyle.value));
|
20173
20198
|
const {
|
20174
20199
|
renderScrollLoading
|
20175
20200
|
} = useScrollLoading(props2, ctx);
|
@@ -20209,7 +20234,7 @@ var Component$e = defineComponent({
|
|
20209
20234
|
}),
|
20210
20235
|
createVNode("div", {
|
20211
20236
|
"class": fixedWrapperClass,
|
20212
|
-
"style":
|
20237
|
+
"style": fixedContainerStyle.value
|
20213
20238
|
}, [renderFixedColumns(reactiveSchema.scrollTranslateX, tableOffsetRight.value), createVNode("div", {
|
20214
20239
|
"class": resizeColumnClass,
|
20215
20240
|
"style": resizeColumnStyle.value
|