vxe-table 3.4.11 → 3.4.12

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
@@ -8683,7 +8683,17 @@ var iconPrefix = 'vxe-icon--';
8683
8683
  button: {// size: null,
8684
8684
  // transfer: false
8685
8685
  },
8686
- radio: {// size: null
8686
+ radio: {
8687
+ // size: null,
8688
+ strict: true
8689
+ },
8690
+ radioButton: {
8691
+ // size: null,
8692
+ strict: true
8693
+ },
8694
+ radioGroup: {
8695
+ // size: null,
8696
+ strict: true
8687
8697
  },
8688
8698
  checkbox: {// size: null
8689
8699
  },
@@ -9791,14 +9801,14 @@ function getChangeEvent(renderOpts) {
9791
9801
  return 'change';
9792
9802
  }
9793
9803
 
9794
- function parseDate(value, props) {
9804
+ function renderer_parseDate(value, props) {
9795
9805
  return value && props.valueFormat ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.toStringDate(value, props.valueFormat) : value;
9796
9806
  }
9797
9807
 
9798
9808
  function getFormatDate(value, props, defaultFormat) {
9799
9809
  var _props$dateConfig = props.dateConfig,
9800
9810
  dateConfig = _props$dateConfig === void 0 ? {} : _props$dateConfig;
9801
- return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.toDateString(parseDate(value, props), dateConfig.labelFormat || defaultFormat);
9811
+ return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.toDateString(renderer_parseDate(value, props), dateConfig.labelFormat || defaultFormat);
9802
9812
  }
9803
9813
 
9804
9814
  function getLabelFormatDate(value, props) {
@@ -14217,16 +14227,23 @@ var Methods = {
14217
14227
  afterFullData = this.afterFullData,
14218
14228
  treeConfig = this.treeConfig,
14219
14229
  treeOpts = this.treeOpts,
14220
- checkboxOpts = this.checkboxOpts;
14230
+ checkboxOpts = this.checkboxOpts,
14231
+ tableFullTreeData = this.tableFullTreeData,
14232
+ afterTreeFullData = this.afterTreeFullData;
14233
+ var transform = treeOpts.transform,
14234
+ children = treeOpts.children,
14235
+ mapChildren = treeOpts.mapChildren;
14221
14236
  var property = checkboxOpts.checkField;
14222
- var currTableData = isFull ? tableFullData : afterFullData;
14237
+ var currTableData = isFull ? transform ? tableFullTreeData : tableFullData : transform ? afterTreeFullData : afterFullData;
14223
14238
  var rowList = [];
14224
14239
 
14225
14240
  if (property) {
14226
14241
  if (treeConfig) {
14227
14242
  rowList = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.filterTree(currTableData, function (row) {
14228
14243
  return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.get(row, property);
14229
- }, treeOpts);
14244
+ }, {
14245
+ children: transform ? mapChildren : children
14246
+ });
14230
14247
  } else {
14231
14248
  rowList = currTableData.filter(function (row) {
14232
14249
  return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.get(row, property);
@@ -14238,7 +14255,9 @@ var Methods = {
14238
14255
  if (treeConfig) {
14239
14256
  rowList = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.filterTree(currTableData, function (row) {
14240
14257
  return selection.indexOf(row) > -1;
14241
- }, treeOpts);
14258
+ }, {
14259
+ children: transform ? mapChildren : children
14260
+ });
14242
14261
  } else {
14243
14262
  rowList = currTableData.filter(function (row) {
14244
14263
  return selection.indexOf(row) > -1;
@@ -14565,6 +14584,30 @@ var Methods = {
14565
14584
  }
14566
14585
  },
14567
14586
 
14587
+ /**
14588
+ * 只对 tree-config 有效,获取行的父级
14589
+ */
14590
+ getParentRow: function getParentRow(rowOrRowid) {
14591
+ var treeConfig = this.treeConfig,
14592
+ fullDataRowIdData = this.fullDataRowIdData;
14593
+
14594
+ if (rowOrRowid && treeConfig) {
14595
+ var rowid;
14596
+
14597
+ if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isString(rowOrRowid)) {
14598
+ rowid = rowOrRowid;
14599
+ } else {
14600
+ rowid = methods_getRowid(this, rowOrRowid);
14601
+ }
14602
+
14603
+ if (rowid) {
14604
+ return fullDataRowIdData[rowid] ? fullDataRowIdData[rowid].parent : null;
14605
+ }
14606
+ }
14607
+
14608
+ return null;
14609
+ },
14610
+
14568
14611
  /**
14569
14612
  * 根据行的唯一主键获取行
14570
14613
  * @param {String/Number} rowid 行主键
@@ -21434,22 +21477,28 @@ function insertTreeRow(_vm, newRecords, isAppend) {
21434
21477
  fullDataRowIdData = _vm.fullDataRowIdData,
21435
21478
  fullAllDataRowIdData = _vm.fullAllDataRowIdData,
21436
21479
  treeOpts = _vm.treeOpts;
21480
+ var rowField = treeOpts.rowField,
21481
+ parentField = treeOpts.parentField,
21482
+ children = treeOpts.children,
21483
+ mapChildren = treeOpts.mapChildren;
21437
21484
  var funcName = isAppend ? 'push' : 'unshift';
21438
21485
  newRecords.forEach(function (item) {
21439
- var parentRowId = item[treeOpts.parentField];
21486
+ var parentRowId = item[parentField];
21440
21487
  var rowid = mixin_getRowid(_vm, item);
21441
21488
  var matchObj = parentRowId ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.findTree(tableFullTreeData, function (item) {
21442
- return parentRowId === item[treeOpts.rowField];
21443
- }, treeOpts) : null;
21489
+ return parentRowId === item[rowField];
21490
+ }, {
21491
+ children: mapChildren
21492
+ }) : null;
21444
21493
 
21445
21494
  if (matchObj) {
21446
21495
  var parentRow = matchObj.item;
21447
21496
  var parentRest = fullAllDataRowIdData[mixin_getRowid(_vm, parentRow)];
21448
21497
  var parentLevel = parentRest ? parentRest.level : 0;
21449
- var parentChilds = parentRow[treeOpts.children];
21498
+ var parentChilds = parentRow[children];
21450
21499
 
21451
21500
  if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isArray(parentChilds)) {
21452
- parentChilds = parentRow[treeOpts.children] = [];
21501
+ parentChilds = parentRow[children] = [];
21453
21502
  }
21454
21503
 
21455
21504
  parentChilds[funcName](item);
@@ -21520,7 +21569,9 @@ function insertTreeRow(_vm, newRecords, isAppend) {
21520
21569
  fullDataRowIdData = this.fullDataRowIdData,
21521
21570
  fullAllDataRowIdData = this.fullAllDataRowIdData,
21522
21571
  treeOpts = this.treeOpts;
21523
- var transform = treeOpts.transform;
21572
+ var transform = treeOpts.transform,
21573
+ rowField = treeOpts.rowField,
21574
+ mapChildren = treeOpts.mapChildren;
21524
21575
 
21525
21576
  if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isArray(records)) {
21526
21577
  records = [records];
@@ -21568,8 +21619,10 @@ function insertTreeRow(_vm, newRecords, isAppend) {
21568
21619
  // 如果为虚拟树
21569
21620
  if (treeConfig && transform) {
21570
21621
  var matchObj = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.findTree(tableFullTreeData, function (item) {
21571
- return row[treeOpts.rowField] === item[treeOpts.rowField];
21572
- }, treeOpts);
21622
+ return row[rowField] === item[rowField];
21623
+ }, {
21624
+ children: mapChildren
21625
+ });
21573
21626
 
21574
21627
  if (matchObj) {
21575
21628
  var parentRow = matchObj.parent;
@@ -21582,7 +21635,7 @@ function insertTreeRow(_vm, newRecords, isAppend) {
21582
21635
  if (false) {}
21583
21636
 
21584
21637
  if (parentRow) {
21585
- item[treeOpts.parentField] = parentRow[treeOpts.rowField];
21638
+ item[treeOpts.parentField] = parentRow[rowField];
21586
21639
  }
21587
21640
 
21588
21641
  parentChilds.splice(matchObj.index + i, 0, item);
@@ -21610,7 +21663,15 @@ function insertTreeRow(_vm, newRecords, isAppend) {
21610
21663
  throw new Error(UtilTools.getLog('vxe.error.noTree', ['insert']));
21611
21664
  }
21612
21665
 
21613
- var afIndex = afterFullData.indexOf(row);
21666
+ var afIndex = -1; // 如果是可视索引
21667
+
21668
+ if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isNumber(row)) {
21669
+ if (row < afterFullData.length) {
21670
+ afIndex = row;
21671
+ }
21672
+ } else {
21673
+ afIndex = afterFullData.indexOf(row);
21674
+ }
21614
21675
 
21615
21676
  if (afIndex === -1) {
21616
21677
  throw new Error(UtilTools.error('vxe.error.unableInsert'));
@@ -24485,18 +24546,11 @@ function renderExtraSuffixIcon(h, _vm) {
24485
24546
  dateValue: function dateValue() {
24486
24547
  var value = this.value,
24487
24548
  isDatePickerType = this.isDatePickerType,
24488
- type = this.type,
24489
24549
  dateValueFormat = this.dateValueFormat;
24490
24550
  var val = null;
24491
24551
 
24492
24552
  if (value && isDatePickerType) {
24493
- var date;
24494
-
24495
- if (type === 'time') {
24496
- date = toStringTimeDate(value);
24497
- } else {
24498
- date = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.toStringDate(value, dateValueFormat);
24499
- }
24553
+ var date = this.parseDate(value, dateValueFormat);
24500
24554
 
24501
24555
  if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isValidDate(date)) {
24502
24556
  val = date;
@@ -24555,13 +24609,16 @@ function renderExtraSuffixIcon(h, _vm) {
24555
24609
 
24556
24610
  return '';
24557
24611
  },
24612
+ firstDayOfWeek: function firstDayOfWeek() {
24613
+ var startDay = this.startDay,
24614
+ startWeek = this.startWeek;
24615
+ return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.toNumber(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isNumber(startDay) || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isString(startDay) ? startDay : startWeek);
24616
+ },
24558
24617
  weekDatas: function weekDatas() {
24559
24618
  var weeks = [];
24560
24619
 
24561
24620
  if (this.isDatePickerType) {
24562
- var startDay = this.startDay,
24563
- startWeek = this.startWeek;
24564
- var sWeek = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.toNumber(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isNumber(startDay) || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isString(startDay) ? startDay : startWeek);
24621
+ var sWeek = this.firstDayOfWeek;
24565
24622
  weeks.push(sWeek);
24566
24623
 
24567
24624
  for (var index = 0; index < 6; index++) {
@@ -24727,7 +24784,9 @@ function renderExtraSuffixIcon(h, _vm) {
24727
24784
  return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.chunk(this.dayList, 7);
24728
24785
  },
24729
24786
  weekDates: function weekDates() {
24730
- return this.dayDatas.map(function (list) {
24787
+ var dayDatas = this.dayDatas,
24788
+ firstDayOfWeek = this.firstDayOfWeek;
24789
+ return dayDatas.map(function (list) {
24731
24790
  var firstItem = list[0];
24732
24791
  var item = {
24733
24792
  date: firstItem.date,
@@ -24736,7 +24795,7 @@ function renderExtraSuffixIcon(h, _vm) {
24736
24795
  isCurrent: false,
24737
24796
  isNow: false,
24738
24797
  isNext: false,
24739
- label: external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.getYearWeek(firstItem.date)
24798
+ label: external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.getYearWeek(firstItem.date, firstDayOfWeek)
24740
24799
  };
24741
24800
  return [item].concat(list);
24742
24801
  });
@@ -24831,8 +24890,10 @@ function renderExtraSuffixIcon(h, _vm) {
24831
24890
  this.initValue();
24832
24891
  },
24833
24892
  dateLabelFormat: function dateLabelFormat() {
24834
- this.dateParseValue(this.datePanelValue);
24835
- this.inputValue = this.datePanelLabel;
24893
+ if (this.isDatePickerType) {
24894
+ this.dateParseValue(this.datePanelValue);
24895
+ this.inputValue = this.datePanelLabel;
24896
+ }
24836
24897
  }
24837
24898
  },
24838
24899
  created: function created() {
@@ -25124,6 +25185,15 @@ function renderExtraSuffixIcon(h, _vm) {
25124
25185
  $event: evnt
25125
25186
  });
25126
25187
  },
25188
+ parseDate: function parseDate(value, format) {
25189
+ var type = this.type;
25190
+
25191
+ if (type === 'time') {
25192
+ return toStringTimeDate(value);
25193
+ }
25194
+
25195
+ return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.toStringDate(value, format);
25196
+ },
25127
25197
 
25128
25198
  /**
25129
25199
  * 检查初始值
@@ -25168,7 +25238,8 @@ function renderExtraSuffixIcon(h, _vm) {
25168
25238
  datetimePanelValue = this.datetimePanelValue,
25169
25239
  dateLabelFormat = this.dateLabelFormat,
25170
25240
  min = this.min,
25171
- max = this.max;
25241
+ max = this.max,
25242
+ firstDayOfWeek = this.firstDayOfWeek;
25172
25243
 
25173
25244
  if (!inpReadonly) {
25174
25245
  if (isNumType) {
@@ -25197,13 +25268,7 @@ function renderExtraSuffixIcon(h, _vm) {
25197
25268
  if (inputValue) {
25198
25269
  if (type === 'week' || type === 'quarter') {// 周和季度选择器不支持解析,无需处理
25199
25270
  } else {
25200
- var inpDateVal;
25201
-
25202
- if (type === 'time') {
25203
- inpDateVal = toStringTimeDate(inputValue);
25204
- } else {
25205
- inpDateVal = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.toStringDate(inputValue, dateLabelFormat);
25206
- }
25271
+ var inpDateVal = this.parseDate(inputValue, dateLabelFormat);
25207
25272
 
25208
25273
  if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isValidDate(inpDateVal)) {
25209
25274
  if (type === 'time') {
@@ -25230,7 +25295,9 @@ function renderExtraSuffixIcon(h, _vm) {
25230
25295
  isChange = true;
25231
25296
  }
25232
25297
 
25233
- this.inputValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.toDateString(inpDateVal, dateLabelFormat);
25298
+ this.inputValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.toDateString(inpDateVal, dateLabelFormat, {
25299
+ firstDay: firstDayOfWeek
25300
+ });
25234
25301
 
25235
25302
  if (isChange) {
25236
25303
  this.dateChange(inpDateVal);
@@ -25623,20 +25690,35 @@ function renderExtraSuffixIcon(h, _vm) {
25623
25690
  dateParseValue: function dateParseValue(date) {
25624
25691
  var type = this.type,
25625
25692
  dateLabelFormat = this.dateLabelFormat,
25626
- valueFormat = this.valueFormat;
25693
+ valueFormat = this.valueFormat,
25694
+ firstDayOfWeek = this.firstDayOfWeek;
25627
25695
  var dValue = null;
25628
25696
  var dLabel = '';
25629
25697
 
25630
25698
  if (date) {
25631
- if (type === 'time') {
25632
- dValue = toStringTimeDate(date);
25633
- } else {
25634
- dValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.toStringDate(date, valueFormat);
25635
- }
25699
+ dValue = this.parseDate(date, valueFormat);
25636
25700
  }
25637
25701
 
25638
25702
  if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isValidDate(dValue)) {
25639
- dLabel = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.toDateString(dValue, dateLabelFormat);
25703
+ dLabel = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.toDateString(dValue, dateLabelFormat, {
25704
+ firstDay: firstDayOfWeek
25705
+ }); // 由于年份和第几周是冲突的行为,所以需要特殊处理,判断是否跨年
25706
+
25707
+ if (dateLabelFormat && type === 'week') {
25708
+ var firstWeekDate = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.getWhatWeek(dValue, 0, firstDayOfWeek, firstDayOfWeek);
25709
+
25710
+ if (firstWeekDate.getFullYear() < dValue.getFullYear()) {
25711
+ var yyIndex = dateLabelFormat.indexOf('yyyy');
25712
+
25713
+ if (yyIndex > -1) {
25714
+ var yyNum = Number(dLabel.substring(yyIndex, yyIndex + 4));
25715
+
25716
+ if (yyNum && !isNaN(yyNum)) {
25717
+ dLabel = dLabel.replace("".concat(yyNum), "".concat(yyNum - 1));
25718
+ }
25719
+ }
25720
+ }
25721
+ }
25640
25722
  } else {
25641
25723
  dValue = null;
25642
25724
  }
@@ -25647,7 +25729,8 @@ function renderExtraSuffixIcon(h, _vm) {
25647
25729
  dateOffsetEvent: function dateOffsetEvent(evnt) {
25648
25730
  var isActivated = this.isActivated,
25649
25731
  datePanelValue = this.datePanelValue,
25650
- datePanelType = this.datePanelType;
25732
+ datePanelType = this.datePanelType,
25733
+ firstDayOfWeek = this.firstDayOfWeek;
25651
25734
 
25652
25735
  if (isActivated) {
25653
25736
  evnt.preventDefault();
@@ -25705,11 +25788,11 @@ function renderExtraSuffixIcon(h, _vm) {
25705
25788
  if (isLeftArrow) {
25706
25789
  offsetDay = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.getWhatDay(offsetDay, -1);
25707
25790
  } else if (isUpArrow) {
25708
- offsetDay = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.getWhatWeek(offsetDay, -1);
25791
+ offsetDay = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.getWhatWeek(offsetDay, -1, firstDayOfWeek);
25709
25792
  } else if (isRightArrow) {
25710
25793
  offsetDay = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.getWhatDay(offsetDay, 1);
25711
25794
  } else if (isDwArrow) {
25712
- offsetDay = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.getWhatWeek(offsetDay, 1);
25795
+ offsetDay = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.getWhatWeek(offsetDay, 1, firstDayOfWeek);
25713
25796
  }
25714
25797
 
25715
25798
  this.dateMoveDay(offsetDay);
@@ -25733,18 +25816,21 @@ function renderExtraSuffixIcon(h, _vm) {
25733
25816
  dateChange: function dateChange(date) {
25734
25817
  var value = this.value,
25735
25818
  datetimePanelValue = this.datetimePanelValue,
25736
- dateValueFormat = this.dateValueFormat;
25819
+ dateValueFormat = this.dateValueFormat,
25820
+ firstDayOfWeek = this.firstDayOfWeek;
25737
25821
 
25738
25822
  if (this.type === 'week') {
25739
25823
  var sWeek = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.toNumber(this.selectDay);
25740
- date = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.getWhatWeek(date, 0, sWeek);
25824
+ date = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.getWhatWeek(date, 0, sWeek, firstDayOfWeek);
25741
25825
  } else if (this.hasTime) {
25742
25826
  date.setHours(datetimePanelValue.getHours());
25743
25827
  date.setMinutes(datetimePanelValue.getMinutes());
25744
25828
  date.setSeconds(datetimePanelValue.getSeconds());
25745
25829
  }
25746
25830
 
25747
- var inpVal = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.toDateString(date, dateValueFormat);
25831
+ var inpVal = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.toDateString(date, dateValueFormat, {
25832
+ firstDay: firstDayOfWeek
25833
+ });
25748
25834
  this.dateCheckMonth(date);
25749
25835
 
25750
25836
  if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isEqual(value, inpVal)) {
@@ -27626,6 +27712,12 @@ Object.keys(option_props).forEach(function (name) {
27626
27712
  content: [String, Number],
27627
27713
  disabled: Boolean,
27628
27714
  name: String,
27715
+ strict: {
27716
+ type: Boolean,
27717
+ default: function _default() {
27718
+ return conf.radio.strict;
27719
+ }
27720
+ },
27629
27721
  size: {
27630
27722
  type: String,
27631
27723
  default: function _default() {
@@ -27642,11 +27734,14 @@ Object.keys(option_props).forEach(function (name) {
27642
27734
  isDisabled: function isDisabled() {
27643
27735
  var $xeradiogroup = this.$xeradiogroup;
27644
27736
  return this.disabled || $xeradiogroup && $xeradiogroup.disabled;
27737
+ },
27738
+ isStrict: function isStrict() {
27739
+ var $xeradiogroup = this.$xeradiogroup;
27740
+ return $xeradiogroup ? $xeradiogroup.strict : this.strict;
27645
27741
  }
27646
27742
  },
27647
27743
  render: function render(h) {
27648
- var _ref,
27649
- _this = this;
27744
+ var _ref;
27650
27745
 
27651
27746
  var $scopedSlots = this.$scopedSlots,
27652
27747
  $xeradiogroup = this.$xeradiogroup,
@@ -27677,22 +27772,8 @@ Object.keys(option_props).forEach(function (name) {
27677
27772
  checked: $xeradiogroup ? $xeradiogroup.value === label : value === label
27678
27773
  },
27679
27774
  on: {
27680
- change: function change(evnt) {
27681
- if (!isDisabled) {
27682
- var params = {
27683
- label: label,
27684
- $event: evnt
27685
- };
27686
-
27687
- if ($xeradiogroup) {
27688
- $xeradiogroup.handleChecked(params);
27689
- } else {
27690
- _this.$emit('input', label);
27691
-
27692
- _this.$emit('change', params);
27693
- }
27694
- }
27695
- }
27775
+ change: this.changeEvent,
27776
+ click: this.clickEvent
27696
27777
  }
27697
27778
  }), h('span', {
27698
27779
  class: 'vxe-radio--icon'
@@ -27701,22 +27782,35 @@ Object.keys(option_props).forEach(function (name) {
27701
27782
  }, $scopedSlots.default ? $scopedSlots.default.call(this, {}) : [UtilTools.getFuncText(content)])]);
27702
27783
  },
27703
27784
  methods: {
27785
+ handleValue: function handleValue(label, evnt) {
27786
+ var $xeradiogroup = this.$xeradiogroup;
27787
+ var params = {
27788
+ label: label,
27789
+ $event: evnt
27790
+ };
27791
+
27792
+ if ($xeradiogroup) {
27793
+ $xeradiogroup.handleChecked(params);
27794
+ } else {
27795
+ this.$emit('input', label);
27796
+ this.$emit('change', params);
27797
+ }
27798
+ },
27704
27799
  changeEvent: function changeEvent(evnt) {
27705
- var $xeradiogroup = this.$xeradiogroup,
27706
- isDisabled = this.isDisabled,
27707
- label = this.label;
27800
+ var isDisabled = this.isDisabled;
27708
27801
 
27709
27802
  if (!isDisabled) {
27710
- var params = {
27711
- label: label,
27712
- $event: evnt
27713
- };
27803
+ this.handleValue(this.label, evnt);
27804
+ }
27805
+ },
27806
+ clickEvent: function clickEvent(evnt) {
27807
+ var $xeradiogroup = this.$xeradiogroup,
27808
+ isDisabled = this.isDisabled,
27809
+ isStrict = this.isStrict;
27714
27810
 
27715
- if ($xeradiogroup) {
27716
- $xeradiogroup.handleChecked(params);
27717
- } else {
27718
- this.$emit('input', label);
27719
- this.$emit('change', params);
27811
+ if (!isDisabled && !isStrict) {
27812
+ if (this.label === ($xeradiogroup ? $xeradiogroup.value : this.value)) {
27813
+ this.handleValue(null, evnt);
27720
27814
  }
27721
27815
  }
27722
27816
  }
@@ -32117,7 +32211,7 @@ Object.keys(packages_table.methods).forEach(function (name) {
32117
32211
  proxyConfig = this.proxyConfig;
32118
32212
 
32119
32213
  if (proxyConfig && (data || proxyOpts.form && formOpts.data)) {
32120
- console.error('[vxe-grid] There is a conflict between the props proxy-config and data.');
32214
+ UtilTools.error('vxe.error.errConflicts', ['grid.data', 'grid.proxy-config']);
32121
32215
  }
32122
32216
 
32123
32217
  if (false) {}
@@ -34402,10 +34496,16 @@ var Radio = Object.assign(src_radio, {
34402
34496
  props: {
34403
34497
  value: [String, Number, Boolean],
34404
34498
  disabled: Boolean,
34499
+ strict: {
34500
+ type: Boolean,
34501
+ default: function _default() {
34502
+ return conf.radioGroup.strict;
34503
+ }
34504
+ },
34405
34505
  size: {
34406
34506
  type: String,
34407
34507
  default: function _default() {
34408
- return conf.radio.size || conf.size;
34508
+ return conf.radioGroup.size || conf.size;
34409
34509
  }
34410
34510
  }
34411
34511
  },
@@ -34461,10 +34561,16 @@ var RadioGroup = Object.assign(radio_src_group, {
34461
34561
  title: [String, Number],
34462
34562
  content: [String, Number],
34463
34563
  disabled: Boolean,
34564
+ strict: {
34565
+ type: Boolean,
34566
+ default: function _default() {
34567
+ return conf.radioButton.strict;
34568
+ }
34569
+ },
34464
34570
  size: {
34465
34571
  type: String,
34466
34572
  default: function _default() {
34467
- return conf.radio.size || conf.size;
34573
+ return conf.radioButton.size || conf.size;
34468
34574
  }
34469
34575
  }
34470
34576
  },
@@ -34480,6 +34586,10 @@ var RadioGroup = Object.assign(radio_src_group, {
34480
34586
  isDisabled: function isDisabled() {
34481
34587
  var $xeradiogroup = this.$xeradiogroup;
34482
34588
  return this.disabled || $xeradiogroup && $xeradiogroup.disabled;
34589
+ },
34590
+ isStrict: function isStrict() {
34591
+ var $xeradiogroup = this.$xeradiogroup;
34592
+ return $xeradiogroup ? $xeradiogroup.strict : this.strict;
34483
34593
  }
34484
34594
  },
34485
34595
  render: function render(h) {
@@ -34513,29 +34623,43 @@ var RadioGroup = Object.assign(radio_src_group, {
34513
34623
  checked: $xeradiogroup ? $xeradiogroup.value === label : value === label
34514
34624
  },
34515
34625
  on: {
34516
- change: this.changeEvent
34626
+ change: this.changeEvent,
34627
+ click: this.clickEvent
34517
34628
  }
34518
34629
  }), h('span', {
34519
34630
  class: 'vxe-radio--label'
34520
34631
  }, $scopedSlots.default ? $scopedSlots.default.call(this, {}) : [UtilTools.getFuncText(content)])]);
34521
34632
  },
34522
34633
  methods: {
34634
+ handleValue: function handleValue(label, evnt) {
34635
+ var $xeradiogroup = this.$xeradiogroup;
34636
+ var params = {
34637
+ label: label,
34638
+ $event: evnt
34639
+ };
34640
+
34641
+ if ($xeradiogroup) {
34642
+ $xeradiogroup.handleChecked(params);
34643
+ } else {
34644
+ this.$emit('input', label);
34645
+ this.$emit('change', params);
34646
+ }
34647
+ },
34523
34648
  changeEvent: function changeEvent(evnt) {
34524
- var $xeradiogroup = this.$xeradiogroup,
34525
- isDisabled = this.isDisabled,
34526
- label = this.label;
34649
+ var isDisabled = this.isDisabled;
34527
34650
 
34528
34651
  if (!isDisabled) {
34529
- var params = {
34530
- label: label,
34531
- $event: evnt
34532
- };
34652
+ this.handleValue(this.label, evnt);
34653
+ }
34654
+ },
34655
+ clickEvent: function clickEvent(evnt) {
34656
+ var $xeradiogroup = this.$xeradiogroup,
34657
+ isDisabled = this.isDisabled,
34658
+ isStrict = this.isStrict;
34533
34659
 
34534
- if ($xeradiogroup) {
34535
- $xeradiogroup.handleChecked(params);
34536
- } else {
34537
- this.$emit('input', label);
34538
- this.$emit('change', params);
34660
+ if (!isDisabled && !isStrict) {
34661
+ if (this.label === ($xeradiogroup ? $xeradiogroup.value : this.value)) {
34662
+ this.handleValue(null, evnt);
34539
34663
  }
34540
34664
  }
34541
34665
  }