vxe-table 3.7.0-beta.18 → 3.7.0-beta.20

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 (58) hide show
  1. package/lib/export/src/mixin.js +5 -5
  2. package/lib/export/src/mixin.min.js +1 -1
  3. package/lib/form/src/form-config-item.js +5 -1
  4. package/lib/form/src/form-config-item.min.js +1 -1
  5. package/lib/form/src/form-item.js +9 -1
  6. package/lib/form/src/form-item.min.js +1 -1
  7. package/lib/form/src/form.js +4 -0
  8. package/lib/form/src/form.min.js +1 -1
  9. package/lib/form/style/style.css +12 -0
  10. package/lib/form/style/style.min.css +1 -1
  11. package/lib/icon/style/style.css +1 -1
  12. package/lib/icon/style/style.min.css +1 -1
  13. package/lib/index.css +1 -1
  14. package/lib/index.umd.js +46 -19
  15. package/lib/index.umd.min.js +1 -1
  16. package/lib/style.css +1 -1
  17. package/lib/style.min.css +1 -1
  18. package/lib/table/src/cell.js +3 -1
  19. package/lib/table/src/cell.min.js +1 -1
  20. package/lib/table/src/methods.js +1 -1
  21. package/lib/table/src/methods.min.js +1 -1
  22. package/lib/table/src/table.js +6 -6
  23. package/lib/table/src/table.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 +15 -12
  27. package/lib/v-x-e-table/index.min.js +1 -1
  28. package/lib/v-x-e-table/src/commands.js +3 -3
  29. package/lib/v-x-e-table/src/commands.min.js +1 -1
  30. package/lib/v-x-e-table/src/{setup.js → config.js} +3 -3
  31. package/lib/v-x-e-table/src/config.min.js +1 -0
  32. package/lib/v-x-e-table/src/formats.js +3 -3
  33. package/lib/v-x-e-table/src/formats.min.js +1 -1
  34. package/lib/v-x-e-table/src/menus.js +3 -3
  35. package/lib/v-x-e-table/src/menus.min.js +1 -1
  36. package/package.json +1 -1
  37. package/packages/export/src/mixin.js +5 -5
  38. package/packages/form/src/form-config-item.js +4 -2
  39. package/packages/form/src/form-item.js +8 -2
  40. package/packages/form/src/form.js +4 -0
  41. package/packages/table/src/cell.js +3 -1
  42. package/packages/table/src/methods.js +1 -1
  43. package/packages/table/src/table.js +4 -4
  44. package/packages/v-x-e-table/index.js +7 -4
  45. package/packages/v-x-e-table/src/commands.js +3 -3
  46. package/packages/v-x-e-table/src/{setup.js → config.js} +2 -2
  47. package/packages/v-x-e-table/src/formats.js +3 -3
  48. package/packages/v-x-e-table/src/menus.js +3 -3
  49. package/styles/form.scss +14 -0
  50. package/types/v-x-e-table/index.d.ts +21 -9
  51. package/lib/v-x-e-table/src/setup.min.js +0 -1
  52. /package/lib/icon/style/{iconfont.1693698495640.ttf → iconfont.1694565617502.ttf} +0 -0
  53. /package/lib/icon/style/{iconfont.1693698495640.woff → iconfont.1694565617502.woff} +0 -0
  54. /package/lib/icon/style/{iconfont.1693698495640.woff2 → iconfont.1694565617502.woff2} +0 -0
  55. /package/lib/{iconfont.1693698495640.ttf → iconfont.1694565617502.ttf} +0 -0
  56. /package/lib/{iconfont.1693698495640.woff → iconfont.1694565617502.woff} +0 -0
  57. /package/lib/{iconfont.1693698495640.woff2 → iconfont.1694565617502.woff2} +0 -0
  58. /package/types/v-x-e-table/{setup.d.ts → config.d.ts} +0 -0
package/lib/index.umd.js CHANGED
@@ -10526,6 +10526,7 @@ __webpack_require__.d(__webpack_exports__, {
10526
10526
  "config": () => (/* reexport */ config),
10527
10527
  "default": () => (/* binding */ entry_lib),
10528
10528
  "formats": () => (/* reexport */ formats),
10529
+ "globalConfs": () => (/* reexport */ globalConfs),
10529
10530
  "install": () => (/* reexport */ install),
10530
10531
  "interceptor": () => (/* reexport */ interceptor),
10531
10532
  "menus": () => (/* reexport */ menus),
@@ -10583,6 +10584,7 @@ __webpack_require__.d(all_namespaceObject, {
10583
10584
  "commands": () => (commands),
10584
10585
  "config": () => (config),
10585
10586
  "formats": () => (formats),
10587
+ "globalConfs": () => (globalConfs),
10586
10588
  "install": () => (install),
10587
10589
  "interceptor": () => (interceptor),
10588
10590
  "menus": () => (menus),
@@ -11045,7 +11047,7 @@ var es_array_concat = __webpack_require__(2222);
11045
11047
 
11046
11048
 
11047
11049
  function getLog(message, params) {
11048
- return "[vxe-table v".concat("3.7.0-beta.18", "] ").concat(conf.i18n(message, params));
11050
+ return "[vxe-table v".concat("3.7.0-beta.20", "] ").concat(conf.i18n(message, params));
11049
11051
  }
11050
11052
  function outLog(type) {
11051
11053
  return function (message, params) {
@@ -12178,7 +12180,9 @@ var VXECommandsStore = /*#__PURE__*/function () {
12178
12180
  var conf = this.store[name];
12179
12181
  // 兼容
12180
12182
  if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(render)) {
12181
- if (false) {}
12183
+ // if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
12184
+ // warnLog('vxe.error.delProp', ['commands -> callback', 'commandMethod'])
12185
+ // }
12182
12186
  render = {
12183
12187
  commandMethod: render
12184
12188
  };
@@ -12236,7 +12240,9 @@ var VXEMenusStore = /*#__PURE__*/function () {
12236
12240
  var conf = this.store[name];
12237
12241
  // 兼容
12238
12242
  if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(render)) {
12239
- if (false) {}
12243
+ // if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
12244
+ // warnLog('vxe.error.delProp', ['menus -> callback', 'menuMethod'])
12245
+ // }
12240
12246
  render = {
12241
12247
  menuMethod: render
12242
12248
  };
@@ -12294,7 +12300,9 @@ var VXEFormatsStore = /*#__PURE__*/function () {
12294
12300
  var conf = this.store[name];
12295
12301
  // 兼容
12296
12302
  if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(render)) {
12297
- if (false) {}
12303
+ // if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
12304
+ // warnLog('vxe.error.delProp', ['formats -> callback', 'cellFormatMethod'])
12305
+ // }
12298
12306
  render = {
12299
12307
  cellFormatMethod: render
12300
12308
  };
@@ -12373,14 +12381,14 @@ var Store = /*#__PURE__*/function () {
12373
12381
 
12374
12382
  var validators = new store();
12375
12383
  if (false) {}
12376
- ;// CONCATENATED MODULE: ./packages/v-x-e-table/src/setup.js
12384
+ ;// CONCATENATED MODULE: ./packages/v-x-e-table/src/config.js
12377
12385
 
12378
12386
 
12379
12387
 
12380
12388
  /**
12381
12389
  * 全局参数设置
12382
12390
  */
12383
- function setup(options) {
12391
+ function config(options) {
12384
12392
  return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().merge(conf, options);
12385
12393
  }
12386
12394
  ;// CONCATENATED MODULE: ./packages/v-x-e-table/index.js
@@ -12471,8 +12479,8 @@ var VXETableConfig = /*#__PURE__*/function () {
12471
12479
  }
12472
12480
  }]);
12473
12481
  return VXETableConfig;
12474
- }();
12475
- var config = new VXETableConfig();
12482
+ }(); // 已废弃
12483
+ var globalConfs = new VXETableConfig();
12476
12484
  function t(key, args) {
12477
12485
  return conf.i18n(key, args);
12478
12486
  }
@@ -12480,19 +12488,20 @@ function _t(key, args) {
12480
12488
  return key ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toValueString(conf.translate ? conf.translate(key, args) : key) : '';
12481
12489
  }
12482
12490
  var v = 'v3';
12491
+ var setup = config;
12483
12492
  var VXETable = {
12484
12493
  v: v,
12485
- version: "3.7.0-beta.18",
12494
+ version: "3.7.0-beta.20",
12486
12495
  reg: reg,
12487
12496
  use: use,
12488
12497
  setup: setup,
12498
+ config: config,
12489
12499
  interceptor: interceptor,
12490
12500
  renderer: renderer,
12491
12501
  commands: commands,
12492
12502
  formats: formats,
12493
12503
  menus: menus,
12494
12504
  validators: validators,
12495
- config: config,
12496
12505
  t: t,
12497
12506
  _t: _t
12498
12507
  };
@@ -15583,7 +15592,9 @@ var Cell = {
15583
15592
  },
15584
15593
  on: {
15585
15594
  click: function click(evnt) {
15586
- $table.triggerFilterEvent(evnt, params.column, params);
15595
+ if ($table.triggerFilterEvent) {
15596
+ $table.triggerFilterEvent(evnt, params.column, params);
15597
+ }
15587
15598
  }
15588
15599
  }
15589
15600
  })])] : [];
@@ -17415,7 +17426,7 @@ var Methods = {
17415
17426
  */
17416
17427
  showColumn: function showColumn(fieldOrColumn) {
17417
17428
  var column = handleFieldOrColumn(this, fieldOrColumn);
17418
- if (column && column.visible) {
17429
+ if (column && !column.visible) {
17419
17430
  column.visible = true;
17420
17431
  return this.handleCustom();
17421
17432
  }
@@ -31604,7 +31615,7 @@ function handleFileImport($xetable, file, opts) {
31604
31615
  filename = _UtilTools$parseFile.filename;
31605
31616
 
31606
31617
  // 检查类型,如果为自定义导出,则不需要校验类型
31607
- if (!importMethod && !external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().includes(v_x_e_table.config.importTypes, type)) {
31618
+ if (!importMethod && !external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().includes(v_x_e_table.globalConfs.importTypes, type)) {
31608
31619
  if (opts.message !== false) {
31609
31620
  // 检测弹窗模块
31610
31621
  if (false) {}
@@ -31836,7 +31847,7 @@ function handleExportAndPrint($xetable, options, isPrint) {
31836
31847
  message: true,
31837
31848
  isHeader: true
31838
31849
  }, options);
31839
- var types = defOpts.types || v_x_e_table.config.exportTypes;
31850
+ var types = defOpts.types || v_x_e_table.globalConfs.exportTypes;
31840
31851
  var modes = defOpts.modes;
31841
31852
  var checkMethod = customOpts.checkMethod;
31842
31853
  var exportColumns = collectColumn.slice(0);
@@ -32096,7 +32107,7 @@ var mixin_convertToRows = function convertToRows(originColumns) {
32096
32107
  }
32097
32108
 
32098
32109
  // 检查类型,如果为自定义导出,则不需要校验类型
32099
- if (!opts.exportMethod && !external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().includes(v_x_e_table.config.exportTypes, type)) {
32110
+ if (!opts.exportMethod && !external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().includes(v_x_e_table.globalConfs.exportTypes, type)) {
32100
32111
  if (false) {}
32101
32112
  var params = {
32102
32113
  status: false
@@ -32176,7 +32187,7 @@ var mixin_convertToRows = function convertToRows(originColumns) {
32176
32187
  _importData: function _importData(options) {
32177
32188
  var _this2 = this;
32178
32189
  var opts = Object.assign({
32179
- types: v_x_e_table.config.importTypes
32190
+ types: v_x_e_table.globalConfs.importTypes
32180
32191
  // beforeImportMethod: null,
32181
32192
  // afterImportMethod: null
32182
32193
  }, this.importOpts, options);
@@ -32237,7 +32248,7 @@ var mixin_convertToRows = function convertToRows(originColumns) {
32237
32248
  var defOpts = Object.assign({
32238
32249
  mode: 'insert',
32239
32250
  message: true,
32240
- types: v_x_e_table.config.importTypes
32251
+ types: v_x_e_table.globalConfs.importTypes
32241
32252
  }, options, this.importOpts);
32242
32253
  var types = defOpts.types;
32243
32254
  var isTree = !!this.getTreeStatus();
@@ -37998,7 +38009,8 @@ var VxeFormConfigItem = {
37998
38009
  allTitleWidth = $xeform.titleWidth,
37999
38010
  allTitleColon = $xeform.titleColon,
38000
38011
  allTitleAsterisk = $xeform.titleAsterisk,
38001
- allTitleOverflow = $xeform.titleOverflow;
38012
+ allTitleOverflow = $xeform.titleOverflow,
38013
+ allVertical = $xeform.vertical;
38002
38014
  var slots = item.slots,
38003
38015
  title = item.title,
38004
38016
  folding = item.folding,
@@ -38010,6 +38022,7 @@ var VxeFormConfigItem = {
38010
38022
  errRule = item.errRule,
38011
38023
  className = item.className,
38012
38024
  titleOverflow = item.titleOverflow,
38025
+ vertical = item.vertical,
38013
38026
  children = item.children,
38014
38027
  showTitle = item.showTitle,
38015
38028
  contentClassName = item.contentClassName,
@@ -38030,6 +38043,7 @@ var VxeFormConfigItem = {
38030
38043
  var titleColon = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(item.titleColon) ? allTitleColon : item.titleColon;
38031
38044
  var titleAsterisk = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(item.titleAsterisk) ? allTitleAsterisk : item.titleAsterisk;
38032
38045
  var itemOverflow = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isUndefined(titleOverflow) || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNull(titleOverflow) ? allTitleOverflow : titleOverflow;
38046
+ var itemVertical = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isUndefined(vertical) || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNull(vertical) ? allVertical : vertical;
38033
38047
  var ovEllipsis = itemOverflow === 'ellipsis';
38034
38048
  var ovTitle = itemOverflow === 'title';
38035
38049
  var ovTooltip = itemOverflow === true || itemOverflow === 'tooltip';
@@ -38089,6 +38103,7 @@ var VxeFormConfigItem = {
38089
38103
  "class": ['vxe-form--item', item.id, span ? "vxe-col--".concat(span, " is--span") : null, className ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(className) ? className(params) : className : '', itemClassName ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(itemClassName) ? itemClassName(params) : itemClassName : '', {
38090
38104
  'is--title': title,
38091
38105
  'is--colon': titleColon,
38106
+ 'is--vertical': itemVertical,
38092
38107
  'is--asterisk': titleAsterisk,
38093
38108
  'is--required': isRequired,
38094
38109
  'is--hidden': folding && collapseAll,
@@ -38280,6 +38295,10 @@ function getResetValue(value, resetValue) {
38280
38295
  type: [Boolean, String],
38281
38296
  "default": null
38282
38297
  },
38298
+ vertical: {
38299
+ type: Boolean,
38300
+ "default": null
38301
+ },
38283
38302
  className: [String, Function],
38284
38303
  readonly: Boolean,
38285
38304
  items: Array,
@@ -38911,6 +38930,10 @@ var form_item_props = {
38911
38930
  type: Boolean,
38912
38931
  "default": true
38913
38932
  },
38933
+ vertical: {
38934
+ type: Boolean,
38935
+ "default": null
38936
+ },
38914
38937
  className: [String, Function],
38915
38938
  contentClassName: [String, Function],
38916
38939
  contentStyle: [Object, Function],
@@ -38950,7 +38973,8 @@ var renderItem = function renderItem(h, _vm, item, slots) {
38950
38973
  allTitleWidth = _vm.titleWidth,
38951
38974
  allTitleColon = _vm.titleColon,
38952
38975
  allTitleAsterisk = _vm.titleAsterisk,
38953
- allTitleOverflow = _vm.titleOverflow;
38976
+ allTitleOverflow = _vm.titleOverflow,
38977
+ allVertical = _vm.vertical;
38954
38978
  var title = item.title,
38955
38979
  folding = item.folding,
38956
38980
  visible = item.visible,
@@ -38961,6 +38985,7 @@ var renderItem = function renderItem(h, _vm, item, slots) {
38961
38985
  errRule = item.errRule,
38962
38986
  className = item.className,
38963
38987
  titleOverflow = item.titleOverflow,
38988
+ vertical = item.vertical,
38964
38989
  showTitle = item.showTitle,
38965
38990
  contentClassName = item.contentClassName,
38966
38991
  contentStyle = item.contentStyle,
@@ -38980,6 +39005,7 @@ var renderItem = function renderItem(h, _vm, item, slots) {
38980
39005
  var titleColon = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(item.titleColon) ? allTitleColon : item.titleColon;
38981
39006
  var titleAsterisk = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(item.titleAsterisk) ? allTitleAsterisk : item.titleAsterisk;
38982
39007
  var itemOverflow = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isUndefined(titleOverflow) || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNull(titleOverflow) ? allTitleOverflow : titleOverflow;
39008
+ var itemVertical = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isUndefined(vertical) || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNull(vertical) ? allVertical : vertical;
38983
39009
  var ovEllipsis = itemOverflow === 'ellipsis';
38984
39010
  var ovTitle = itemOverflow === 'title';
38985
39011
  var ovTooltip = itemOverflow === true || itemOverflow === 'tooltip';
@@ -39024,6 +39050,7 @@ var renderItem = function renderItem(h, _vm, item, slots) {
39024
39050
  "class": ['vxe-form--item', item.id, span ? "vxe-col--".concat(span, " is--span") : '', className ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(className) ? className(params) : className : '', itemClassName ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(itemClassName) ? itemClassName(params) : itemClassName : '', {
39025
39051
  'is--title': title,
39026
39052
  'is--colon': titleColon,
39053
+ 'is--vertical': itemVertical,
39027
39054
  'is--asterisk': titleAsterisk,
39028
39055
  'is--required': isRequired,
39029
39056
  'is--hidden': folding && collapseAll,