vxe-table 3.3.14-beta.0 → 3.3.14-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.
package/lib/index.umd.js CHANGED
@@ -504,33 +504,6 @@ fixRegExpWellKnownSymbolLogic('split', 2, function (SPLIT, nativeSplit, maybeCal
504
504
  }, !SUPPORTS_Y);
505
505
 
506
506
 
507
- /***/ }),
508
-
509
- /***/ "13d5":
510
- /***/ (function(module, exports, __webpack_require__) {
511
-
512
- "use strict";
513
-
514
- var $ = __webpack_require__("23e7");
515
- var $reduce = __webpack_require__("d58f").left;
516
- var arrayMethodIsStrict = __webpack_require__("a640");
517
- var CHROME_VERSION = __webpack_require__("2d00");
518
- var IS_NODE = __webpack_require__("605d");
519
-
520
- var STRICT_METHOD = arrayMethodIsStrict('reduce');
521
- // Chrome 80-82 has a critical bug
522
- // https://bugs.chromium.org/p/chromium/issues/detail?id=1049982
523
- var CHROME_BUG = !IS_NODE && CHROME_VERSION > 79 && CHROME_VERSION < 83;
524
-
525
- // `Array.prototype.reduce` method
526
- // https://tc39.es/ecma262/#sec-array.prototype.reduce
527
- $({ target: 'Array', proto: true, forced: !STRICT_METHOD || CHROME_BUG }, {
528
- reduce: function reduce(callbackfn /* , initialValue */) {
529
- return $reduce(this, callbackfn, arguments.length, arguments.length > 1 ? arguments[1] : undefined);
530
- }
531
- });
532
-
533
-
534
507
  /***/ }),
535
508
 
536
509
  /***/ "14c3":
@@ -6396,53 +6369,6 @@ module.exports = function (it, TAG, STATIC) {
6396
6369
  };
6397
6370
 
6398
6371
 
6399
- /***/ }),
6400
-
6401
- /***/ "d58f":
6402
- /***/ (function(module, exports, __webpack_require__) {
6403
-
6404
- var aFunction = __webpack_require__("1c0b");
6405
- var toObject = __webpack_require__("7b0b");
6406
- var IndexedObject = __webpack_require__("44ad");
6407
- var toLength = __webpack_require__("50c4");
6408
-
6409
- // `Array.prototype.{ reduce, reduceRight }` methods implementation
6410
- var createMethod = function (IS_RIGHT) {
6411
- return function (that, callbackfn, argumentsLength, memo) {
6412
- aFunction(callbackfn);
6413
- var O = toObject(that);
6414
- var self = IndexedObject(O);
6415
- var length = toLength(O.length);
6416
- var index = IS_RIGHT ? length - 1 : 0;
6417
- var i = IS_RIGHT ? -1 : 1;
6418
- if (argumentsLength < 2) while (true) {
6419
- if (index in self) {
6420
- memo = self[index];
6421
- index += i;
6422
- break;
6423
- }
6424
- index += i;
6425
- if (IS_RIGHT ? index < 0 : length <= index) {
6426
- throw TypeError('Reduce of empty array with no initial value');
6427
- }
6428
- }
6429
- for (;IS_RIGHT ? index >= 0 : length > index; index += i) if (index in self) {
6430
- memo = callbackfn(memo, self[index], index, O);
6431
- }
6432
- return memo;
6433
- };
6434
- };
6435
-
6436
- module.exports = {
6437
- // `Array.prototype.reduce` method
6438
- // https://tc39.es/ecma262/#sec-array.prototype.reduce
6439
- left: createMethod(false),
6440
- // `Array.prototype.reduceRight` method
6441
- // https://tc39.es/ecma262/#sec-array.prototype.reduceright
6442
- right: createMethod(true)
6443
- };
6444
-
6445
-
6446
6372
  /***/ }),
6447
6373
 
6448
6374
  /***/ "d784":
@@ -10896,6 +10822,7 @@ function syncBodyScroll(scrollTop, elem1, elem2) {
10896
10822
  $xetable = this.$parent,
10897
10823
  fixedType = this.fixedType;
10898
10824
  var $refs = $xetable.$refs,
10825
+ elemStore = $xetable.elemStore,
10899
10826
  highlightHoverRow = $xetable.highlightHoverRow,
10900
10827
  scrollXLoad = $xetable.scrollXLoad,
10901
10828
  scrollYLoad = $xetable.scrollYLoad,
@@ -10912,6 +10839,10 @@ function syncBodyScroll(scrollTop, elem1, elem2) {
10912
10839
  var bodyElem = tableBody.$el;
10913
10840
  var leftElem = leftBody ? leftBody.$el : null;
10914
10841
  var rightElem = rightBody ? rightBody.$el : null;
10842
+ var bodyYElem = elemStore['main-body-ySpace'];
10843
+ var bodyXElem = elemStore['main-body-xSpace'];
10844
+ var bodyHeight = bodyYElem ? bodyYElem.clientHeight : 0;
10845
+ var bodyWidth = bodyXElem ? bodyXElem.clientWidth : 0;
10915
10846
  var scrollTop = scrollBodyElem.scrollTop;
10916
10847
  var scrollLeft = bodyElem.scrollLeft;
10917
10848
  var isRollX = scrollLeft !== lastScrollLeft;
@@ -10967,6 +10898,8 @@ function syncBodyScroll(scrollTop, elem1, elem2) {
10967
10898
  fixed: fixedType,
10968
10899
  scrollTop: scrollTop,
10969
10900
  scrollLeft: scrollLeft,
10901
+ bodyHeight: bodyHeight,
10902
+ bodyWidth: bodyWidth,
10970
10903
  isX: isRollX,
10971
10904
  isY: isRollY
10972
10905
  }, evnt);
@@ -10975,7 +10908,8 @@ function syncBodyScroll(scrollTop, elem1, elem2) {
10975
10908
  var _this = this;
10976
10909
 
10977
10910
  var $xetable = this.$parent;
10978
- var $refs = $xetable.$refs;
10911
+ var $refs = $xetable.$refs,
10912
+ elemStore = $xetable.elemStore;
10979
10913
  var tableBody = $refs.tableBody,
10980
10914
  leftBody = $refs.leftBody,
10981
10915
  rightBody = $refs.rightBody;
@@ -10983,6 +10917,10 @@ function syncBodyScroll(scrollTop, elem1, elem2) {
10983
10917
  var leftElem = leftBody ? leftBody.$el : null;
10984
10918
  var rightElem = rightBody ? rightBody.$el : null;
10985
10919
  var remainSize = this.isPrevWheelTop === isTopWheel ? Math.max(0, this.wheelYSize - this.wheelYTotal) : 0;
10920
+ var bodyYElem = elemStore['main-body-ySpace'];
10921
+ var bodyXElem = elemStore['main-body-xSpace'];
10922
+ var bodyHeight = bodyYElem ? bodyYElem.clientHeight : 0;
10923
+ var bodyWidth = bodyXElem ? bodyXElem.clientWidth : 0;
10986
10924
  this.isPrevWheelTop = isTopWheel;
10987
10925
  this.wheelYSize = Math.abs(isTopWheel ? deltaTop - remainSize : deltaTop + remainSize);
10988
10926
  this.wheelYInterval = 0;
@@ -11028,6 +10966,8 @@ function syncBodyScroll(scrollTop, elem1, elem2) {
11028
10966
  fixed: fixedType,
11029
10967
  scrollTop: bodyElem.scrollTop,
11030
10968
  scrollLeft: bodyElem.scrollLeft,
10969
+ bodyHeight: bodyHeight,
10970
+ bodyWidth: bodyWidth,
11031
10971
  isX: isRollX,
11032
10972
  isY: isRollY
11033
10973
  }, evnt);
@@ -11145,9 +11085,6 @@ function _objectSpread2(target) {
11145
11085
 
11146
11086
  return target;
11147
11087
  }
11148
- // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.reduce.js
11149
- var es_array_reduce = __webpack_require__("13d5");
11150
-
11151
11088
  // EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.trim.js
11152
11089
  var es_string_trim = __webpack_require__("498a");
11153
11090
 
@@ -12045,6 +11982,8 @@ var Cell = {
12045
11982
 
12046
11983
 
12047
11984
 
11985
+
11986
+
12048
11987
 
12049
11988
 
12050
11989
 
@@ -30342,6 +30281,8 @@ var Colgroup = Object.assign(src_group, {
30342
30281
 
30343
30282
 
30344
30283
 
30284
+
30285
+
30345
30286
  var grid_methods = {};
30346
30287
  var propKeys = Object.keys(packages_table.props);
30347
30288
 
@@ -30387,8 +30328,8 @@ function renderDefaultForm(h, _vm) {
30387
30328
  on: {
30388
30329
  submit: _vm.submitEvent,
30389
30330
  reset: _vm.resetEvent,
30390
- 'submit-invalid': _vm.submitInvalidEvent,
30391
- 'toggle-collapse': _vm.togglCollapseEvent
30331
+ collapse: _vm.collapseEvent,
30332
+ 'submit-invalid': _vm.submitInvalidEvent
30392
30333
  },
30393
30334
  scopedSlots: formSlots
30394
30335
  })];
@@ -31438,7 +31379,7 @@ Object.keys(packages_table.methods).forEach(function (name) {
31438
31379
  $grid: this
31439
31380
  }, params));
31440
31381
  },
31441
- togglCollapseEvent: function togglCollapseEvent(params) {
31382
+ collapseEvent: function collapseEvent(params) {
31442
31383
  var _this6 = this;
31443
31384
 
31444
31385
  this.$nextTick(function () {
@@ -31447,6 +31388,9 @@ Object.keys(packages_table.methods).forEach(function (name) {
31447
31388
  this.$emit('form-toggle-collapse', Object.assign({
31448
31389
  $grid: this
31449
31390
  }, params));
31391
+ this.$emit('form-collapse', Object.assign({
31392
+ $grid: this
31393
+ }, params));
31450
31394
  },
31451
31395
  triggerZoomEvent: function triggerZoomEvent(evnt) {
31452
31396
  this.zoom();
@@ -33091,6 +33035,10 @@ var autoTxtElem;
33091
33035
  type: [String, Number],
33092
33036
  default: 2
33093
33037
  },
33038
+ cols: {
33039
+ type: [String, Number],
33040
+ default: null
33041
+ },
33094
33042
  showWordCount: Boolean,
33095
33043
  countMethod: Function,
33096
33044
  autosize: [Boolean, Object],
@@ -33172,14 +33120,18 @@ var autoTxtElem;
33172
33120
  maxlength = this.maxlength,
33173
33121
  autosize = this.autosize,
33174
33122
  showWordCount = this.showWordCount,
33175
- countMethod = this.countMethod;
33123
+ countMethod = this.countMethod,
33124
+ rows = this.rows,
33125
+ cols = this.cols;
33176
33126
  var attrs = {
33177
33127
  name: name,
33178
33128
  form: form,
33179
33129
  placeholder: placeholder,
33180
33130
  maxlength: maxlength,
33181
33131
  readonly: readonly,
33182
- disabled: disabled
33132
+ disabled: disabled,
33133
+ rows: rows,
33134
+ cols: cols
33183
33135
  };
33184
33136
 
33185
33137
  if (placeholder) {
@@ -33187,7 +33139,7 @@ var autoTxtElem;
33187
33139
  }
33188
33140
 
33189
33141
  return h('div', {
33190
- class: ['vxe-textarea', className, (_ref = {}, _defineProperty(_ref, "size--".concat(vSize), vSize), _defineProperty(_ref, 'is--autosize', autosize), _defineProperty(_ref, 'is--disabled', disabled), _ref)]
33142
+ class: ['vxe-textarea', className, (_ref = {}, _defineProperty(_ref, "size--".concat(vSize), vSize), _defineProperty(_ref, 'is--autosize', autosize), _defineProperty(_ref, 'is--disabled', disabled), _defineProperty(_ref, 'def--rows', !external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.eqNull(rows)), _defineProperty(_ref, 'def--cols', !external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.eqNull(cols)), _ref)]
33191
33143
  }, [h('textarea', {
33192
33144
  ref: 'textarea',
33193
33145
  class: 'vxe-textarea--inner',
@@ -34302,6 +34254,78 @@ function assemItem(_vm) {
34302
34254
  $xeform.staticItems.splice([].indexOf.call($xeform.$refs.hideItem.children, $el), 0, itemConfig);
34303
34255
  }
34304
34256
  }
34257
+ // CONCATENATED MODULE: ./packages/form/src/render.js
34258
+
34259
+
34260
+
34261
+
34262
+
34263
+ function renderPrefixIcon(h, titlePrefix) {
34264
+ return h('span', {
34265
+ class: 'vxe-form--item-title-prefix'
34266
+ }, [h('i', {
34267
+ class: titlePrefix.icon || conf.icon.FORM_PREFIX
34268
+ })]);
34269
+ }
34270
+
34271
+ function render_renderSuffixIcon(h, titleSuffix) {
34272
+ return h('span', {
34273
+ class: 'vxe-form--item-title-suffix'
34274
+ }, [h('i', {
34275
+ class: titleSuffix.icon || conf.icon.FORM_SUFFIX
34276
+ })]);
34277
+ }
34278
+
34279
+ function renderTitle(h, _vm, item) {
34280
+ var data = _vm.data;
34281
+ var slots = item.slots,
34282
+ field = item.field,
34283
+ itemRender = item.itemRender,
34284
+ titlePrefix = item.titlePrefix,
34285
+ titleSuffix = item.titleSuffix;
34286
+ var compConf = isEnableConf(itemRender) ? v_x_e_table.renderer.get(itemRender.name) : null;
34287
+ var params = {
34288
+ data: data,
34289
+ property: field,
34290
+ item: item,
34291
+ $form: _vm
34292
+ };
34293
+ var contVNs = [];
34294
+ var titVNs = [];
34295
+
34296
+ if (titlePrefix) {
34297
+ titVNs.push(titlePrefix.message ? h('vxe-tooltip', {
34298
+ props: {
34299
+ content: UtilTools.getFuncText(titlePrefix.message),
34300
+ enterable: titlePrefix.enterable,
34301
+ theme: titlePrefix.theme
34302
+ }
34303
+ }, [renderPrefixIcon(h, titlePrefix)]) : renderPrefixIcon(h, titlePrefix));
34304
+ }
34305
+
34306
+ titVNs.push(h('span', {
34307
+ class: 'vxe-form--item-title-label'
34308
+ }, compConf && compConf.renderItemTitle ? compConf.renderItemTitle(itemRender, params) : slots && slots.title ? _vm.callSlot(slots.title, params, h) : UtilTools.getFuncText(item.title)));
34309
+ contVNs.push(h('div', {
34310
+ class: 'vxe-form--item-title-content'
34311
+ }, titVNs));
34312
+ var fixVNs = [];
34313
+
34314
+ if (titleSuffix) {
34315
+ fixVNs.push(titleSuffix.message ? h('vxe-tooltip', {
34316
+ props: {
34317
+ content: UtilTools.getFuncText(titleSuffix.message),
34318
+ enterable: titleSuffix.enterable,
34319
+ theme: titleSuffix.theme
34320
+ }
34321
+ }, [render_renderSuffixIcon(h, titleSuffix)]) : render_renderSuffixIcon(h, titleSuffix));
34322
+ }
34323
+
34324
+ contVNs.push(h('div', {
34325
+ class: 'vxe-form--item-title-postfix'
34326
+ }, fixVNs));
34327
+ return contVNs;
34328
+ }
34305
34329
  // CONCATENATED MODULE: ./packages/form/src/form.js
34306
34330
 
34307
34331
 
@@ -34331,6 +34355,7 @@ function assemItem(_vm) {
34331
34355
 
34332
34356
 
34333
34357
 
34358
+
34334
34359
 
34335
34360
 
34336
34361
  var form_Rule = /*#__PURE__*/function () {
@@ -34398,89 +34423,6 @@ function getResetValue(value, resetValue) {
34398
34423
  return resetValue;
34399
34424
  }
34400
34425
 
34401
- function form_callSlot(_vm, slotFunc, params, h) {
34402
- if (slotFunc) {
34403
- var $scopedSlots = _vm.$scopedSlots;
34404
-
34405
- if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isString(slotFunc)) {
34406
- slotFunc = $scopedSlots[slotFunc] || null;
34407
- }
34408
-
34409
- if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isFunction(slotFunc)) {
34410
- return slotFunc.call(_vm, params, h);
34411
- }
34412
- }
34413
-
34414
- return [];
34415
- }
34416
-
34417
- function renderPrefixIcon(h, titlePrefix) {
34418
- return h('span', {
34419
- class: 'vxe-form--item-title-prefix'
34420
- }, [h('i', {
34421
- class: titlePrefix.icon || conf.icon.FORM_PREFIX
34422
- })]);
34423
- }
34424
-
34425
- function form_renderSuffixIcon(h, titleSuffix) {
34426
- return h('span', {
34427
- class: 'vxe-form--item-title-suffix'
34428
- }, [h('i', {
34429
- class: titleSuffix.icon || conf.icon.FORM_SUFFIX
34430
- })]);
34431
- }
34432
-
34433
- function renderTitle(h, _vm, item) {
34434
- var data = _vm.data;
34435
- var slots = item.slots,
34436
- field = item.field,
34437
- itemRender = item.itemRender,
34438
- titlePrefix = item.titlePrefix,
34439
- titleSuffix = item.titleSuffix;
34440
- var compConf = isEnableConf(itemRender) ? v_x_e_table.renderer.get(itemRender.name) : null;
34441
- var params = {
34442
- data: data,
34443
- property: field,
34444
- item: item,
34445
- $form: _vm
34446
- };
34447
- var contVNs = [];
34448
- var titVNs = [];
34449
-
34450
- if (titlePrefix) {
34451
- titVNs.push(titlePrefix.message ? h('vxe-tooltip', {
34452
- props: {
34453
- content: UtilTools.getFuncText(titlePrefix.message),
34454
- enterable: titlePrefix.enterable,
34455
- theme: titlePrefix.theme
34456
- }
34457
- }, [renderPrefixIcon(h, titlePrefix)]) : renderPrefixIcon(h, titlePrefix));
34458
- }
34459
-
34460
- titVNs.push(h('span', {
34461
- class: 'vxe-form--item-title-label'
34462
- }, compConf && compConf.renderItemTitle ? compConf.renderItemTitle(itemRender, params) : slots && slots.title ? form_callSlot(_vm, slots.title, params, h) : UtilTools.getFuncText(item.title)));
34463
- contVNs.push(h('div', {
34464
- class: 'vxe-form--item-title-content'
34465
- }, titVNs));
34466
- var fixVNs = [];
34467
-
34468
- if (titleSuffix) {
34469
- fixVNs.push(titleSuffix.message ? h('vxe-tooltip', {
34470
- props: {
34471
- content: UtilTools.getFuncText(titleSuffix.message),
34472
- enterable: titleSuffix.enterable,
34473
- theme: titleSuffix.theme
34474
- }
34475
- }, [form_renderSuffixIcon(h, titleSuffix)]) : form_renderSuffixIcon(h, titleSuffix));
34476
- }
34477
-
34478
- contVNs.push(h('div', {
34479
- class: 'vxe-form--item-title-postfix'
34480
- }, fixVNs));
34481
- return contVNs;
34482
- }
34483
-
34484
34426
  function renderItems(h, _vm, itemList) {
34485
34427
  var _e = _vm._e,
34486
34428
  rules = _vm.rules,
@@ -34552,7 +34494,7 @@ function renderItems(h, _vm, itemList) {
34552
34494
  var contentVNs = [];
34553
34495
 
34554
34496
  if (slots && slots.default) {
34555
- contentVNs = form_callSlot(_vm, slots.default, params, h);
34497
+ contentVNs = _vm.callSlot(slots.default, params, h);
34556
34498
  } else if (compConf && compConf.renderItemContent) {
34557
34499
  contentVNs = compConf.renderItemContent.call(_vm, h, itemRender, params);
34558
34500
  } else if (compConf && compConf.renderItem) {
@@ -34613,6 +34555,10 @@ function renderItems(h, _vm, itemList) {
34613
34555
  name: 'VxeForm',
34614
34556
  mixins: [size],
34615
34557
  props: {
34558
+ collapseStatus: {
34559
+ type: Boolean,
34560
+ default: true
34561
+ },
34616
34562
  loading: Boolean,
34617
34563
  data: Object,
34618
34564
  size: {
@@ -34660,11 +34606,17 @@ function renderItems(h, _vm, itemList) {
34660
34606
  return conf.form.preventSubmit;
34661
34607
  }
34662
34608
  },
34663
- validConfig: Object
34609
+ validConfig: Object,
34610
+ customLayout: {
34611
+ type: Boolean,
34612
+ default: function _default() {
34613
+ return conf.form.customLayout;
34614
+ }
34615
+ }
34664
34616
  },
34665
34617
  data: function data() {
34666
34618
  return {
34667
- collapseAll: true,
34619
+ collapseAll: this.collapseStatus,
34668
34620
  staticItems: [],
34669
34621
  formItems: [],
34670
34622
  tooltipTimeout: null,
@@ -34696,25 +34648,30 @@ function renderItems(h, _vm, itemList) {
34696
34648
  return opts;
34697
34649
  }
34698
34650
  },
34651
+ watch: {
34652
+ staticItems: function staticItems(value) {
34653
+ this.formItems = value;
34654
+ },
34655
+ items: function items(value) {
34656
+ this.loadItem(value);
34657
+ },
34658
+ collapseStatus: function collapseStatus(value) {
34659
+ this.collapseAll = !!value;
34660
+ }
34661
+ },
34699
34662
  created: function created() {
34700
34663
  var _this = this;
34701
34664
 
34702
34665
  this.$nextTick(function () {
34703
34666
  var items = _this.items;
34704
34667
 
34668
+ if (false) {}
34669
+
34705
34670
  if (items) {
34706
34671
  _this.loadItem(items);
34707
34672
  }
34708
34673
  });
34709
34674
  },
34710
- watch: {
34711
- staticItems: function staticItems(value) {
34712
- this.formItems = value;
34713
- },
34714
- items: function items(value) {
34715
- this.loadItem(value);
34716
- }
34717
- },
34718
34675
  render: function render(h) {
34719
34676
  var _ref;
34720
34677
 
@@ -34724,7 +34681,8 @@ function renderItems(h, _vm, itemList) {
34724
34681
  data = this.data,
34725
34682
  vSize = this.vSize,
34726
34683
  tooltipOpts = this.tooltipOpts,
34727
- formItems = this.formItems;
34684
+ formItems = this.formItems,
34685
+ customLayout = this.customLayout;
34728
34686
  var hasUseTooltip = v_x_e_table._tooltip;
34729
34687
  return h('form', {
34730
34688
  class: ['vxe-form', className ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isFunction(className) ? className({
@@ -34738,10 +34696,10 @@ function renderItems(h, _vm, itemList) {
34738
34696
  }
34739
34697
  }, [h('div', {
34740
34698
  class: 'vxe-form--wrapper vxe-row'
34741
- }, renderItems(h, this, formItems)), h('div', {
34699
+ }, customLayout ? this.$slots.default : renderItems(h, this, formItems)), h('div', {
34742
34700
  class: 'vxe-form-slots',
34743
34701
  ref: 'hideItem'
34744
- }, this.$slots.default), h('div', {
34702
+ }, customLayout ? [] : this.$slots.default), h('div', {
34745
34703
  class: ['vxe-loading', {
34746
34704
  'is--visible': loading
34747
34705
  }]
@@ -34756,6 +34714,21 @@ function renderItems(h, _vm, itemList) {
34756
34714
  }, tooltipOpts)) : _e()]);
34757
34715
  },
34758
34716
  methods: {
34717
+ callSlot: function callSlot(slotFunc, params, h) {
34718
+ if (slotFunc) {
34719
+ var $scopedSlots = this.$scopedSlots;
34720
+
34721
+ if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isString(slotFunc)) {
34722
+ slotFunc = $scopedSlots[slotFunc] || null;
34723
+ }
34724
+
34725
+ if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isFunction(slotFunc)) {
34726
+ return slotFunc.call(this, params, h);
34727
+ }
34728
+ }
34729
+
34730
+ return [];
34731
+ },
34759
34732
  loadItem: function loadItem(list) {
34760
34733
  var _this2 = this;
34761
34734
 
@@ -34778,13 +34751,24 @@ function renderItems(h, _vm, itemList) {
34778
34751
  return itemList;
34779
34752
  },
34780
34753
  toggleCollapse: function toggleCollapse() {
34781
- this.collapseAll = !this.collapseAll;
34754
+ var status = !this.collapseAll;
34755
+ this.collapseAll = status;
34756
+ this.$emit('update:collapseStatus', status);
34782
34757
  return this.$nextTick();
34783
34758
  },
34784
34759
  toggleCollapseEvent: function toggleCollapseEvent(evnt) {
34785
34760
  this.toggleCollapse();
34761
+ var status = this.collapseAll;
34786
34762
  this.$emit('toggle-collapse', {
34787
- collapse: !this.collapseAll,
34763
+ status: status,
34764
+ collapse: status,
34765
+ data: this.data,
34766
+ $form: this,
34767
+ $event: evnt
34768
+ }, evnt);
34769
+ this.$emit('collapse', {
34770
+ status: status,
34771
+ collapse: status,
34788
34772
  data: this.data,
34789
34773
  $form: this,
34790
34774
  $event: evnt
@@ -35114,7 +35098,7 @@ function renderItems(h, _vm, itemList) {
35114
35098
  handleFocus: function handleFocus(fields) {
35115
35099
  var $el = this.$el;
35116
35100
  var itemList = this.getItems();
35117
- fields.some(function (property) {
35101
+ fields.some(function (property, index) {
35118
35102
  var item = itemList.find(function (item) {
35119
35103
  return item.field === property;
35120
35104
  });
@@ -35122,7 +35106,12 @@ function renderItems(h, _vm, itemList) {
35122
35106
  if (item && isEnableConf(item.itemRender)) {
35123
35107
  var itemRender = item.itemRender;
35124
35108
  var compConf = v_x_e_table.renderer.get(itemRender.name);
35125
- var inputElem; // 如果指定了聚焦 class
35109
+ var inputElem; // 定位到第一个
35110
+
35111
+ if (!index) {
35112
+ DomTools.scrollToView($el.querySelector(".".concat(item.id)));
35113
+ } // 如果指定了聚焦 class
35114
+
35126
35115
 
35127
35116
  if (itemRender.autofocus) {
35128
35117
  inputElem = $el.querySelector(".".concat(item.id, " ").concat(itemRender.autofocus));
@@ -35194,6 +35183,13 @@ var Form = Object.assign(src_form, {
35194
35183
 
35195
35184
 
35196
35185
 
35186
+
35187
+
35188
+
35189
+
35190
+
35191
+
35192
+
35197
35193
  var form_item_props = {
35198
35194
  title: String,
35199
35195
  field: String,
@@ -35227,6 +35223,115 @@ Object.keys(form_item_props).forEach(function (name) {
35227
35223
  this.itemConfig.update(name, value);
35228
35224
  };
35229
35225
  });
35226
+
35227
+ var form_item_renderItem = function renderItem(h, _vm, item, slots) {
35228
+ var rules = _vm.rules,
35229
+ data = _vm.data,
35230
+ collapseAll = _vm.collapseAll,
35231
+ validOpts = _vm.validOpts,
35232
+ allTitleOverflow = _vm.titleOverflow;
35233
+ var title = item.title,
35234
+ folding = item.folding,
35235
+ visible = item.visible,
35236
+ visibleMethod = item.visibleMethod,
35237
+ field = item.field,
35238
+ collapseNode = item.collapseNode,
35239
+ itemRender = item.itemRender,
35240
+ showError = item.showError,
35241
+ errRule = item.errRule,
35242
+ className = item.className,
35243
+ titleOverflow = item.titleOverflow;
35244
+ var compConf = isEnableConf(itemRender) ? v_x_e_table.renderer.get(itemRender.name) : null;
35245
+ var span = item.span || _vm.span;
35246
+ var align = item.align || _vm.align;
35247
+ var titleAlign = item.titleAlign || _vm.titleAlign;
35248
+ var titleWidth = item.titleWidth || _vm.titleWidth;
35249
+ var itemVisibleMethod = visibleMethod;
35250
+ var itemOverflow = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isUndefined(titleOverflow) || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isNull(titleOverflow) ? allTitleOverflow : titleOverflow;
35251
+ var showEllipsis = itemOverflow === 'ellipsis';
35252
+ var showTitle = itemOverflow === 'title';
35253
+ var showTooltip = itemOverflow === true || itemOverflow === 'tooltip';
35254
+ var hasEllipsis = showTitle || showTooltip || showEllipsis;
35255
+ var params = {
35256
+ data: data,
35257
+ property: field,
35258
+ item: item,
35259
+ $form: _vm
35260
+ };
35261
+ var isRequired;
35262
+
35263
+ if (!itemVisibleMethod && compConf && compConf.itemVisibleMethod) {
35264
+ itemVisibleMethod = compConf.itemVisibleMethod;
35265
+ }
35266
+
35267
+ if (rules) {
35268
+ var itemRules = rules[field];
35269
+
35270
+ if (itemRules) {
35271
+ isRequired = itemRules.some(function (rule) {
35272
+ return rule.required;
35273
+ });
35274
+ }
35275
+ }
35276
+
35277
+ var contentVNs = [];
35278
+
35279
+ if (slots && slots.default) {
35280
+ contentVNs = _vm.callSlot(slots.default, params, h);
35281
+ } else if (compConf && compConf.renderItemContent) {
35282
+ contentVNs = compConf.renderItemContent.call(_vm, h, itemRender, params);
35283
+ } else if (compConf && compConf.renderItem) {
35284
+ contentVNs = compConf.renderItem.call(_vm, h, itemRender, params);
35285
+ } else if (field) {
35286
+ contentVNs = ["".concat(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.get(data, field))];
35287
+ }
35288
+
35289
+ var ons = showTooltip ? {
35290
+ mouseenter: function mouseenter(evnt) {
35291
+ _vm.triggerHeaderHelpEvent(evnt, params);
35292
+ },
35293
+ mouseleave: _vm.handleTargetLeaveEvent
35294
+ } : {};
35295
+ return h('div', {
35296
+ 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.a.isFunction(className) ? className(params) : className : '', {
35297
+ 'is--title': title,
35298
+ 'is--required': isRequired,
35299
+ 'is--hidden': visible === false || folding && collapseAll,
35300
+ 'is--active': !itemVisibleMethod || itemVisibleMethod(params),
35301
+ 'is--error': showError
35302
+ }]
35303
+ }, [h('div', {
35304
+ class: 'vxe-form--item-inner'
35305
+ }, [title || slots && slots.title ? h('div', {
35306
+ class: ['vxe-form--item-title', titleAlign ? "align--".concat(titleAlign) : null, {
35307
+ 'is--ellipsis': hasEllipsis
35308
+ }],
35309
+ style: titleWidth ? {
35310
+ width: isNaN(titleWidth) ? titleWidth : "".concat(titleWidth, "px")
35311
+ } : null,
35312
+ attrs: {
35313
+ title: showTitle ? UtilTools.getFuncText(title) : null
35314
+ },
35315
+ on: ons
35316
+ }, renderTitle(h, _vm, item)) : null, h('div', {
35317
+ class: ['vxe-form--item-content', align ? "align--".concat(align) : null]
35318
+ }, contentVNs.concat([collapseNode ? h('div', {
35319
+ class: 'vxe-form--item-trigger-node',
35320
+ on: {
35321
+ click: _vm.toggleCollapseEvent
35322
+ }
35323
+ }, [h('span', {
35324
+ class: 'vxe-form--item-trigger-text'
35325
+ }, collapseAll ? conf.i18n('vxe.form.unfolding') : conf.i18n('vxe.form.folding')), h('i', {
35326
+ class: ['vxe-form--item-trigger-icon', collapseAll ? conf.icon.FORM_FOLDING : conf.icon.FORM_UNFOLDING]
35327
+ })]) : null, errRule && validOpts.showMessage ? h('div', {
35328
+ class: 'vxe-form--item-valid',
35329
+ style: errRule.maxWidth ? {
35330
+ width: "".concat(errRule.maxWidth, "px")
35331
+ } : null
35332
+ }, errRule.message) : null]))])]);
35333
+ };
35334
+
35230
35335
  /* harmony default export */ var form_item = ({
35231
35336
  name: 'VxeFormItem',
35232
35337
  props: form_item_props,
@@ -35249,7 +35354,8 @@ Object.keys(form_item_props).forEach(function (name) {
35249
35354
  destroyItem(this);
35250
35355
  },
35251
35356
  render: function render(h) {
35252
- return h('div');
35357
+ var $xeform = this.$xeform;
35358
+ return $xeform && $xeform.customLayout ? form_item_renderItem(h, $xeform, this.itemConfig, this.$scopedSlots) : h('div');
35253
35359
  }
35254
35360
  });
35255
35361
  // CONCATENATED MODULE: ./packages/form-item/index.js
@@ -35264,6 +35370,7 @@ var FormItem = Object.assign(form_item, {
35264
35370
  /* harmony default export */ var packages_form_item = (FormItem);
35265
35371
  // CONCATENATED MODULE: ./packages/form/src/form-gather.js
35266
35372
 
35373
+
35267
35374
  /* harmony default export */ var form_gather = ({
35268
35375
  name: 'VxeFormGather',
35269
35376
  extends: form_item,
@@ -35272,6 +35379,11 @@ var FormItem = Object.assign(form_item, {
35272
35379
  xeformgather: this
35273
35380
  };
35274
35381
  },
35382
+ created: function created() {
35383
+ var _this = this;
35384
+
35385
+ if (false) {}
35386
+ },
35275
35387
  render: function render(h) {
35276
35388
  return h('div', this.$slots.default);
35277
35389
  }