bkui-vue 0.0.1-beta.383 → 0.0.1-beta.384

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.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 {
@@ -18708,18 +18711,18 @@ var useFixedColumn = (_props, colgroups, hasScrollY) => {
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: 0
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,12 @@ 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(void 0);
19455
+ const hasScrollY = ref(false);
19440
19456
  const hasFooter = computed(() => props2.pagination && props2.data.length);
19457
+ const hasScrollYRef = computed(() => {
19458
+ console.log("--", hasScrollY.value);
19459
+ return hasScrollY.value;
19460
+ });
19441
19461
  const tableClass = computed(() => classes({
19442
19462
  [resolveClassName("table")]: true,
19443
19463
  "has-footer": hasFooter.value,
@@ -19553,7 +19573,8 @@ const useClass = (props2, targetColumns, root, reactiveProp, pageData) => {
19553
19573
  updateBorderClass,
19554
19574
  getColumnsWidthOffsetWidth,
19555
19575
  hasFooter,
19556
- hasScrollY
19576
+ hasScrollY,
19577
+ hasScrollYRef
19557
19578
  };
19558
19579
  };
19559
19580
  const useInit = (props2, targetColumns) => {
@@ -19948,12 +19969,16 @@ var Component$e = defineComponent({
19948
19969
  wrapperStyle,
19949
19970
  contentStyle,
19950
19971
  headStyle,
19972
+ hasScrollYRef,
19951
19973
  updateBorderClass,
19952
19974
  resetTableHeight,
19953
19975
  getColumnsWidthOffsetWidth,
19954
19976
  hasFooter
19955
19977
  } = useClass(props2, targetColumns, root, reactiveSchema, pageData);
19956
- const tableRender = new TableRender(props2, ctx, reactiveSchema, colgroups);
19978
+ const styleRef = computed(() => ({
19979
+ hasScrollY: hasScrollYRef.value
19980
+ }));
19981
+ const tableRender = new TableRender(props2, ctx, reactiveSchema, colgroups, styleRef);
19957
19982
  const updateOffsetRight = () => {
19958
19983
  const $tableContent = root.value.querySelector(".bk-table-body-content");
19959
19984
  const $table = $tableContent.querySelector("table");
@@ -20170,6 +20195,12 @@ var Component$e = defineComponent({
20170
20195
  const footerStyle = computed(() => ({
20171
20196
  "--footer-height": hasFooter.value ? `${props2.paginationHeihgt}px` : "0"
20172
20197
  }));
20198
+ const fixedContainerStyle = computed(() => {
20199
+ console.log("-x-x", hasScrollYRef.value);
20200
+ return __spreadValues({
20201
+ right: hasScrollYRef.value ? `${SCROLLY_WIDTH}px` : 0
20202
+ }, footerStyle.value);
20203
+ });
20173
20204
  const {
20174
20205
  renderScrollLoading
20175
20206
  } = useScrollLoading(props2, ctx);
@@ -20209,7 +20240,7 @@ var Component$e = defineComponent({
20209
20240
  }),
20210
20241
  createVNode("div", {
20211
20242
  "class": fixedWrapperClass,
20212
- "style": footerStyle.value
20243
+ "style": fixedContainerStyle.value
20213
20244
  }, [renderFixedColumns(reactiveSchema.scrollTranslateX, tableOffsetRight.value), createVNode("div", {
20214
20245
  "class": resizeColumnClass,
20215
20246
  "style": resizeColumnStyle.value