bkui-vue 0.0.1-beta.436 → 0.0.1-beta.438

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
@@ -20438,6 +20438,15 @@ const useClass = (props2, targetColumns, root, reactiveProp, pageData) => {
20438
20438
  [resolveClassName("table-footer")]: true,
20439
20439
  ["is-hidden"]: !props2.pagination || !props2.data.length
20440
20440
  }));
20441
+ const getTableHeight = () => {
20442
+ if (props2.height === "number") {
20443
+ return `${props2.height}px`;
20444
+ }
20445
+ if (typeof props2.height === "string") {
20446
+ return props2.height;
20447
+ }
20448
+ return "";
20449
+ };
20441
20450
  const resolveWidth2 = () => {
20442
20451
  if (resolvedColumns.value.every((col) => /^\d+\.?\d*(px)?$/ig.test(`${col.width}`))) {
20443
20452
  const rectWidth = resolvedColumns.value.reduce((width, col) => width + Number(`${col.width}`.replace(/px/ig, "")), 0);
@@ -20446,11 +20455,12 @@ const useClass = (props2, targetColumns, root, reactiveProp, pageData) => {
20446
20455
  }
20447
20456
  return "100%";
20448
20457
  };
20449
- const wrapperStyle = computed(() => __spreadValues({
20458
+ const wrapperStyle = computed(() => ({
20450
20459
  minHeight: resolveNumberOrStringToPix(props2.minHeight, "auto"),
20451
20460
  width: resolveWidth2(),
20452
- maxWidth: "100%"
20453
- }, typeof props2.height === "number" ? { height: `${props2.height}px` } : null));
20461
+ maxWidth: "100%",
20462
+ height: getTableHeight()
20463
+ }));
20454
20464
  const resolvePropHeight = (height, defaultValue) => {
20455
20465
  const strHeight = String(height);
20456
20466
  if (/^\d+\.?\d*$/.test(strHeight)) {
@@ -20505,7 +20515,7 @@ const useClass = (props2, targetColumns, root, reactiveProp, pageData) => {
20505
20515
  return;
20506
20516
  }
20507
20517
  const querySelector = props2.virtualEnabled ? `.${resolveClassName("virtual-section")}` : `.${resolveClassName("table-body-content")}`;
20508
- const rootBody = root2.querySelector(".bk-table-body");
20518
+ const rootBody = root2.querySelector(`.${resolveClassName("table-body")}`);
20509
20519
  hasScrollY.value = hasRootScrollY(rootBody, querySelector, 0);
20510
20520
  };
20511
20521
  const getColumnsWidthOffsetWidth = () => {