vxe-table 3.7.8 → 3.7.9-beta.1

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/README.md +2 -2
  2. package/helper/vetur/attributes.json +8 -0
  3. package/helper/vetur/tags.json +3 -1
  4. package/lib/edit/src/mixin.js +2 -2
  5. package/lib/edit/src/mixin.min.js +1 -1
  6. package/lib/grid/src/grid.js +151 -70
  7. package/lib/grid/src/grid.min.js +1 -1
  8. package/lib/icon/style/style.css +9 -1
  9. package/lib/icon/style/style.min.css +9 -1
  10. package/lib/index.css +1 -1
  11. package/lib/index.umd.js +260 -93
  12. package/lib/index.umd.min.js +1 -1
  13. package/lib/locale/lang/en-US.js +9 -1
  14. package/lib/locale/lang/en-US.min.js +1 -1
  15. package/lib/locale/lang/en-US.umd.js +9 -1
  16. package/lib/locale/lang/ja-JP.js +9 -1
  17. package/lib/locale/lang/ja-JP.min.js +1 -1
  18. package/lib/locale/lang/ja-JP.umd.js +9 -1
  19. package/lib/locale/lang/zh-CN.js +9 -1
  20. package/lib/locale/lang/zh-CN.min.js +1 -1
  21. package/lib/locale/lang/zh-CN.umd.js +9 -1
  22. package/lib/locale/lang/zh-HK.min.js +1 -1
  23. package/lib/locale/lang/zh-HK.umd.js +9 -1
  24. package/lib/locale/lang/zh-MO.min.js +1 -1
  25. package/lib/locale/lang/zh-MO.umd.js +9 -1
  26. package/lib/locale/lang/zh-TC.js +9 -1
  27. package/lib/locale/lang/zh-TC.min.js +1 -1
  28. package/lib/locale/lang/zh-TC.umd.js +9 -1
  29. package/lib/locale/lang/zh-TW.min.js +1 -1
  30. package/lib/locale/lang/zh-TW.umd.js +9 -1
  31. package/lib/pager/src/pager.js +62 -6
  32. package/lib/pager/src/pager.min.js +1 -1
  33. package/lib/style.css +1 -1
  34. package/lib/style.min.css +1 -1
  35. package/lib/table/src/body.js +11 -5
  36. package/lib/table/src/body.min.js +1 -1
  37. package/lib/table/src/methods.js +28 -11
  38. package/lib/table/src/methods.min.js +1 -1
  39. package/lib/tools/dom.js +4 -2
  40. package/lib/tools/dom.min.js +1 -1
  41. package/lib/tools/log.js +1 -1
  42. package/lib/tools/log.min.js +1 -1
  43. package/lib/v-x-e-table/index.js +1 -1
  44. package/lib/v-x-e-table/index.min.js +1 -1
  45. package/lib/v-x-e-table/src/conf.js +2 -0
  46. package/lib/v-x-e-table/src/conf.min.js +1 -1
  47. package/lib/v-x-e-table/style/style.css +9 -1
  48. package/lib/v-x-e-table/style/style.min.css +1 -1
  49. package/package.json +2 -2
  50. package/packages/edit/src/mixin.js +2 -2
  51. package/packages/grid/src/grid.js +147 -73
  52. package/packages/locale/lang/en-US.js +9 -1
  53. package/packages/locale/lang/ja-JP.js +9 -1
  54. package/packages/locale/lang/zh-CN.js +9 -1
  55. package/packages/locale/lang/zh-TC.js +9 -1
  56. package/packages/pager/src/pager.js +65 -6
  57. package/packages/table/src/body.js +8 -5
  58. package/packages/table/src/methods.js +24 -10
  59. package/packages/tools/dom.js +4 -2
  60. package/packages/v-x-e-table/src/conf.js +2 -0
  61. package/styles/icon.scss +10 -1
  62. package/types/pager.d.ts +1 -1
  63. /package/lib/icon/style/{iconfont.1705365451437.ttf → iconfont.1708907653537.ttf} +0 -0
  64. /package/lib/icon/style/{iconfont.1705365451437.woff → iconfont.1708907653537.woff} +0 -0
  65. /package/lib/icon/style/{iconfont.1705365451437.woff2 → iconfont.1708907653537.woff2} +0 -0
  66. /package/lib/{iconfont.1705365451437.ttf → iconfont.1708907653537.ttf} +0 -0
  67. /package/lib/{iconfont.1705365451437.woff → iconfont.1708907653537.woff} +0 -0
  68. /package/lib/{iconfont.1705365451437.woff2 → iconfont.1708907653537.woff2} +0 -0
package/lib/index.umd.js CHANGED
@@ -10373,6 +10373,8 @@ var iconPrefix = 'vxe-icon-';
10373
10373
  SELECT_OPEN: iconPrefix + 'caret-down rotate180',
10374
10374
  SELECT_CLOSE: iconPrefix + 'caret-down',
10375
10375
  // pager
10376
+ PAGER_HOME: iconPrefix + 'home-page',
10377
+ PAGER_END: iconPrefix + 'end-page',
10376
10378
  PAGER_JUMP_PREV: iconPrefix + 'arrow-double-left',
10377
10379
  PAGER_JUMP_NEXT: iconPrefix + 'arrow-double-right',
10378
10380
  PAGER_PREV_PAGE: iconPrefix + 'arrow-left',
@@ -10591,7 +10593,7 @@ var es_array_concat = __webpack_require__(2222);
10591
10593
 
10592
10594
 
10593
10595
  function getLog(message, params) {
10594
- return "[vxe-table v".concat("3.7.8", "] ").concat(conf.i18n(message, params));
10596
+ return "[vxe-table v".concat("3.7.9-beta.1", "] ").concat(conf.i18n(message, params));
10595
10597
  }
10596
10598
  function outLog(type) {
10597
10599
  return function (message, params) {
@@ -12023,7 +12025,7 @@ var setup = config;
12023
12025
  var globalStore = {};
12024
12026
  var VXETable = {
12025
12027
  v: v,
12026
- version: "3.7.8",
12028
+ version: "3.7.9-beta.1",
12027
12029
  reg: reg,
12028
12030
  use: use,
12029
12031
  setup: setup,
@@ -12416,9 +12418,11 @@ var DomTools = {
12416
12418
  });
12417
12419
  },
12418
12420
  getAbsolutePos: function getAbsolutePos(elem) {
12421
+ // 当主页面嵌套在iframe时,elem.getBoundingClientRect()仅计算在当前body内的边界距离,忽略了body所在的边界距离
12422
+ var bodyBounding = document.body.getBoundingClientRect();
12419
12423
  var bounding = elem.getBoundingClientRect();
12420
- var boundingTop = bounding.top;
12421
- var boundingLeft = bounding.left;
12424
+ var boundingTop = bounding.top - bodyBounding.top;
12425
+ var boundingLeft = bounding.left - bodyBounding.left;
12422
12426
  var _getDomNode = getDomNode(),
12423
12427
  scrollTop = _getDomNode.scrollTop,
12424
12428
  scrollLeft = _getDomNode.scrollLeft,
@@ -12808,6 +12812,7 @@ function getSlotVNs(vns) {
12808
12812
 
12809
12813
 
12810
12814
 
12815
+
12811
12816
  var renderType = 'body';
12812
12817
 
12813
12818
  // 滚动、拖动过程中不需要触发
@@ -12893,7 +12898,8 @@ function renderColumn(h, _vm, $xetable, seq, rowid, fixedType, rowLevel, row, ro
12893
12898
  align = column.align,
12894
12899
  showOverflow = column.showOverflow,
12895
12900
  className = column.className,
12896
- treeNode = column.treeNode;
12901
+ treeNode = column.treeNode,
12902
+ slots = column.slots;
12897
12903
  var actived = editStore.actived;
12898
12904
  var scrollYRHeight = sYOpts.rHeight;
12899
12905
  var rowHeight = rowOpts.height;
@@ -13071,12 +13077,15 @@ function renderColumn(h, _vm, $xetable, seq, rowid, fixedType, rowLevel, row, ro
13071
13077
  }
13072
13078
  }, column.renderCell(h, params))]));
13073
13079
  if (showValidTip && errorValidItem) {
13080
+ var errRule = errorValidItem.rule;
13081
+ var validSlot = slots ? slots.valid : null;
13082
+ var validParams = _objectSpread2(_objectSpread2({}, params), errorValidItem);
13074
13083
  tdVNs.push(h('div', {
13075
- class: 'vxe-cell--valid-error-hint',
13076
- style: errorValidItem.rule && errorValidItem.rule.maxWidth ? {
13077
- width: "".concat(errorValidItem.rule.maxWidth, "px")
13084
+ class: ['vxe-cell--valid-error-hint', utils.getClass(validOpts.className, errorValidItem)],
13085
+ style: errRule && errRule.maxWidth ? {
13086
+ width: "".concat(errRule.maxWidth, "px")
13078
13087
  } : null
13079
- }, [h('span', {
13088
+ }, validSlot ? $xetable.callSlot(validSlot, validParams, h) : [h('span', {
13080
13089
  class: 'vxe-cell--valid-error-msg'
13081
13090
  }, errorValidItem.content)]));
13082
13091
  }
@@ -15962,6 +15971,7 @@ var Methods = {
15962
15971
  }
15963
15972
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(rows, function (childRow, index, items, path, parent, nodes) {
15964
15973
  var rowid = getRowid(_this12, childRow);
15974
+ var parentRow = parent || row;
15965
15975
  var rest = {
15966
15976
  row: childRow,
15967
15977
  rowid: rowid,
@@ -15970,7 +15980,7 @@ var Methods = {
15970
15980
  _index: -1,
15971
15981
  $index: -1,
15972
15982
  items: items,
15973
- parent: parent,
15983
+ parent: parentRow,
15974
15984
  level: parentLevel + nodes.length
15975
15985
  };
15976
15986
  fullDataRowIdData[rowid] = rest;
@@ -16804,7 +16814,8 @@ var Methods = {
16804
16814
  rowid = getRowid(this, rowOrRowid);
16805
16815
  }
16806
16816
  if (rowid) {
16807
- return fullDataRowIdData[rowid] ? fullDataRowIdData[rowid].parent : null;
16817
+ var rest = fullDataRowIdData[rowid];
16818
+ return rest ? rest.parent : null;
16808
16819
  }
16809
16820
  }
16810
16821
  return null;
@@ -16832,12 +16843,14 @@ var Methods = {
16832
16843
  * 如果存在排序,继续处理
16833
16844
  */
16834
16845
  getTableData: function getTableData() {
16835
- var tableFullData = this.tableFullData,
16846
+ var treeConfig = this.treeConfig,
16847
+ tableFullData = this.tableFullData,
16836
16848
  afterFullData = this.afterFullData,
16837
16849
  tableData = this.tableData,
16838
- footerTableData = this.footerTableData;
16850
+ footerTableData = this.footerTableData,
16851
+ tableFullTreeData = this.tableFullTreeData;
16839
16852
  return {
16840
- fullData: tableFullData.slice(0),
16853
+ fullData: treeConfig ? tableFullTreeData.slice(0) : tableFullData.slice(0),
16841
16854
  visibleData: afterFullData.slice(0),
16842
16855
  tableData: tableData.slice(0),
16843
16856
  footerData: footerTableData.slice(0)
@@ -16885,9 +16898,22 @@ var Methods = {
16885
16898
  * 设置为固定列
16886
16899
  */
16887
16900
  setColumnFixed: function setColumnFixed(fieldOrColumn, fixed) {
16901
+ var isMaxFixedColumn = this.isMaxFixedColumn,
16902
+ columnOpts = this.columnOpts;
16903
+ var maxFixedSize = columnOpts.maxFixedSize;
16888
16904
  var column = handleFieldOrColumn(this, fieldOrColumn);
16889
16905
  var targetColumn = getRootColumn(this, column);
16890
16906
  if (targetColumn && targetColumn.fixed !== fixed) {
16907
+ // 是否超过最大固定列数量
16908
+ if (!targetColumn.fixed && isMaxFixedColumn) {
16909
+ if (v_x_e_table.modal) {
16910
+ v_x_e_table.modal.message({
16911
+ status: 'error',
16912
+ content: conf.i18n('vxe.table.maxFixedCol', [maxFixedSize])
16913
+ });
16914
+ }
16915
+ return this.$nextTick();
16916
+ }
16891
16917
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree([targetColumn], function (column) {
16892
16918
  column.fixed = fixed;
16893
16919
  });
@@ -23722,7 +23748,7 @@ function insertTreeRow(_vm, newRecords, isAppend) {
23722
23748
  _index: -1,
23723
23749
  $index: -1,
23724
23750
  items: parentChilds,
23725
- parent: parent,
23751
+ parent: parentRow,
23726
23752
  level: parentLevel + 1
23727
23753
  };
23728
23754
  fullDataRowIdData[rowid] = rest;
@@ -23768,7 +23794,7 @@ function handleInsertRowAt(_vm, records, row, isInsertNextRow) {
23768
23794
  var _ref;
23769
23795
  return Object.assign(treeConfig && transform ? (_ref = {}, _defineProperty(_ref, mapChildrenField, []), _defineProperty(_ref, childrenField, []), _ref) : {}, record);
23770
23796
  }));
23771
- if (!row) {
23797
+ if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(row)) {
23772
23798
  // 如果为虚拟树
23773
23799
  if (treeConfig && transform) {
23774
23800
  insertTreeRow(_vm, newRecords, false);
@@ -33637,6 +33663,152 @@ function getTableOns(_vm) {
33637
33663
  }
33638
33664
  return ons;
33639
33665
  }
33666
+
33667
+ /**
33668
+ * 渲染表单
33669
+ */
33670
+ function renderForms(h, _vm) {
33671
+ var _e = _vm._e,
33672
+ $scopedSlots = _vm.$scopedSlots,
33673
+ formConfig = _vm.formConfig;
33674
+ var formSlot = $scopedSlots.form;
33675
+ var hasForm = !!(formSlot || isEnableConf(formConfig));
33676
+ return hasForm ? h('div', {
33677
+ key: 'form',
33678
+ ref: 'formWrapper',
33679
+ class: 'vxe-grid--form-wrapper'
33680
+ }, formSlot ? formSlot.call(_vm, {
33681
+ $grid: _vm
33682
+ }, h) : renderDefaultForm(h, _vm)) : _e();
33683
+ }
33684
+
33685
+ /**
33686
+ * 渲染工具栏
33687
+ */
33688
+ function renderToolbars(h, _vm) {
33689
+ var _e = _vm._e,
33690
+ $scopedSlots = _vm.$scopedSlots,
33691
+ toolbarConfig = _vm.toolbarConfig,
33692
+ toolbar = _vm.toolbar;
33693
+ var toolbarSlot = $scopedSlots.toolbar;
33694
+ var hasToolbar = !!(toolbarSlot || isEnableConf(toolbarConfig) || toolbar);
33695
+ return hasToolbar ? h('div', {
33696
+ key: 'toolbar',
33697
+ ref: 'toolbarWrapper',
33698
+ class: 'vxe-grid--toolbar-wrapper'
33699
+ }, toolbarSlot ? toolbarSlot.call(_vm, {
33700
+ $grid: _vm
33701
+ }, h) : [h('vxe-toolbar', {
33702
+ props: _vm.toolbarOpts,
33703
+ ref: 'xToolbar',
33704
+ scopedSlots: getToolbarSlots(_vm)
33705
+ })]) : _e();
33706
+ }
33707
+
33708
+ /**
33709
+ * 渲染表格顶部区域
33710
+ */
33711
+ function renderTops(h, _vm) {
33712
+ var _e = _vm._e,
33713
+ $scopedSlots = _vm.$scopedSlots;
33714
+ var topSlot = $scopedSlots.top;
33715
+ return topSlot ? h('div', {
33716
+ key: 'top',
33717
+ ref: 'topWrapper',
33718
+ class: 'vxe-grid--top-wrapper'
33719
+ }, topSlot.call(_vm, {
33720
+ $grid: _vm
33721
+ }, h)) : _e();
33722
+ }
33723
+
33724
+ /**
33725
+ * 渲染表格
33726
+ */
33727
+ function renderTables(h, _vm) {
33728
+ var $scopedSlots = _vm.$scopedSlots,
33729
+ tableProps = _vm.tableProps;
33730
+ return h('vxe-table', {
33731
+ key: 'table',
33732
+ props: tableProps,
33733
+ on: getTableOns(_vm),
33734
+ scopedSlots: $scopedSlots,
33735
+ ref: 'xTable'
33736
+ });
33737
+ }
33738
+
33739
+ /**
33740
+ * 渲染表格底部区域
33741
+ */
33742
+ function renderBottoms(h, _vm) {
33743
+ var _e = _vm._e,
33744
+ $scopedSlots = _vm.$scopedSlots;
33745
+ var bottomSlot = $scopedSlots.bottom;
33746
+ return bottomSlot ? h('div', {
33747
+ key: 'bottom',
33748
+ ref: 'bottomWrapper',
33749
+ class: 'vxe-grid--bottom-wrapper'
33750
+ }, bottomSlot.call(_vm, {
33751
+ $grid: _vm
33752
+ }, h)) : _e();
33753
+ }
33754
+
33755
+ /**
33756
+ * 渲染分页
33757
+ */
33758
+ function renderPagers(h, _vm) {
33759
+ var _e = _vm._e,
33760
+ $scopedSlots = _vm.$scopedSlots,
33761
+ pagerConfig = _vm.pagerConfig,
33762
+ proxyConfig = _vm.proxyConfig,
33763
+ tablePage = _vm.tablePage;
33764
+ var pagerSlot = $scopedSlots.pager;
33765
+ var hasPager = !!(pagerSlot || isEnableConf(pagerConfig));
33766
+ return hasPager ? h('div', {
33767
+ key: 'pager',
33768
+ ref: 'pagerWrapper',
33769
+ class: 'vxe-grid--pager-wrapper'
33770
+ }, pagerSlot ? pagerSlot.call(_vm, {
33771
+ $grid: _vm
33772
+ }, h) : [h('vxe-pager', {
33773
+ props: _objectSpread2(_objectSpread2({}, _vm.pagerOpts), proxyConfig ? tablePage : {}),
33774
+ on: {
33775
+ 'page-change': _vm.pageChangeEvent
33776
+ },
33777
+ scopedSlots: getPagerSlots(_vm)
33778
+ })]) : _e();
33779
+ }
33780
+ var defaultLayouts = ['Form', 'Toolbar', 'Top', 'Table', 'Bottom', 'Pager'];
33781
+ function renderLayout(h, _vm) {
33782
+ var layouts = _vm.layouts;
33783
+ var vns = [];
33784
+ var currLayouts = layouts && layouts.length ? layouts : conf.grid.layouts || defaultLayouts;
33785
+ currLayouts.forEach(function (name) {
33786
+ switch (name) {
33787
+ case 'Form':
33788
+ vns.push(renderForms(h, _vm));
33789
+ break;
33790
+ case 'Toolbar':
33791
+ vns.push(renderToolbars(h, _vm));
33792
+ break;
33793
+ case 'Top':
33794
+ vns.push(renderTops(h, _vm));
33795
+ break;
33796
+ case 'Table':
33797
+ vns.push(renderTables(h, _vm));
33798
+ break;
33799
+ case 'Bottom':
33800
+ vns.push(renderBottoms(h, _vm));
33801
+ break;
33802
+ case 'Pager':
33803
+ vns.push(renderPagers(h, _vm));
33804
+ break;
33805
+ default:
33806
+ if (false) {}
33807
+ break;
33808
+ }
33809
+ });
33810
+ return vns;
33811
+ }
33640
33812
  Object.keys(packages_table.methods).forEach(function (name) {
33641
33813
  grid_methods[name] = function () {
33642
33814
  var _this$$refs$xTable;
@@ -33647,6 +33819,7 @@ Object.keys(packages_table.methods).forEach(function (name) {
33647
33819
  name: 'VxeGrid',
33648
33820
  mixins: [size],
33649
33821
  props: _objectSpread2(_objectSpread2({}, packages_table.props), {}, {
33822
+ layouts: Array,
33650
33823
  columns: Array,
33651
33824
  pagerConfig: [Boolean, Object],
33652
33825
  proxyConfig: Object,
@@ -33797,80 +33970,12 @@ Object.keys(packages_table.methods).forEach(function (name) {
33797
33970
  },
33798
33971
  render: function render(h) {
33799
33972
  var _ref;
33800
- var $scopedSlots = this.$scopedSlots,
33801
- vSize = this.vSize,
33973
+ var vSize = this.vSize,
33802
33974
  isZMax = this.isZMax;
33803
- var hasForm = !!($scopedSlots.form || isEnableConf(this.formConfig));
33804
- var hasToolbar = !!($scopedSlots.toolbar || isEnableConf(this.toolbarConfig) || this.toolbar);
33805
- var hasPager = !!($scopedSlots.pager || isEnableConf(this.pagerConfig));
33806
33975
  return h('div', {
33807
33976
  class: ['vxe-grid', (_ref = {}, _defineProperty(_ref, "size--".concat(vSize), vSize), _defineProperty(_ref, 'is--animat', !!this.animat), _defineProperty(_ref, 'is--round', this.round), _defineProperty(_ref, 'is--maximize', isZMax), _defineProperty(_ref, 'is--loading', this.loading || this.tableLoading), _ref)],
33808
33977
  style: this.renderStyle
33809
- }, [
33810
- /**
33811
- * 渲染表单
33812
- */
33813
- hasForm ? h('div', {
33814
- ref: 'formWrapper',
33815
- class: 'vxe-grid--form-wrapper'
33816
- }, $scopedSlots.form ? $scopedSlots.form.call(this, {
33817
- $grid: this
33818
- }, h) : renderDefaultForm(h, this)) : null,
33819
- /**
33820
- * 渲染工具栏
33821
- */
33822
- hasToolbar ? h('div', {
33823
- ref: 'toolbarWrapper',
33824
- class: 'vxe-grid--toolbar-wrapper'
33825
- }, $scopedSlots.toolbar ? $scopedSlots.toolbar.call(this, {
33826
- $grid: this
33827
- }, h) : [h('vxe-toolbar', {
33828
- props: this.toolbarOpts,
33829
- ref: 'xToolbar',
33830
- scopedSlots: getToolbarSlots(this)
33831
- })]) : null,
33832
- /**
33833
- * 渲染表格顶部区域
33834
- */
33835
- $scopedSlots.top ? h('div', {
33836
- ref: 'topWrapper',
33837
- class: 'vxe-grid--top-wrapper'
33838
- }, $scopedSlots.top.call(this, {
33839
- $grid: this
33840
- }, h)) : null,
33841
- /**
33842
- * 渲染表格
33843
- */
33844
- h('vxe-table', {
33845
- props: this.tableProps,
33846
- on: getTableOns(this),
33847
- scopedSlots: $scopedSlots,
33848
- ref: 'xTable'
33849
- }),
33850
- /**
33851
- * 渲染表格底部区域
33852
- */
33853
- $scopedSlots.bottom ? h('div', {
33854
- ref: 'bottomWrapper',
33855
- class: 'vxe-grid--bottom-wrapper'
33856
- }, $scopedSlots.bottom.call(this, {
33857
- $grid: this
33858
- }, h)) : null,
33859
- /**
33860
- * 渲染分页
33861
- */
33862
- hasPager ? h('div', {
33863
- ref: 'pagerWrapper',
33864
- class: 'vxe-grid--pager-wrapper'
33865
- }, $scopedSlots.pager ? $scopedSlots.pager.call(this, {
33866
- $grid: this
33867
- }, h) : [h('vxe-pager', {
33868
- props: _objectSpread2(_objectSpread2({}, this.pagerOpts), this.proxyConfig ? this.tablePage : {}),
33869
- on: {
33870
- 'page-change': this.pageChangeEvent
33871
- },
33872
- scopedSlots: getPagerSlots(this)
33873
- })]) : null]);
33978
+ }, renderLayout(h, this));
33874
33979
  },
33875
33980
  methods: _objectSpread2(_objectSpread2({}, grid_methods), {}, {
33876
33981
  callSlot: function callSlot(slotFunc, params, h, vNodes) {
@@ -35438,6 +35543,7 @@ var Toolbar = Object.assign(toolbar, {
35438
35543
 
35439
35544
 
35440
35545
 
35546
+
35441
35547
  /* harmony default export */ var pager = ({
35442
35548
  name: 'VxePager',
35443
35549
  mixins: [size],
@@ -35535,7 +35641,9 @@ var Toolbar = Object.assign(toolbar, {
35535
35641
  iconJumpPrev: String,
35536
35642
  iconJumpNext: String,
35537
35643
  iconNextPage: String,
35538
- iconJumpMore: String
35644
+ iconJumpMore: String,
35645
+ iconHomePage: String,
35646
+ iconEndPage: String
35539
35647
  },
35540
35648
  inject: {
35541
35649
  $xegrid: {
@@ -35604,7 +35712,11 @@ var Toolbar = Object.assign(toolbar, {
35604
35712
  })));
35605
35713
  }
35606
35714
  this.layouts.forEach(function (name) {
35607
- childNodes.push(_this["render".concat(name)](h));
35715
+ if (_this["render".concat(name)](h)) {
35716
+ childNodes.push(_this["render".concat(name)](h));
35717
+ } else {
35718
+ if (false) {}
35719
+ }
35608
35720
  });
35609
35721
  if ($scopedSlots.right) {
35610
35722
  childNodes.push(h('span', {
@@ -35622,6 +35734,40 @@ var Toolbar = Object.assign(toolbar, {
35622
35734
  }, childNodes)]);
35623
35735
  },
35624
35736
  methods: {
35737
+ // 首页
35738
+ renderHome: function renderHome(h) {
35739
+ return h('button', {
35740
+ class: ['vxe-pager--prev-btn', {
35741
+ 'is--disabled': this.currentPage <= 1
35742
+ }],
35743
+ attrs: {
35744
+ type: 'button',
35745
+ title: conf.i18n('vxe.pager.homePageTitle')
35746
+ },
35747
+ on: {
35748
+ click: this.homePage
35749
+ }
35750
+ }, [h('i', {
35751
+ class: ['vxe-pager--btn-icon', this.iconHomePage || conf.icon.PAGER_HOME]
35752
+ })]);
35753
+ },
35754
+ // 末页
35755
+ renderEnd: function renderEnd(h) {
35756
+ return h('button', {
35757
+ class: ['vxe-pager--prev-btn', {
35758
+ 'is--disabled': this.currentPage <= 1
35759
+ }],
35760
+ attrs: {
35761
+ type: 'button',
35762
+ title: conf.i18n('vxe.pager.endPageTitle')
35763
+ },
35764
+ on: {
35765
+ click: this.endPage
35766
+ }
35767
+ }, [h('i', {
35768
+ class: ['vxe-pager--btn-icon', this.iconEndPage || conf.icon.PAGER_END]
35769
+ })]);
35770
+ },
35625
35771
  // 上一页
35626
35772
  renderPrevPage: function renderPrevPage(h) {
35627
35773
  return h('button', {
@@ -35630,7 +35776,7 @@ var Toolbar = Object.assign(toolbar, {
35630
35776
  }],
35631
35777
  attrs: {
35632
35778
  type: 'button',
35633
- title: conf.i18n('vxe.pager.prevPage')
35779
+ title: conf.i18n('vxe.pager.prevPageTitle')
35634
35780
  },
35635
35781
  on: {
35636
35782
  click: this.prevPage
@@ -35648,7 +35794,7 @@ var Toolbar = Object.assign(toolbar, {
35648
35794
  }],
35649
35795
  attrs: {
35650
35796
  type: 'button',
35651
- title: conf.i18n('vxe.pager.prevJump')
35797
+ title: conf.i18n('vxe.pager.prevJumpTitle')
35652
35798
  },
35653
35799
  on: {
35654
35800
  click: this.prevJump
@@ -35680,7 +35826,7 @@ var Toolbar = Object.assign(toolbar, {
35680
35826
  }],
35681
35827
  attrs: {
35682
35828
  type: 'button',
35683
- title: conf.i18n('vxe.pager.nextJump')
35829
+ title: conf.i18n('vxe.pager.nextJumpTitle')
35684
35830
  },
35685
35831
  on: {
35686
35832
  click: this.nextJump
@@ -35699,7 +35845,7 @@ var Toolbar = Object.assign(toolbar, {
35699
35845
  }],
35700
35846
  attrs: {
35701
35847
  type: 'button',
35702
- title: conf.i18n('vxe.pager.nextPage')
35848
+ title: conf.i18n('vxe.pager.nextPageTitle')
35703
35849
  },
35704
35850
  on: {
35705
35851
  click: this.nextPage
@@ -35839,6 +35985,19 @@ var Toolbar = Object.assign(toolbar, {
35839
35985
  getPageCount: function getPageCount(total, size) {
35840
35986
  return Math.max(Math.ceil(total / size), 1);
35841
35987
  },
35988
+ homePage: function homePage() {
35989
+ var currentPage = this.currentPage;
35990
+ if (currentPage > 1) {
35991
+ this.jumpPage(1);
35992
+ }
35993
+ },
35994
+ endPage: function endPage() {
35995
+ var currentPage = this.currentPage,
35996
+ pageCount = this.pageCount;
35997
+ if (currentPage < pageCount) {
35998
+ this.jumpPage(pageCount);
35999
+ }
36000
+ },
35842
36001
  prevPage: function prevPage() {
35843
36002
  var currentPage = this.currentPage,
35844
36003
  pageCount = this.pageCount;
@@ -39908,10 +40067,18 @@ var Pulldown = Object.assign(pulldown, {
39908
40067
  pagesize: '{0}条/页',
39909
40068
  total: '共 {0} 条记录',
39910
40069
  pageClassifier: '页',
40070
+ homePage: '首页',
40071
+ homePageTitle: '首页',
39911
40072
  prevPage: '上一页',
40073
+ prevPageTitle: '上一页',
39912
40074
  nextPage: '下一页',
40075
+ nextPageTitle: '下一页',
39913
40076
  prevJump: '向上跳页',
39914
- nextJump: '向下跳页'
40077
+ prevJumpTitle: '向上跳页',
40078
+ nextJump: '向下跳页',
40079
+ nextJumpTitle: '向下跳页',
40080
+ endPage: '末页',
40081
+ endPageTitle: '末页'
39915
40082
  },
39916
40083
  alert: {
39917
40084
  title: '消息提示'