vxe-table 3.8.6-beta.0 → 3.8.6-beta.2

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 (56) hide show
  1. package/lib/all.js +4 -0
  2. package/lib/all.min.js +1 -1
  3. package/lib/custom/src/panel.js +15 -1
  4. package/lib/custom/src/panel.min.js +1 -1
  5. package/lib/export/style/style.css +1 -0
  6. package/lib/export/style/style.min.css +1 -1
  7. package/lib/icon/style/style.css +1 -1
  8. package/lib/icon/style/style.min.css +1 -1
  9. package/lib/index.css +1 -1
  10. package/lib/index.umd.js +61 -16
  11. package/lib/index.umd.min.js +1 -1
  12. package/lib/input/src/input.js +1 -0
  13. package/lib/input/src/input.min.js +1 -1
  14. package/lib/style.css +1 -1
  15. package/lib/style.min.css +1 -1
  16. package/lib/table/src/body.js +4 -2
  17. package/lib/table/src/body.min.js +1 -1
  18. package/lib/table/src/methods.js +8 -5
  19. package/lib/table/src/methods.min.js +1 -1
  20. package/lib/table/style/style.css +10 -0
  21. package/lib/table/style/style.min.css +1 -1
  22. package/lib/tools/dom.js +2 -4
  23. package/lib/tools/dom.min.js +1 -1
  24. package/lib/tools/log.js +1 -1
  25. package/lib/tools/log.min.js +1 -1
  26. package/lib/v-x-e-table/index.js +3 -1
  27. package/lib/v-x-e-table/index.min.js +1 -1
  28. package/lib/v-x-e-table/src/conf.js +1 -0
  29. package/lib/v-x-e-table/src/conf.min.js +1 -1
  30. package/lib/v-x-e-table/src/config.js +8 -2
  31. package/lib/v-x-e-table/src/config.min.js +1 -1
  32. package/lib/v-x-e-table/src/theme.js +17 -0
  33. package/lib/v-x-e-table/src/theme.min.js +1 -0
  34. package/lib/vxe-table/style/style.css +10 -0
  35. package/lib/vxe-table/style/style.min.css +1 -1
  36. package/lib/vxe-table-export-module/style/style.css +1 -0
  37. package/lib/vxe-table-export-module/style/style.min.css +1 -1
  38. package/package.json +1 -1
  39. package/packages/all.js +4 -0
  40. package/packages/custom/src/panel.js +14 -1
  41. package/packages/input/src/input.js +1 -0
  42. package/packages/table/src/body.js +3 -2
  43. package/packages/table/src/methods.js +8 -6
  44. package/packages/tools/dom.js +2 -4
  45. package/packages/v-x-e-table/index.js +3 -0
  46. package/packages/v-x-e-table/src/conf.js +1 -0
  47. package/packages/v-x-e-table/src/config.js +8 -2
  48. package/packages/v-x-e-table/src/theme.js +11 -0
  49. package/styles/export.scss +1 -0
  50. package/styles/table.scss +8 -0
  51. /package/lib/icon/style/{iconfont.1715127150277.ttf → iconfont.1715243520903.ttf} +0 -0
  52. /package/lib/icon/style/{iconfont.1715127150277.woff → iconfont.1715243520903.woff} +0 -0
  53. /package/lib/icon/style/{iconfont.1715127150277.woff2 → iconfont.1715243520903.woff2} +0 -0
  54. /package/lib/{iconfont.1715127150277.ttf → iconfont.1715243520903.ttf} +0 -0
  55. /package/lib/{iconfont.1715127150277.woff → iconfont.1715243520903.woff} +0 -0
  56. /package/lib/{iconfont.1715127150277.woff2 → iconfont.1715243520903.woff2} +0 -0
package/lib/index.umd.js CHANGED
@@ -11073,6 +11073,7 @@ var iconPrefix = 'vxe-icon-';
11073
11073
  isEsc: true
11074
11074
  },
11075
11075
  areaConfig: {
11076
+ autoClear: true,
11076
11077
  selectCellByHeader: true
11077
11078
  },
11078
11079
  clipConfig: {
@@ -11346,7 +11347,7 @@ var es_array_concat = __webpack_require__(8706);
11346
11347
 
11347
11348
 
11348
11349
  function getLog(message, params) {
11349
- return "[vxe-table v".concat("3.8.6-beta.0", "] ").concat(conf.i18n(message, params));
11350
+ return "[vxe-table v".concat("3.8.6-beta.2", "] ").concat(conf.i18n(message, params));
11350
11351
  }
11351
11352
  function outLog(type) {
11352
11353
  return function (message, params) {
@@ -12954,17 +12955,34 @@ var Store = /*#__PURE__*/function () {
12954
12955
 
12955
12956
  var validators = new store();
12956
12957
  if (false) {}
12958
+ ;// CONCATENATED MODULE: ./packages/v-x-e-table/src/theme.js
12959
+
12960
+ function setTheme(options) {
12961
+ var theme = (options ? options.theme : null) || conf.theme || 'default';
12962
+ if (typeof document !== 'undefined') {
12963
+ var documentElement = document.documentElement;
12964
+ if (documentElement) {
12965
+ documentElement.setAttribute('data-vxe-table-theme', theme);
12966
+ }
12967
+ }
12968
+ }
12957
12969
  ;// CONCATENATED MODULE: ./packages/v-x-e-table/src/config.js
12958
12970
 
12959
12971
 
12960
12972
 
12961
12973
 
12974
+
12962
12975
  /**
12963
12976
  * 全局参数设置
12964
12977
  */
12965
12978
  function config(options) {
12966
- if (options && options.zIndex) {
12967
- index_esm.setCurrent(options.zIndex);
12979
+ if (options) {
12980
+ if (options.theme) {
12981
+ setTheme(options);
12982
+ }
12983
+ if (options.zIndex) {
12984
+ index_esm.setCurrent(options.zIndex);
12985
+ }
12968
12986
  }
12969
12987
  return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().merge(conf, options);
12970
12988
  }
@@ -12983,6 +13001,7 @@ function config(options) {
12983
13001
 
12984
13002
 
12985
13003
 
13004
+
12986
13005
  var installedPlugins = [];
12987
13006
  function use(Plugin, options) {
12988
13007
  /* eslint-disable @typescript-eslint/no-use-before-define */
@@ -13067,7 +13086,7 @@ var setup = config;
13067
13086
  var globalStore = {};
13068
13087
  var VXETable = {
13069
13088
  v: v,
13070
- version: "3.8.6-beta.0",
13089
+ version: "3.8.6-beta.2",
13071
13090
  reg: reg,
13072
13091
  use: use,
13073
13092
  setup: setup,
@@ -13084,6 +13103,7 @@ var VXETable = {
13084
13103
  config: config,
13085
13104
  globalConfs: globalConfs
13086
13105
  };
13106
+ setTheme(globalStore);
13087
13107
 
13088
13108
 
13089
13109
 
@@ -13392,11 +13412,9 @@ var DomTools = {
13392
13412
  });
13393
13413
  },
13394
13414
  getAbsolutePos: function getAbsolutePos(elem) {
13395
- // 当主页面嵌套在iframe时,elem.getBoundingClientRect()仅计算在当前body内的边界距离,忽略了body所在的边界距离
13396
- var bodyBounding = document.body.getBoundingClientRect();
13397
13415
  var bounding = elem.getBoundingClientRect();
13398
- var boundingTop = bounding.top - bodyBounding.top;
13399
- var boundingLeft = bounding.left - bodyBounding.left;
13416
+ var boundingTop = bounding.top;
13417
+ var boundingLeft = bounding.left;
13400
13418
  var _getDomNode = getDomNode(),
13401
13419
  scrollTop = _getDomNode.scrollTop,
13402
13420
  scrollLeft = _getDomNode.scrollLeft,
@@ -13852,6 +13870,7 @@ function getSlotVNs(vns) {
13852
13870
 
13853
13871
 
13854
13872
 
13873
+
13855
13874
  var renderType = 'body';
13856
13875
 
13857
13876
  // 滚动、拖动过程中不需要触发
@@ -13861,7 +13880,8 @@ function isVMScrollProcess($xetable) {
13861
13880
  function renderLine(h, _vm, $xetable, params) {
13862
13881
  var row = params.row,
13863
13882
  column = params.column;
13864
- var treeOpts = $xetable.treeOpts,
13883
+ var afterFullData = $xetable.afterFullData,
13884
+ treeOpts = $xetable.treeOpts,
13865
13885
  treeConfig = $xetable.treeConfig,
13866
13886
  fullAllDataRowIdData = $xetable.fullAllDataRowIdData;
13867
13887
  var slots = column.slots,
@@ -13879,13 +13899,14 @@ function renderLine(h, _vm, $xetable, params) {
13879
13899
  if (slots && slots.line) {
13880
13900
  return $xetable.callSlot(slots.line, params, h);
13881
13901
  }
13902
+ var isFirstRow = $xetable.eqRow(afterFullData[0], row);
13882
13903
  if (treeConfig && treeNode && (treeOpts.showLine || treeOpts.line)) {
13883
13904
  return [h('div', {
13884
13905
  class: 'vxe-tree--line-wrapper'
13885
13906
  }, [h('div', {
13886
13907
  class: 'vxe-tree--line',
13887
13908
  style: {
13888
- height: "".concat(calcTreeLine(params, items, rIndex), "px"),
13909
+ height: "".concat(isFirstRow ? 1 : calcTreeLine(params, items, rIndex), "px"),
13889
13910
  left: "".concat(rLevel * treeOpts.indent + (rLevel ? 2 - getOffsetSize($xetable) : 0) + 16, "px")
13890
13911
  }
13891
13912
  })])];
@@ -19333,6 +19354,7 @@ var Methods = {
19333
19354
  editRules = this.editRules,
19334
19355
  editOpts = this.editOpts,
19335
19356
  validOpts = this.validOpts,
19357
+ areaOpts = this.areaOpts,
19336
19358
  filterStore = this.filterStore,
19337
19359
  customStore = this.customStore,
19338
19360
  getRowNode = this.getRowNode;
@@ -19421,11 +19443,13 @@ var Methods = {
19421
19443
  if (this.clearSelected) {
19422
19444
  this.clearSelected();
19423
19445
  }
19424
- if (!getEventTargetNode(evnt, document.body, 'vxe-table--ignore-areas-clear').flag) {
19425
- this.preventEvent(evnt, 'event.clearAreas', {}, function () {
19426
- _this27.clearCellAreas();
19427
- _this27.clearCopyCellArea();
19428
- });
19446
+ if (areaOpts.autoClear) {
19447
+ if (!getEventTargetNode(evnt, document.body, 'vxe-table--ignore-areas-clear').flag) {
19448
+ this.preventEvent(evnt, 'event.clearAreas', {}, function () {
19449
+ _this27.clearCellAreas();
19450
+ _this27.clearCopyCellArea();
19451
+ });
19452
+ }
19429
19453
  }
19430
19454
  }
19431
19455
  }
@@ -27281,6 +27305,8 @@ function toFloatValueFixed(inputValue, digitsValue) {
27281
27305
 
27282
27306
 
27283
27307
 
27308
+
27309
+
27284
27310
 
27285
27311
 
27286
27312
 
@@ -29557,6 +29583,7 @@ function renderExtraSuffixIcon(h, _vm) {
29557
29583
  visibleHeight = _DomTools$getAbsolute.visibleHeight,
29558
29584
  visibleWidth = _DomTools$getAbsolute.visibleWidth;
29559
29585
  var panelPlacement = 'bottom';
29586
+ console.log(dom.getAbsolutePos(targetElem));
29560
29587
  if (transfer) {
29561
29588
  var left = boundingLeft;
29562
29589
  var top = boundingTop + targetHeight;
@@ -34547,6 +34574,7 @@ var Validator = VxeTableValidatorModule;
34547
34574
 
34548
34575
 
34549
34576
 
34577
+
34550
34578
  var panel_formatText = utils.formatText;
34551
34579
  var panel_addClass = dom.addClass,
34552
34580
  panel_removeClass = dom.removeClass;
@@ -34953,7 +34981,20 @@ function renderPopupPanel(h, _vm) {
34953
34981
  $xetable.emitCustomEvent('reset', evnt);
34954
34982
  },
34955
34983
  resetPopupCustomEvent: function resetPopupCustomEvent(evnt) {
34956
- this.resetCustomEvent(evnt);
34984
+ var _this = this;
34985
+ if (v_x_e_table.modal) {
34986
+ v_x_e_table.modal.confirm({
34987
+ content: conf.i18n('vxe.custom.cstmConfirmRestore'),
34988
+ className: 'vxe-table--ignore-clear',
34989
+ escClosable: true
34990
+ }).then(function (type) {
34991
+ if (type === 'confirm') {
34992
+ _this.resetCustomEvent(evnt);
34993
+ }
34994
+ });
34995
+ } else {
34996
+ this.resetCustomEvent(evnt);
34997
+ }
34957
34998
  },
34958
34999
  handleOptionCheck: function handleOptionCheck(column) {
34959
35000
  var $xetable = this.$xetable;
@@ -42197,6 +42238,7 @@ var Pulldown = VxePulldown;
42197
42238
 
42198
42239
 
42199
42240
 
42241
+
42200
42242
 
42201
42243
 
42202
42244
  // 按需加载的组件
@@ -42210,6 +42252,9 @@ Icon, Column, Colgroup, Table, Grid, Toolbar, Pager, Checkbox, CheckboxGroup, Ra
42210
42252
  function install(Vue, options) {
42211
42253
  if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isPlainObject(options)) {
42212
42254
  VXETable.config(options);
42255
+ if (options.theme) {
42256
+ setTheme(options);
42257
+ }
42213
42258
  }
42214
42259
  components.map(function (component) {
42215
42260
  return component.install(Vue);