vxe-table 3.5.9-beta.1 → 3.5.9-beta.4

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 (77) hide show
  1. package/lib/edit/src/mixin.js +3 -3
  2. package/lib/edit/src/mixin.min.js +1 -1
  3. package/lib/form/src/form.js +12 -7
  4. package/lib/form/src/form.min.js +1 -1
  5. package/lib/form/style/style.css +2 -1
  6. package/lib/form/style/style.min.css +1 -1
  7. package/lib/grid/src/grid.js +12 -7
  8. package/lib/grid/src/grid.min.js +1 -1
  9. package/lib/index.css +1 -1
  10. package/lib/index.umd.js +113 -45
  11. package/lib/index.umd.min.js +1 -1
  12. package/lib/list/src/list.js +12 -7
  13. package/lib/list/src/list.min.js +1 -1
  14. package/lib/loading/index.js +19 -0
  15. package/lib/loading/index.min.js +1 -0
  16. package/lib/loading/src/loading.js +36 -0
  17. package/lib/loading/src/loading.min.js +1 -0
  18. package/lib/locale/lang/en-US.js +3 -0
  19. package/lib/locale/lang/en-US.min.js +1 -1
  20. package/lib/locale/lang/en-US.umd.js +3 -0
  21. package/lib/locale/lang/ja-JP.js +3 -0
  22. package/lib/locale/lang/ja-JP.min.js +1 -1
  23. package/lib/locale/lang/ja-JP.umd.js +3 -0
  24. package/lib/locale/lang/zh-CN.js +3 -0
  25. package/lib/locale/lang/zh-CN.min.js +1 -1
  26. package/lib/locale/lang/zh-CN.umd.js +3 -0
  27. package/lib/locale/lang/zh-HK.min.js +1 -1
  28. package/lib/locale/lang/zh-HK.umd.js +3 -0
  29. package/lib/locale/lang/zh-MO.min.js +1 -1
  30. package/lib/locale/lang/zh-MO.umd.js +3 -0
  31. package/lib/locale/lang/zh-TC.js +3 -0
  32. package/lib/locale/lang/zh-TC.min.js +1 -1
  33. package/lib/locale/lang/zh-TC.umd.js +3 -0
  34. package/lib/locale/lang/zh-TW.min.js +1 -1
  35. package/lib/locale/lang/zh-TW.umd.js +3 -0
  36. package/lib/modal/src/modal.js +22 -11
  37. package/lib/modal/src/modal.min.js +1 -1
  38. package/lib/select/style/style.css +0 -69
  39. package/lib/select/style/style.min.css +1 -1
  40. package/lib/style.css +1 -1
  41. package/lib/style.min.css +1 -1
  42. package/lib/table/src/methods.js +3 -1
  43. package/lib/table/src/methods.min.js +1 -1
  44. package/lib/table/src/table.js +12 -8
  45. package/lib/table/src/table.min.js +1 -1
  46. package/lib/table/style/style.css +0 -68
  47. package/lib/table/style/style.min.css +1 -1
  48. package/lib/tools/log.js +1 -1
  49. package/lib/tools/log.min.js +1 -1
  50. package/lib/v-x-e-table/index.js +1 -1
  51. package/lib/v-x-e-table/index.min.js +1 -1
  52. package/lib/v-x-e-table/src/conf.js +4 -0
  53. package/lib/v-x-e-table/src/conf.min.js +1 -1
  54. package/lib/v-x-e-table/style/style.css +590 -0
  55. package/lib/v-x-e-table/style/style.min.css +1 -0
  56. package/package.json +1 -1
  57. package/packages/edit/src/mixin.js +3 -2
  58. package/packages/form/src/form.js +10 -9
  59. package/packages/grid/src/grid.js +8 -5
  60. package/packages/list/src/list.js +10 -9
  61. package/packages/loading/index.js +9 -0
  62. package/packages/loading/src/loading.js +31 -0
  63. package/packages/locale/lang/en-US.js +3 -0
  64. package/packages/locale/lang/ja-JP.js +3 -0
  65. package/packages/locale/lang/zh-CN.js +3 -0
  66. package/packages/locale/lang/zh-TC.js +3 -0
  67. package/packages/modal/src/modal.js +18 -13
  68. package/packages/table/src/methods.js +2 -1
  69. package/packages/table/src/table.js +10 -9
  70. package/packages/v-x-e-table/src/conf.js +4 -0
  71. package/styles/form.scss +1 -0
  72. package/styles/{base/loading.scss → loading.scss} +17 -4
  73. package/styles/modules.scss +1 -0
  74. package/styles/select.scss +0 -1
  75. package/styles/table.scss +0 -1
  76. package/styles/v-x-e-table.scss +2 -0
  77. package/types/table.d.ts +5 -0
package/lib/index.umd.js CHANGED
@@ -8457,6 +8457,8 @@ var iconPrefix = 'vxe-icon--';
8457
8457
  // 版本号,对于某些带数据缓存的功能有用到,上升版本号可以用于重置数据
8458
8458
  // resizeInterval: 500,
8459
8459
  emptyCell: ' ',
8460
+ loadingText: null,
8461
+ // 自定义loading提示内容,如果为null则不显示文本
8460
8462
  table: {
8461
8463
  fit: true,
8462
8464
  showHeader: true,
@@ -8574,6 +8576,8 @@ var iconPrefix = 'vxe-icon--';
8574
8576
  types: {}
8575
8577
  },
8576
8578
  icon: {
8579
+ // loading
8580
+ // LOADING: iconPrefix + 'refresh roll vxe-loading--default-icon',
8577
8581
  // table
8578
8582
  TABLE_SORT_ASC: iconPrefix + 'caret-top',
8579
8583
  TABLE_SORT_DESC: iconPrefix + 'caret-bottom',
@@ -8804,7 +8808,7 @@ var es_array_concat = __webpack_require__("99af");
8804
8808
 
8805
8809
 
8806
8810
  function getLog(message, params) {
8807
- return "[vxe-table v".concat("3.5.9-beta.0", "] ").concat(conf.i18n(message, params));
8811
+ return "[vxe-table v".concat("3.5.9-beta.3", "] ").concat(conf.i18n(message, params));
8808
8812
  }
8809
8813
 
8810
8814
  function outLog(type) {
@@ -10073,7 +10077,7 @@ function _t(key, args) {
10073
10077
  var v = 'v3';
10074
10078
  var VXETable = {
10075
10079
  v: v,
10076
- version: "3.5.9-beta.0",
10080
+ version: "3.5.9-beta.3",
10077
10081
  reg: reg,
10078
10082
  use: use,
10079
10083
  setup: setup,
@@ -16660,7 +16664,9 @@ var Methods = {
16660
16664
  // 如果是按下非功能键之外允许直接编辑
16661
16665
 
16662
16666
  if (selected.column && selected.row && isEnableConf(selected.column.editRender)) {
16663
- if (!editOpts.activeMethod || editOpts.activeMethod(_objectSpread2(_objectSpread2({}, selected.args), {}, {
16667
+ var beforeEditMethod = editOpts.beforeEditMethod || editOpts.activeMethod;
16668
+
16669
+ if (!beforeEditMethod || beforeEditMethod(_objectSpread2(_objectSpread2({}, selected.args), {}, {
16664
16670
  $table: _this28
16665
16671
  }))) {
16666
16672
  if (editMethod) {
@@ -19755,6 +19761,42 @@ funcs.forEach(function (name) {
19755
19761
  };
19756
19762
  });
19757
19763
  /* harmony default export */ var methods = (Methods);
19764
+ // CONCATENATED MODULE: ./packages/loading/src/loading.js
19765
+
19766
+ /* harmony default export */ var src_loading = ({
19767
+ name: 'VxeLoading',
19768
+ props: {
19769
+ loading: Boolean
19770
+ },
19771
+ render: function render(h) {
19772
+ var icon = conf.icon.LOADING;
19773
+ var loadingText = conf.loadingText;
19774
+ var text = loadingText === null ? loadingText : conf.i18n('vxe.loading.text');
19775
+ return h('div', {
19776
+ class: ['vxe-loading', {
19777
+ 'is--visible': this.loading
19778
+ }]
19779
+ }, [h('div', {
19780
+ class: 'vxe-loading--chunk'
19781
+ }, [icon ? h('i', {
19782
+ class: icon
19783
+ }) : h('div', {
19784
+ class: 'vxe-loading--spinner'
19785
+ }), text ? h('div', {
19786
+ class: 'vxe-loading--text'
19787
+ }, "".concat(text)) : null])]);
19788
+ }
19789
+ });
19790
+ // CONCATENATED MODULE: ./packages/loading/index.js
19791
+
19792
+
19793
+
19794
+ var Loading = Object.assign(src_loading, {
19795
+ install: function install(Vue) {
19796
+ Vue.component(src_loading.name, src_loading);
19797
+ }
19798
+ });
19799
+ /* harmony default export */ var packages_loading = (src_loading);
19758
19800
  // CONCATENATED MODULE: ./packages/table/src/table.js
19759
19801
 
19760
19802
 
@@ -19779,6 +19821,7 @@ funcs.forEach(function (name) {
19779
19821
 
19780
19822
 
19781
19823
 
19824
+
19782
19825
 
19783
19826
 
19784
19827
  /**
@@ -20923,13 +20966,12 @@ function handleUupdateResize(_vm) {
20923
20966
  /**
20924
20967
  * 加载中
20925
20968
  */
20926
- h('div', {
20927
- class: ['vxe-table--loading vxe-loading', {
20928
- 'is--visible': loading
20929
- }]
20930
- }, [h('div', {
20931
- class: 'vxe-loading--spinner'
20932
- })]),
20969
+ h(packages_loading, {
20970
+ class: 'vxe-table--loading',
20971
+ props: {
20972
+ loading: loading
20973
+ }
20974
+ }),
20933
20975
  /**
20934
20976
  * 筛选
20935
20977
  */
@@ -22641,20 +22683,20 @@ function insertTreeRow(_vm, newRecords, isAppend) {
22641
22683
  tableColumn = this.tableColumn,
22642
22684
  editConfig = this.editConfig,
22643
22685
  mouseConfig = this.mouseConfig;
22644
- var mode = editOpts.mode,
22645
- activeMethod = editOpts.activeMethod;
22686
+ var mode = editOpts.mode;
22646
22687
  var actived = editStore.actived;
22647
22688
  var row = params.row,
22648
22689
  column = params.column;
22649
22690
  var editRender = column.editRender;
22650
22691
  var cell = params.cell = params.cell || this.getCell(row, column);
22692
+ var beforeEditMethod = editOpts.beforeEditMethod || editOpts.activeMethod;
22651
22693
 
22652
22694
  if (isEnableConf(editConfig) && isEnableConf(editRender) && cell) {
22653
22695
  if (actived.row !== row || (mode === 'cell' ? actived.column !== column : false)) {
22654
22696
  // 判断是否禁用编辑
22655
22697
  var type = 'edit-disabled';
22656
22698
 
22657
- if (!activeMethod || activeMethod(_objectSpread2(_objectSpread2({}, params), {}, {
22699
+ if (!beforeEditMethod || beforeEditMethod(_objectSpread2(_objectSpread2({}, params), {}, {
22658
22700
  $table: this
22659
22701
  }))) {
22660
22702
  if (mouseConfig) {
@@ -23157,6 +23199,7 @@ function _slicedToArray(arr, i) {
23157
23199
 
23158
23200
 
23159
23201
 
23202
+
23160
23203
  var allActivedModals = [];
23161
23204
  var msgQueue = [];
23162
23205
  /* harmony default export */ var modal = ({
@@ -23357,7 +23400,7 @@ var msgQueue = [];
23357
23400
  modalTop: 0,
23358
23401
  modalZindex: 0,
23359
23402
  zoomLocat: null,
23360
- firstOpen: false
23403
+ firstOpen: true
23361
23404
  };
23362
23405
  },
23363
23406
  computed: {
@@ -23522,13 +23565,16 @@ var msgQueue = [];
23522
23565
  class: 'vxe-modal--content'
23523
23566
  }, defaultSlot ? !inited || destroyOnClose && !visible ? [] : defaultSlot.call(this, {
23524
23567
  $modal: this
23525
- }, h) : getFuncText(content)), !isMsg ? h('div', {
23526
- class: ['vxe-loading', {
23527
- 'is--visible': loading
23528
- }]
23529
- }, [h('div', {
23530
- class: 'vxe-loading--spinner'
23531
- })]) : null]), showFooter ? h('div', {
23568
+ }, h) : getFuncText(content)),
23569
+ /**
23570
+ * 加载中
23571
+ */
23572
+ !isMsg ? h(packages_loading, {
23573
+ class: 'vxe-modal--loading',
23574
+ props: {
23575
+ loading: loading
23576
+ }
23577
+ }) : null]), showFooter ? h('div', {
23532
23578
  class: 'vxe-modal--footer'
23533
23579
  }, footerSlot ? !inited || destroyOnClose && !visible ? [] : footerSlot.call(this, {
23534
23580
  $modal: this
@@ -23709,7 +23755,7 @@ var msgQueue = [];
23709
23755
  var firstOpen = _this2.firstOpen,
23710
23756
  fullscreen = _this2.fullscreen;
23711
23757
 
23712
- if (!remember || !firstOpen) {
23758
+ if (!remember || firstOpen) {
23713
23759
  _this2.updatePosition().then(function () {
23714
23760
  setTimeout(function () {
23715
23761
  return _this2.updatePosition();
@@ -23717,8 +23763,8 @@ var msgQueue = [];
23717
23763
  });
23718
23764
  }
23719
23765
 
23720
- if (!firstOpen) {
23721
- _this2.firstOpen = true;
23766
+ if (firstOpen) {
23767
+ _this2.firstOpen = false;
23722
23768
 
23723
23769
  if (_this2.hasPosStorage()) {
23724
23770
  _this2.restorePosStorage();
@@ -23727,6 +23773,12 @@ var msgQueue = [];
23727
23773
  return _this2.maximize();
23728
23774
  });
23729
23775
  }
23776
+ } else {
23777
+ if (fullscreen) {
23778
+ _this2.$nextTick(function () {
23779
+ return _this2.maximize();
23780
+ });
23781
+ }
23730
23782
  }
23731
23783
  });
23732
23784
  }
@@ -32632,7 +32684,7 @@ Object.keys(packages_table.methods).forEach(function (name) {
32632
32684
  tZindex: 0,
32633
32685
  tablePage: {
32634
32686
  total: 0,
32635
- pageSize: 10,
32687
+ pageSize: conf.pager.pageSize || 10,
32636
32688
  currentPage: 1
32637
32689
  }
32638
32690
  };
@@ -32706,7 +32758,7 @@ Object.keys(packages_table.methods).forEach(function (name) {
32706
32758
 
32707
32759
  if (editConfig) {
32708
32760
  tableProps.editConfig = Object.assign({}, editConfig, {
32709
- activeMethod: this.handleActiveMethod
32761
+ beforeEditMethod: this.handleBeforeEditMethod
32710
32762
  });
32711
32763
  }
32712
32764
 
@@ -32893,12 +32945,17 @@ Object.keys(packages_table.methods).forEach(function (name) {
32893
32945
  clss.push(rowClassName ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isFunction(rowClassName) ? rowClassName(params) : rowClassName : '');
32894
32946
  return clss;
32895
32947
  },
32896
- handleActiveMethod: function handleActiveMethod(params) {
32948
+ handleBeforeEditMethod: function handleBeforeEditMethod(params) {
32897
32949
  var editConfig = this.editConfig;
32898
- var activeMethod = editConfig ? editConfig.activeMethod : null;
32899
- return this.pendingRecords.indexOf(params.row) === -1 && (!activeMethod || activeMethod(_objectSpread2(_objectSpread2({}, params), {}, {
32900
- $grid: this
32901
- })));
32950
+ var beforeEditMethod = editConfig ? editConfig.beforeEditMethod || editConfig.activeMethod : null;
32951
+
32952
+ if (this.pendingRecords.indexOf(params.row) === -1) {
32953
+ return !beforeEditMethod || beforeEditMethod(_objectSpread2(_objectSpread2({}, params), {}, {
32954
+ $grid: this
32955
+ }));
32956
+ }
32957
+
32958
+ return false;
32902
32959
  },
32903
32960
  initToolbar: function initToolbar() {
32904
32961
  var _this3 = this;
@@ -36892,6 +36949,7 @@ var VxeFormConfigItem = {
36892
36949
 
36893
36950
 
36894
36951
 
36952
+
36895
36953
 
36896
36954
 
36897
36955
  var form_Rule = /*#__PURE__*/function () {
@@ -37125,13 +37183,16 @@ function getResetValue(value, resetValue) {
37125
37183
  })), h('div', {
37126
37184
  class: 'vxe-form-slots',
37127
37185
  ref: 'hideItem'
37128
- }, customLayout ? [] : defaultSlot ? defaultSlot.call(this, h, {}) : []), h('div', {
37129
- class: ['vxe-loading', {
37130
- 'is--visible': loading
37131
- }]
37132
- }, [h('div', {
37133
- class: 'vxe-loading--spinner'
37134
- })]),
37186
+ }, customLayout ? [] : defaultSlot ? defaultSlot.call(this, h, {}) : []),
37187
+ /**
37188
+ * 加载中
37189
+ */
37190
+ h(packages_loading, {
37191
+ class: 'vxe-form--loading',
37192
+ props: {
37193
+ loading: loading
37194
+ }
37195
+ }),
37135
37196
  /**
37136
37197
  * 工具提示
37137
37198
  */
@@ -38123,6 +38184,7 @@ var Switch = Object.assign(src_switch, {
38123
38184
 
38124
38185
 
38125
38186
 
38187
+
38126
38188
  /* harmony default export */ var src_list = ({
38127
38189
  name: 'VxeList',
38128
38190
  mixins: [size],
@@ -38260,13 +38322,16 @@ var Switch = Object.assign(src_switch, {
38260
38322
  }, $scopedSlots.default ? $scopedSlots.default.call(this, {
38261
38323
  items: items,
38262
38324
  $list: this
38263
- }, h) : [])]), h('div', {
38264
- class: ['vxe-list--loading vxe-loading', {
38265
- 'is--visible': loading
38266
- }]
38267
- }, [h('div', {
38268
- class: 'vxe-loading--spinner'
38269
- })])]);
38325
+ }, h) : [])]),
38326
+ /**
38327
+ * 加载中
38328
+ */
38329
+ h(packages_loading, {
38330
+ class: 'vxe-list--loading',
38331
+ props: {
38332
+ loading: loading
38333
+ }
38334
+ })]);
38270
38335
  },
38271
38336
  methods: {
38272
38337
  getParentElem: function getParentElem() {
@@ -38829,6 +38894,9 @@ var Pulldown = Object.assign(pulldown, {
38829
38894
  // CONCATENATED MODULE: ./packages/locale/lang/zh-CN.js
38830
38895
  /* harmony default export */ var zh_CN = ({
38831
38896
  vxe: {
38897
+ loading: {
38898
+ text: '加载中'
38899
+ },
38832
38900
  error: {
38833
38901
  groupFixed: '如果使用分组表头,固定列必须按组设置',
38834
38902
  groupMouseRange: '分组表头与 "{0}" 不能同时使用,这可能会出现错误',