vxe-table 4.23.14 → 4.23.15

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.
@@ -1,4 +1,4 @@
1
- import { PropType } from 'vue';
1
+ import { PropType, VNode } from 'vue';
2
2
  import type { VxeTableDefines } from '../../../types';
3
3
  declare const _default: import("vue").DefineComponent<{
4
4
  tableData: PropType<any[]>;
@@ -9,7 +9,7 @@ declare const _default: import("vue").DefineComponent<{
9
9
  type: PropType<"right" | "left" | "">;
10
10
  default: null;
11
11
  };
12
- }, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
12
+ }, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
13
13
  [key: string]: any;
14
14
  }>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
15
15
  tableData: PropType<any[]>;
@@ -283,7 +283,12 @@ var header_default = (
283
283
  const flCompConf = isEnableConf(filterRender) && filterRender.name ? rendererOpts[filterRender.name] || renderer.get(filterRender.name) : null;
284
284
  const rtFloatingFilter = flCompConf ? flCompConf.renderTableFloatingFilter : null;
285
285
  const fixedHiddenColumn = overflowX && (fixedType ? column.fixed !== fixedType : !!column.fixed);
286
- const isPadding = XEUtils.isBoolean(headerCellOpts.padding) ? headerCellOpts.padding : cellOpts.padding;
286
+ const cellPadding = getDefaultConfig(headerCellOpts.padding, cellOpts.padding);
287
+ const isAllCellPadding = cellPadding === true;
288
+ const isCellPaddingTop = cellPadding ? isAllCellPadding || cellPadding.top !== false : false;
289
+ const isCellPaddingBottom = cellPadding ? isAllCellPadding || cellPadding.bottom !== false : false;
290
+ const isCellPaddingLeft = cellPadding ? isAllCellPadding || cellPadding.left !== false : false;
291
+ const isCellPaddingRight = cellPadding ? isAllCellPadding || cellPadding.right !== false : false;
287
292
  const headOverflow = XEUtils.eqNull(showHeaderOverflow) ? allColumnHeaderOverflow : showHeaderOverflow;
288
293
  const headAlign = headerAlign || (compConf ? compConf.tableHeaderCellAlign : "") || allHeaderAlign || align || (compConf ? compConf.tableCellAlign : "") || allAlign;
289
294
  const showEllipsis = headOverflow === "ellipsis";
@@ -338,8 +343,13 @@ var header_default = (
338
343
  "col--fixed": column.fixed,
339
344
  "col--ellipsis": hasEllipsis,
340
345
  "fixed--width": !isAutoCellWidth,
341
- "is--padding": isPadding,
346
+ "is--pg-top": isCellPaddingTop,
347
+ "is--pg-bottom": isCellPaddingBottom,
348
+ "is--pg-left": isCellPaddingLeft,
349
+ "is--pg-right": isCellPaddingRight,
342
350
  "is--sortable": column.sortable,
351
+ "col--filter": !!filters,
352
+ "is--filter-active": hasFilter,
343
353
  "col--current": currColFlag && currentCol === column
344
354
  }
345
355
  ],
@@ -380,28 +390,33 @@ var header_default = (
380
390
  const { fixedType } = props;
381
391
  const { headerRowClassName, headerRowStyle } = tableProps;
382
392
  const floatingFilterOpts = computeFloatingFilterOpts.value;
383
- const rowVNs = headerGroups.map((cols, _rowIndex) => {
393
+ const isFFEnabled = floatingFilterOpts.enabled;
394
+ const isFFTop = floatingFilterOpts.position === "top";
395
+ const rowVNs = [];
396
+ if (isFFEnabled && isFFTop) {
397
+ rowVNs.push(
398
+ h("tr", {
399
+ key: "fft",
400
+ class: ["vxe-header--row is--floating-filters", "" + (floatingFilterOpts.rowClassName || "")]
401
+ }, renderFilterRows(isOptimizeMode, renderColumnList))
402
+ );
403
+ }
404
+ headerGroups.forEach((cols, _rowIndex) => {
384
405
  const params = { $table: $xeTable, rowIndex: _rowIndex, _rowIndex, $rowIndex: _rowIndex, fixed: fixedType, type: renderType };
385
- return h(
386
- "tr",
387
- {
406
+ rowVNs.push(
407
+ h("tr", {
388
408
  key: _rowIndex,
389
409
  class: ["vxe-header--row", headerRowClassName ? XEUtils.isFunction(headerRowClassName) ? headerRowClassName(params) : headerRowClassName : ""],
390
410
  style: headerRowStyle ? XEUtils.isFunction(headerRowStyle) ? headerRowStyle(params) : headerRowStyle : null
391
- },
392
- renderRows(isGroup, isOptimizeMode, headerGroups, _rowIndex, cols)
411
+ }, renderRows(isGroup, isOptimizeMode, headerGroups, _rowIndex, cols))
393
412
  );
394
413
  });
395
- if (floatingFilterOpts.enabled) {
414
+ if (isFFEnabled && !isFFTop) {
396
415
  rowVNs.push(
397
- h(
398
- "tr",
399
- {
400
- key: "ff",
401
- class: ["vxe-header--row is--floating-filters", "" + (floatingFilterOpts.rowClassName || "")]
402
- },
403
- renderFilterRows(isOptimizeMode, renderColumnList)
404
- )
416
+ h("tr", {
417
+ key: "ffb",
418
+ class: ["vxe-header--row is--floating-filters", "" + (floatingFilterOpts.rowClassName || "")]
419
+ }, renderFilterRows(isOptimizeMode, renderColumnList))
405
420
  );
406
421
  }
407
422
  return rowVNs;
package/es/ui/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { VxeUI } from "@vxe-ui/core";
2
2
  import { getFuncText } from "./src/utils";
3
- const version = "4.23.14";
3
+ const version = "4.23.15";
4
4
  VxeUI.version = version;
5
5
  VxeUI.tableVersion = version;
6
6
  VxeUI.setConfig({
@@ -167,7 +167,8 @@ VxeUI.setConfig({
167
167
  maxHeight: 320
168
168
  },
169
169
  floatingFilterConfig: {
170
- // enabled: false
170
+ // enabled: false,
171
+ padding: true
171
172
  },
172
173
  aggregateConfig: {
173
174
  padding: true,
package/es/ui/src/log.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { VxeUI } from "@vxe-ui/core";
2
2
  const { log } = VxeUI;
3
- const tableVersion = `table v${"4.23.14"}`;
3
+ const tableVersion = `table v${"4.23.15"}`;
4
4
  function createComponentLog(name) {
5
5
  const uiVersion = VxeUI.uiVersion ? `ui v${VxeUI.uiVersion}` : "";
6
6
  const ganttVersion = VxeUI.ganttVersion ? `gantt v${VxeUI.ganttVersion}` : "";
package/lib/index.umd.js CHANGED
@@ -318,7 +318,7 @@ function getDefaultConfig(val1, def1) {
318
318
  }
319
319
 
320
320
  // packages_temp/ui/index.ts
321
- var version = "4.23.14";
321
+ var version = "4.23.15";
322
322
  import_core2.VxeUI.version = version;
323
323
  import_core2.VxeUI.tableVersion = version;
324
324
  import_core2.VxeUI.setConfig({
@@ -485,7 +485,8 @@ import_core2.VxeUI.setConfig({
485
485
  maxHeight: 320
486
486
  },
487
487
  floatingFilterConfig: {
488
- // enabled: false
488
+ // enabled: false,
489
+ padding: true
489
490
  },
490
491
  aggregateConfig: {
491
492
  padding: true,
@@ -1147,7 +1148,7 @@ function getPopupAppendElement(appendTo) {
1147
1148
  // packages_temp/ui/src/log.ts
1148
1149
  var import_core3 = require("@vxe-ui/core");
1149
1150
  var { log } = import_core3.VxeUI;
1150
- var tableVersion = `table v${"4.23.14"}`;
1151
+ var tableVersion = `table v${"4.23.15"}`;
1151
1152
  function createComponentLog(name) {
1152
1153
  const uiVersion = import_core3.VxeUI.uiVersion ? `ui v${import_core3.VxeUI.uiVersion}` : "";
1153
1154
  const ganttVersion = import_core3.VxeUI.ganttVersion ? `gantt v${import_core3.VxeUI.ganttVersion}` : "";
@@ -5981,7 +5982,12 @@ var header_default = (
5981
5982
  const flCompConf = isEnableConf(filterRender) && filterRender.name ? rendererOpts[filterRender.name] || renderer4.get(filterRender.name) : null;
5982
5983
  const rtFloatingFilter = flCompConf ? flCompConf.renderTableFloatingFilter : null;
5983
5984
  const fixedHiddenColumn = overflowX && (fixedType ? column.fixed !== fixedType : !!column.fixed);
5984
- const isPadding = import_xe_utils9.default.isBoolean(headerCellOpts.padding) ? headerCellOpts.padding : cellOpts.padding;
5985
+ const cellPadding = getDefaultConfig(headerCellOpts.padding, cellOpts.padding);
5986
+ const isAllCellPadding = cellPadding === true;
5987
+ const isCellPaddingTop = cellPadding ? isAllCellPadding || cellPadding.top !== false : false;
5988
+ const isCellPaddingBottom = cellPadding ? isAllCellPadding || cellPadding.bottom !== false : false;
5989
+ const isCellPaddingLeft = cellPadding ? isAllCellPadding || cellPadding.left !== false : false;
5990
+ const isCellPaddingRight = cellPadding ? isAllCellPadding || cellPadding.right !== false : false;
5985
5991
  const headOverflow = import_xe_utils9.default.eqNull(showHeaderOverflow) ? allColumnHeaderOverflow : showHeaderOverflow;
5986
5992
  const headAlign = headerAlign || (compConf ? compConf.tableHeaderCellAlign : "") || allHeaderAlign || align || (compConf ? compConf.tableCellAlign : "") || allAlign;
5987
5993
  const showEllipsis = headOverflow === "ellipsis";
@@ -6036,8 +6042,13 @@ var header_default = (
6036
6042
  "col--fixed": column.fixed,
6037
6043
  "col--ellipsis": hasEllipsis,
6038
6044
  "fixed--width": !isAutoCellWidth,
6039
- "is--padding": isPadding,
6045
+ "is--pg-top": isCellPaddingTop,
6046
+ "is--pg-bottom": isCellPaddingBottom,
6047
+ "is--pg-left": isCellPaddingLeft,
6048
+ "is--pg-right": isCellPaddingRight,
6040
6049
  "is--sortable": column.sortable,
6050
+ "col--filter": !!filters,
6051
+ "is--filter-active": hasFilter,
6041
6052
  "col--current": currColFlag && currentCol === column
6042
6053
  }
6043
6054
  ],
@@ -6078,28 +6089,33 @@ var header_default = (
6078
6089
  const { fixedType } = props;
6079
6090
  const { headerRowClassName, headerRowStyle } = tableProps;
6080
6091
  const floatingFilterOpts = computeFloatingFilterOpts.value;
6081
- const rowVNs = headerGroups.map((cols, _rowIndex) => {
6092
+ const isFFEnabled = floatingFilterOpts.enabled;
6093
+ const isFFTop = floatingFilterOpts.position === "top";
6094
+ const rowVNs = [];
6095
+ if (isFFEnabled && isFFTop) {
6096
+ rowVNs.push(
6097
+ (0, import_vue8.h)("tr", {
6098
+ key: "fft",
6099
+ class: ["vxe-header--row is--floating-filters", "" + (floatingFilterOpts.rowClassName || "")]
6100
+ }, renderFilterRows(isOptimizeMode, renderColumnList))
6101
+ );
6102
+ }
6103
+ headerGroups.forEach((cols, _rowIndex) => {
6082
6104
  const params = { $table: $xeTable, rowIndex: _rowIndex, _rowIndex, $rowIndex: _rowIndex, fixed: fixedType, type: renderType2 };
6083
- return (0, import_vue8.h)(
6084
- "tr",
6085
- {
6105
+ rowVNs.push(
6106
+ (0, import_vue8.h)("tr", {
6086
6107
  key: _rowIndex,
6087
6108
  class: ["vxe-header--row", headerRowClassName ? import_xe_utils9.default.isFunction(headerRowClassName) ? headerRowClassName(params) : headerRowClassName : ""],
6088
6109
  style: headerRowStyle ? import_xe_utils9.default.isFunction(headerRowStyle) ? headerRowStyle(params) : headerRowStyle : null
6089
- },
6090
- renderRows(isGroup, isOptimizeMode, headerGroups, _rowIndex, cols)
6110
+ }, renderRows(isGroup, isOptimizeMode, headerGroups, _rowIndex, cols))
6091
6111
  );
6092
6112
  });
6093
- if (floatingFilterOpts.enabled) {
6113
+ if (isFFEnabled && !isFFTop) {
6094
6114
  rowVNs.push(
6095
- (0, import_vue8.h)(
6096
- "tr",
6097
- {
6098
- key: "ff",
6099
- class: ["vxe-header--row is--floating-filters", "" + (floatingFilterOpts.rowClassName || "")]
6100
- },
6101
- renderFilterRows(isOptimizeMode, renderColumnList)
6102
- )
6115
+ (0, import_vue8.h)("tr", {
6116
+ key: "ffb",
6117
+ class: ["vxe-header--row is--floating-filters", "" + (floatingFilterOpts.rowClassName || "")]
6118
+ }, renderFilterRows(isOptimizeMode, renderColumnList))
6103
6119
  );
6104
6120
  }
6105
6121
  return rowVNs;