vxe-table 4.3.6-beta.0 → 4.3.7

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.
Files changed (68) hide show
  1. package/es/grid/src/grid.js +15 -5
  2. package/es/header/src/header.js +2 -2
  3. package/es/icon/style/{iconfont.1669214286403.ttf → iconfont.1670947564915.ttf} +0 -0
  4. package/es/icon/style/{iconfont.1669214286403.woff → iconfont.1670947564915.woff} +0 -0
  5. package/es/icon/style/{iconfont.1669214286403.woff2 → iconfont.1670947564915.woff2} +0 -0
  6. package/es/icon/style.css +565 -1
  7. package/es/{iconfont.1669214286403.ttf → iconfont.1670947564915.ttf} +0 -0
  8. package/es/{iconfont.1669214286403.woff → iconfont.1670947564915.woff} +0 -0
  9. package/es/{iconfont.1669214286403.woff2 → iconfont.1670947564915.woff2} +0 -0
  10. package/es/loading/src/loading.js +7 -2
  11. package/es/loading/style.css +1 -1
  12. package/es/style.css +1 -1
  13. package/es/style.min.css +1 -1
  14. package/es/table/src/table.js +4 -1
  15. package/es/table/src/util.js +25 -1
  16. package/es/table/style.css +1 -1
  17. package/es/tools/log.js +1 -1
  18. package/es/v-x-e-table/index.js +1 -1
  19. package/es/v-x-e-table/style.css +564 -1
  20. package/es/vxe-icon/style.css +564 -0
  21. package/es/vxe-loading/style.css +1 -1
  22. package/es/vxe-table/style.css +1 -1
  23. package/lib/grid/src/grid.js +19 -7
  24. package/lib/grid/src/grid.min.js +1 -1
  25. package/lib/header/src/header.js +1 -1
  26. package/lib/header/src/header.min.js +1 -1
  27. package/lib/icon/style/{iconfont.1669214286403.ttf → iconfont.1670947564915.ttf} +0 -0
  28. package/lib/icon/style/{iconfont.1669214286403.woff → iconfont.1670947564915.woff} +0 -0
  29. package/lib/icon/style/{iconfont.1669214286403.woff2 → iconfont.1670947564915.woff2} +0 -0
  30. package/lib/icon/style/style.css +565 -1
  31. package/lib/icon/style/style.min.css +565 -1
  32. package/lib/{iconfont.1669214286403.ttf → iconfont.1670947564915.ttf} +0 -0
  33. package/lib/{iconfont.1669214286403.woff → iconfont.1670947564915.woff} +0 -0
  34. package/lib/{iconfont.1669214286403.woff2 → iconfont.1670947564915.woff2} +0 -0
  35. package/lib/index.umd.js +59 -12
  36. package/lib/index.umd.min.js +1 -1
  37. package/lib/loading/src/loading.js +5 -2
  38. package/lib/loading/src/loading.min.js +1 -1
  39. package/lib/loading/style/style.css +1 -1
  40. package/lib/loading/style/style.min.css +1 -1
  41. package/lib/style.css +1 -1
  42. package/lib/style.min.css +1 -1
  43. package/lib/table/src/table.js +6 -1
  44. package/lib/table/src/table.min.js +1 -1
  45. package/lib/table/src/util.js +27 -2
  46. package/lib/table/src/util.min.js +1 -1
  47. package/lib/table/style/style.css +1 -1
  48. package/lib/table/style/style.min.css +1 -1
  49. package/lib/tools/log.js +1 -1
  50. package/lib/tools/log.min.js +1 -1
  51. package/lib/v-x-e-table/index.js +1 -1
  52. package/lib/v-x-e-table/index.min.js +1 -1
  53. package/lib/v-x-e-table/style/style.css +564 -1
  54. package/lib/v-x-e-table/style/style.min.css +1 -1
  55. package/lib/vxe-icon/style/style.css +564 -0
  56. package/lib/vxe-icon/style/style.min.css +1 -1
  57. package/lib/vxe-loading/style/style.css +1 -1
  58. package/lib/vxe-loading/style/style.min.css +1 -1
  59. package/lib/vxe-table/style/style.css +1 -1
  60. package/lib/vxe-table/style/style.min.css +1 -1
  61. package/package.json +1 -1
  62. package/packages/grid/src/grid.ts +18 -5
  63. package/packages/header/src/header.ts +2 -2
  64. package/packages/loading/src/loading.ts +6 -2
  65. package/packages/table/src/table.ts +4 -1
  66. package/packages/table/src/util.ts +33 -1
  67. package/styles/icon.scss +2 -0
  68. package/styles/loading.scss +2 -1
package/lib/index.umd.js CHANGED
@@ -2260,7 +2260,7 @@ const GlobalConfig = {
2260
2260
  ;// CONCATENATED MODULE: ./packages/tools/log.ts
2261
2261
 
2262
2262
  function getLog(message, params) {
2263
- return `[vxe-table v${"4.3.5"}] ${conf.i18n(message, params)}`;
2263
+ return `[vxe-table v${"4.3.7"}] ${conf.i18n(message, params)}`;
2264
2264
  }
2265
2265
  function outLog(type) {
2266
2266
  return function (message, params) {
@@ -2813,7 +2813,37 @@ function getCellValue(row, column) {
2813
2813
  function setCellValue(row, column, value) {
2814
2814
  return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().set(row, column.field, value);
2815
2815
  }
2816
- function getColMinWidth(params) {
2816
+ /**
2817
+ * 列宽拖动最大宽度
2818
+ * @param params
2819
+ * @returns
2820
+ */
2821
+ function getColReMaxWidth(params) {
2822
+ const {
2823
+ $table
2824
+ } = params;
2825
+ const {
2826
+ computeResizableOpts
2827
+ } = $table.getComputeMaps();
2828
+ const resizableOpts = computeResizableOpts.value;
2829
+ const {
2830
+ maxWidth: reMaxWidth
2831
+ } = resizableOpts;
2832
+ // 如果自定义调整宽度逻辑
2833
+ if (reMaxWidth) {
2834
+ const customMaxWidth = XEUtils.isFunction(reMaxWidth) ? reMaxWidth(params) : reMaxWidth;
2835
+ if (customMaxWidth !== 'auto') {
2836
+ return Math.max(1, XEUtils.toNumber(customMaxWidth));
2837
+ }
2838
+ }
2839
+ return -1;
2840
+ }
2841
+ /**
2842
+ * 列宽拖动最小宽度
2843
+ * @param params
2844
+ * @returns
2845
+ */
2846
+ function getColReMinWidth(params) {
2817
2847
  const {
2818
2848
  $table,
2819
2849
  column,
@@ -4027,7 +4057,7 @@ const config = new VXETableConfig();
4027
4057
  const v = 'v4';
4028
4058
  const VXETable = {
4029
4059
  v,
4030
- version: "4.3.5",
4060
+ version: "4.3.7",
4031
4061
  setup: setup,
4032
4062
  interceptor: interceptor,
4033
4063
  renderer: renderer,
@@ -6719,7 +6749,9 @@ function useSize(props) {
6719
6749
  icon: String,
6720
6750
  text: String
6721
6751
  },
6722
- setup(props) {
6752
+ setup(props, {
6753
+ slots
6754
+ }) {
6723
6755
  const computeLoadingIcon = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
6724
6756
  return props.icon || conf.icon.LOADING;
6725
6757
  });
@@ -6734,7 +6766,9 @@ function useSize(props) {
6734
6766
  class: ['vxe-loading', {
6735
6767
  'is--visible': props.modelValue
6736
6768
  }]
6737
- }, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
6769
+ }, slots.default ? [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
6770
+ class: 'vxe-loading--warpper'
6771
+ }, slots.default({}))] : [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
6738
6772
  class: 'vxe-loading--chunk'
6739
6773
  }, [loadingIcon ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('i', {
6740
6774
  class: loadingIcon
@@ -16540,7 +16574,9 @@ const gridComponentEmits = [...emits, 'page-change', 'form-submit', 'form-submit
16540
16574
  methodKeys.forEach(name => {
16541
16575
  funcs[name] = (...args) => {
16542
16576
  const $xetable = refTable.value;
16543
- return $xetable && $xetable[name](...args);
16577
+ if ($xetable && $xetable[name]) {
16578
+ return $xetable[name](...args);
16579
+ }
16544
16580
  };
16545
16581
  });
16546
16582
  return funcs;
@@ -16549,7 +16585,9 @@ const gridComponentEmits = [...emits, 'page-change', 'form-submit', 'form-submit
16549
16585
  tableComponentMethodKeys.forEach(name => {
16550
16586
  gridExtendTableMethods[name] = (...args) => {
16551
16587
  const $xetable = refTable.value;
16552
- return $xetable && $xetable[name](...args);
16588
+ if ($xetable && $xetable[name]) {
16589
+ return $xetable && $xetable[name](...args);
16590
+ }
16553
16591
  };
16554
16592
  });
16555
16593
  const computeProxyOpts = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
@@ -17039,6 +17077,7 @@ const gridComponentEmits = [...emits, 'page-change', 'form-submit', 'form-submit
17039
17077
  const proxyOpts = computeProxyOpts.value;
17040
17078
  const tableOns = Object.assign({}, tableCompEvents);
17041
17079
  const emptySlot = slots.empty;
17080
+ const loadingSlot = slots.loading;
17042
17081
  if (proxyConfig) {
17043
17082
  if (proxyOpts.sort) {
17044
17083
  tableOns.onSortChange = sortChangeEvent;
@@ -17047,13 +17086,18 @@ const gridComponentEmits = [...emits, 'page-change', 'form-submit', 'form-submit
17047
17086
  tableOns.onFilterChange = filterChangeEvent;
17048
17087
  }
17049
17088
  }
17089
+ const slotObj = {};
17090
+ if (emptySlot) {
17091
+ slotObj.empty = () => emptySlot({});
17092
+ }
17093
+ if (loadingSlot) {
17094
+ slotObj.loading = () => loadingSlot({});
17095
+ }
17050
17096
  return [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)((0,external_commonjs_vue_commonjs2_vue_root_Vue_.resolveComponent)('vxe-table'), {
17051
17097
  ref: refTable,
17052
17098
  ...tableProps,
17053
17099
  ...tableOns
17054
- }, emptySlot ? {
17055
- empty: () => emptySlot({})
17056
- } : {})];
17100
+ }, slotObj)];
17057
17101
  };
17058
17102
  /**
17059
17103
  * 渲染表格底部区域
@@ -23765,7 +23809,7 @@ const header_renderType = 'header';
23765
23809
  const pos = getOffsetPos(dragBtnElem, wrapperElem);
23766
23810
  const dragBtnWidth = dragBtnElem.clientWidth;
23767
23811
  const dragBtnOffsetWidth = Math.floor(dragBtnWidth / 2);
23768
- const minInterval = getColMinWidth(params) - dragBtnOffsetWidth; // 列之间的最小间距
23812
+ const minInterval = getColReMinWidth(params) - dragBtnOffsetWidth; // 列之间的最小间距
23769
23813
  let dragMinLeft = pos.left - cell.clientWidth + dragBtnWidth + minInterval;
23770
23814
  let dragPosLeft = pos.left + dragBtnOffsetWidth;
23771
23815
  const domMousemove = document.onmousemove;
@@ -31415,6 +31459,7 @@ const visibleStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_VISIBLE';
31415
31459
  leftList,
31416
31460
  rightList
31417
31461
  } = columnStore;
31462
+ const loadingSlot = slots.loading;
31418
31463
  const tipConfig = computeTipConfig.value;
31419
31464
  const treeOpts = computeTreeOpts.value;
31420
31465
  const rowOpts = computeRowOpts.value;
@@ -31532,7 +31577,9 @@ const visibleStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_VISIBLE';
31532
31577
  modelValue: loading,
31533
31578
  icon: loadingOpts.icon,
31534
31579
  text: loadingOpts.text
31535
- }),
31580
+ }, loadingSlot ? {
31581
+ default: () => loadingSlot({})
31582
+ } : {}),
31536
31583
  /**
31537
31584
  * 筛选
31538
31585
  */