vxe-table 4.11.10 → 4.11.11

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.
@@ -2172,16 +2172,10 @@ var _default = exports.default = (0, _vue.defineComponent)({
2172
2172
  if (layout === 'header') {
2173
2173
  // 表头体样式处理
2174
2174
  // 横向滚动渲染
2175
- let tWidth = tableWidth;
2176
2175
  let renderColumnList = tableColumn;
2177
2176
  let isOptimizeMode = false;
2178
2177
  if (isGroup) {
2179
2178
  renderColumnList = visibleColumn;
2180
- if (fixedType) {
2181
- if (wrapperElem) {
2182
- wrapperElem.style.width = tWidth ? `${tWidth}px` : '';
2183
- }
2184
- }
2185
2179
  } else {
2186
2180
  // 如果是使用优化模式
2187
2181
  if (scrollXLoad || scrollYLoad || allColumnHeaderOverflow) {
@@ -2197,24 +2191,32 @@ var _default = exports.default = (0, _vue.defineComponent)({
2197
2191
  if (isOptimizeMode) {
2198
2192
  renderColumnList = fixedColumn || [];
2199
2193
  }
2200
- if (!isOptimizeMode) {
2194
+ }
2195
+ }
2196
+ const tWidth = renderColumnList.reduce((previous, column) => previous + column.renderWidth, 0);
2197
+ if (fixedType) {
2198
+ if (isGroup) {
2199
+ if (wrapperElem) {
2200
+ wrapperElem.style.width = tableWidth ? `${tableWidth}px` : '';
2201
+ }
2202
+ } else {
2203
+ if (isOptimizeMode) {
2201
2204
  if (wrapperElem) {
2202
2205
  wrapperElem.style.width = tWidth ? `${tWidth}px` : '';
2203
2206
  }
2207
+ } else {
2208
+ if (wrapperElem) {
2209
+ wrapperElem.style.width = tableWidth ? `${tableWidth}px` : '';
2210
+ }
2204
2211
  }
2205
2212
  }
2206
2213
  }
2207
- tWidth = renderColumnList.reduce((previous, column) => previous + column.renderWidth, 0);
2208
2214
  if (currScrollElem) {
2209
2215
  currScrollElem.style.height = `${headerHeight}px`;
2210
2216
  }
2211
2217
  if (tableElem) {
2212
2218
  tableElem.style.width = tWidth ? `${tWidth}px` : '';
2213
2219
  }
2214
- const repairElem = (0, _util.getRefElem)(elemStore[`${name}-${layout}-repair`]);
2215
- if (repairElem) {
2216
- repairElem.style.width = `${tableWidth}px`;
2217
- }
2218
2220
  const listElem = (0, _util.getRefElem)(elemStore[`${name}-${layout}-list`]);
2219
2221
  if (isGroup && listElem) {
2220
2222
  _xeUtils.default.arrayEach(listElem.querySelectorAll('.col--group'), thElem => {
@@ -2259,7 +2261,6 @@ var _default = exports.default = (0, _vue.defineComponent)({
2259
2261
  fixedWrapperElem.style.height = `${customHeight > 0 ? customHeight : tableHeight + headerHeight + footerHeight + osbHeight}px`;
2260
2262
  fixedWrapperElem.style.width = `${fixedColumn.reduce((previous, column) => previous + column.renderWidth, 0)}px`;
2261
2263
  }
2262
- let tWidth = tableWidth;
2263
2264
  let renderColumnList = tableColumn;
2264
2265
  let isOptimizeMode = false;
2265
2266
  // 如果是使用优化模式
@@ -2275,13 +2276,19 @@ var _default = exports.default = (0, _vue.defineComponent)({
2275
2276
  if (isOptimizeMode) {
2276
2277
  renderColumnList = fixedColumn || [];
2277
2278
  }
2278
- if (!isOptimizeMode) {
2279
+ }
2280
+ const tWidth = renderColumnList.reduce((previous, column) => previous + column.renderWidth, 0);
2281
+ if (fixedType) {
2282
+ if (isOptimizeMode) {
2279
2283
  if (wrapperElem) {
2280
2284
  wrapperElem.style.width = tWidth ? `${tWidth}px` : '';
2281
2285
  }
2286
+ } else {
2287
+ if (wrapperElem) {
2288
+ wrapperElem.style.width = tableWidth ? `${tableWidth}px` : '';
2289
+ }
2282
2290
  }
2283
2291
  }
2284
- tWidth = renderColumnList.reduce((previous, column) => previous + column.renderWidth, 0);
2285
2292
  if (tableElem) {
2286
2293
  tableElem.style.width = tWidth ? `${tWidth}px` : '';
2287
2294
  // 兼容性处理
@@ -2292,7 +2299,6 @@ var _default = exports.default = (0, _vue.defineComponent)({
2292
2299
  emptyBlockElem.style.width = tWidth ? `${tWidth}px` : '';
2293
2300
  }
2294
2301
  } else if (layout === 'footer') {
2295
- let tWidth = tableWidth;
2296
2302
  let renderColumnList = tableColumn;
2297
2303
  let isOptimizeMode = false;
2298
2304
  // 如果是使用优化模式
@@ -2308,13 +2314,19 @@ var _default = exports.default = (0, _vue.defineComponent)({
2308
2314
  if (isOptimizeMode) {
2309
2315
  renderColumnList = fixedColumn || [];
2310
2316
  }
2311
- if (!isOptimizeMode) {
2317
+ }
2318
+ const tWidth = renderColumnList.reduce((previous, column) => previous + column.renderWidth, 0);
2319
+ if (fixedType) {
2320
+ if (isOptimizeMode) {
2312
2321
  if (wrapperElem) {
2313
2322
  wrapperElem.style.width = tWidth ? `${tWidth}px` : '';
2314
2323
  }
2324
+ } else {
2325
+ if (wrapperElem) {
2326
+ wrapperElem.style.width = tableWidth ? `${tableWidth}px` : '';
2327
+ }
2315
2328
  }
2316
2329
  }
2317
- tWidth = renderColumnList.reduce((previous, column) => previous + column.renderWidth, 0);
2318
2330
  if (currScrollElem) {
2319
2331
  currScrollElem.style.height = `${footerHeight}px`;
2320
2332
  // 如果是固定列