bkui-vue 0.0.1-beta.350 → 0.0.1-beta.352

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
@@ -17154,6 +17154,9 @@ const resolveColumnWidth = (root, colgroups, autoWidth = COL_MIN_WIDTH, offsetWi
17154
17154
  minWidth = void 0
17155
17155
  } = col;
17156
17156
  if (minWidth === void 0) {
17157
+ if (computedWidth < COL_MIN_WIDTH) {
17158
+ return COL_MIN_WIDTH;
17159
+ }
17157
17160
  return computedWidth;
17158
17161
  }
17159
17162
  let calcMinWidth = computedWidth;
@@ -17216,6 +17219,13 @@ const resolveColumnWidth = (root, colgroups, autoWidth = COL_MIN_WIDTH, offsetWi
17216
17219
  } = colgroups[idx];
17217
17220
  avgWidth = avgWidth - calcWidth;
17218
17221
  });
17222
+ } else {
17223
+ avgColIndexList.forEach((idx) => {
17224
+ const calcWidth = getMinWidth(colgroups[idx], COL_MIN_WIDTH);
17225
+ Object.assign(colgroups[idx], {
17226
+ calcWidth
17227
+ });
17228
+ });
17219
17229
  }
17220
17230
  }
17221
17231
  };
@@ -17795,6 +17805,7 @@ var Settings = defineComponent({
17795
17805
  const checkedFields = ref(localSettings.value.checked || []);
17796
17806
  const className = resolveClassName("table-settings");
17797
17807
  const theme = `light ${className}`;
17808
+ const renderFields = computed(() => localSettings.value.fields || props2.columns || []);
17798
17809
  const cachedValue = {
17799
17810
  checkAll: checkAll.value,
17800
17811
  activeSize: activeSize.value,
@@ -17811,7 +17822,8 @@ var Settings = defineComponent({
17811
17822
  emit("change", {
17812
17823
  checked: checkedFields.value,
17813
17824
  size: activeSize.value,
17814
- height: activeHeight.value
17825
+ height: activeHeight.value,
17826
+ fields: unref(renderFields)
17815
17827
  });
17816
17828
  isShow.value = false;
17817
17829
  };
@@ -17862,7 +17874,6 @@ var Settings = defineComponent({
17862
17874
  "class": getItemClass(item),
17863
17875
  "onClick": () => handleSizeItemClick(item)
17864
17876
  }, [item.label]));
17865
- const renderFields = computed(() => localSettings.value.fields || props2.columns || []);
17866
17877
  const indeterminate = computed(() => checkedFields.value.length > 0 && !renderFields.value.every((field, index) => checkedFields.value.includes(resolvePropVal(field, "field", [field, index]))));
17867
17878
  const showLineHeight = computed(() => typeof localSettings.value.showLineHeight === "boolean" ? localSettings.value.showLineHeight : true);
17868
17879
  watch(() => [checkedFields.value], () => {
@@ -18846,10 +18857,10 @@ const useInit = (props2, targetColumns) => {
18846
18857
  }
18847
18858
  return minWidth;
18848
18859
  };
18849
- const updateColGroups = () => {
18860
+ const updateColGroups = (settings) => {
18850
18861
  var _a2, _b2;
18851
- const checked = ((_a2 = props2.settings) == null ? void 0 : _a2.checked) || [];
18852
- const settingFields = ((_b2 = props2.settings) == null ? void 0 : _b2.fields) || [];
18862
+ const checked = (settings == null ? void 0 : settings.checked) || ((_a2 = props2.settings) == null ? void 0 : _a2.checked) || [];
18863
+ const settingFields = (settings == null ? void 0 : settings.fields) || ((_b2 = props2.settings) == null ? void 0 : _b2.fields) || [];
18853
18864
  colgroups.splice(0, colgroups.length, ...getColumns().map((col) => __spreadProps(__spreadValues({}, col), {
18854
18865
  calcWidth: null,
18855
18866
  resizeWidth: null,
@@ -19159,7 +19170,8 @@ var Component$e = defineComponent({
19159
19170
  toggleAllSelection,
19160
19171
  toggleRowSelection,
19161
19172
  getSelection,
19162
- clearSort
19173
+ clearSort,
19174
+ updateColGroups
19163
19175
  } = useInit(props2, targetColumns);
19164
19176
  const {
19165
19177
  pageData,
@@ -19249,10 +19261,15 @@ var Component$e = defineComponent({
19249
19261
  const {
19250
19262
  checked = [],
19251
19263
  size,
19252
- height
19264
+ height,
19265
+ fields
19253
19266
  } = args;
19254
19267
  nextTick(() => {
19255
19268
  var _a, _b;
19269
+ updateColGroups({
19270
+ checked,
19271
+ fields
19272
+ });
19256
19273
  updateBorderClass(root.value);
19257
19274
  const offset2 = getColumnsWidthOffsetWidth();
19258
19275
  checked.length && resolveColumnWidth(root.value, colgroups, COL_MIN_WIDTH, offset2);
@@ -19260,7 +19277,8 @@ var Component$e = defineComponent({
19260
19277
  ctx.emit(EMIT_EVENTS.SETTING_CHANGE, {
19261
19278
  checked,
19262
19279
  size,
19263
- height
19280
+ height,
19281
+ fields
19264
19282
  });
19265
19283
  });
19266
19284
  }).on(EVENTS$1.ON_ROW_EXPAND_CLICK, (args) => {
@@ -20500,11 +20518,11 @@ var bkDivider = defineComponent({
20500
20518
  let slots;
20501
20519
  if (this.$slots.default) {
20502
20520
  slots = createVNode("div", {
20503
- "class": ["bk-divider-info", `bk-divider-info-${this.align}`]
20521
+ "class": [resolveClassName("divider-info"), resolveClassName(`divider-info-${this.align}`)]
20504
20522
  }, [this.$slots.default()]);
20505
20523
  }
20506
20524
  return createVNode("div", {
20507
- "class": ["bk-divider", `bk-divider-${this.direction}`],
20525
+ "class": [resolveClassName("divider"), resolveClassName(`divider-${this.direction}`)],
20508
20526
  "style": styles()
20509
20527
  }, [slots]);
20510
20528
  }