vxe-table 3.4.12-beta.2 → 3.4.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.
Files changed (68) hide show
  1. package/README.en.md +3 -1
  2. package/README.md +5 -3
  3. package/README.zh-TW.md +5 -3
  4. package/lib/edit/src/mixin.js +39 -13
  5. package/lib/edit/src/mixin.min.js +1 -1
  6. package/lib/export/src/mixin.js +15 -10
  7. package/lib/export/src/mixin.min.js +1 -1
  8. package/lib/export/style/style.css +2 -0
  9. package/lib/export/style/style.min.css +1 -1
  10. package/lib/filter/style/style.css +2 -0
  11. package/lib/filter/style/style.min.css +1 -1
  12. package/lib/footer/src/footer.js +11 -0
  13. package/lib/footer/src/footer.min.js +1 -1
  14. package/lib/form/src/form.js +6 -1
  15. package/lib/form/src/form.min.js +1 -1
  16. package/lib/grid/src/grid.js +5 -2
  17. package/lib/grid/src/grid.min.js +1 -1
  18. package/lib/header/src/header.js +12 -0
  19. package/lib/header/src/header.min.js +1 -1
  20. package/lib/index.css +1 -1
  21. package/lib/index.umd.js +198 -74
  22. package/lib/index.umd.min.js +1 -1
  23. package/lib/input/src/input.js +12 -20
  24. package/lib/input/src/input.min.js +1 -1
  25. package/lib/modal/src/modal.js +1 -1
  26. package/lib/modal/src/modal.min.js +1 -1
  27. package/lib/pulldown/src/pulldown.js +13 -0
  28. package/lib/pulldown/src/pulldown.min.js +1 -1
  29. package/lib/style.css +1 -1
  30. package/lib/style.min.css +1 -1
  31. package/lib/table/src/body.js +24 -5
  32. package/lib/table/src/body.min.js +1 -1
  33. package/lib/table/src/cell.js +5 -6
  34. package/lib/table/src/cell.min.js +1 -1
  35. package/lib/table/src/methods.js +56 -16
  36. package/lib/table/src/methods.min.js +1 -1
  37. package/lib/table/style/style.css +2 -0
  38. package/lib/table/style/style.min.css +1 -1
  39. package/lib/toolbar/style/style.css +2 -0
  40. package/lib/toolbar/style/style.min.css +1 -1
  41. package/lib/tools/src/utils.js +1 -0
  42. package/lib/tools/src/utils.min.js +1 -1
  43. package/lib/validator/src/mixin.js +2 -0
  44. package/lib/validator/src/mixin.min.js +1 -1
  45. package/package.json +4 -4
  46. package/packages/edit/src/mixin.js +20 -11
  47. package/packages/export/src/mixin.js +16 -9
  48. package/packages/footer/src/footer.js +10 -0
  49. package/packages/form/src/form.js +6 -4
  50. package/packages/grid/src/grid.js +3 -2
  51. package/packages/header/src/header.js +11 -0
  52. package/packages/input/src/input.js +11 -18
  53. package/packages/modal/src/modal.js +1 -1
  54. package/packages/pulldown/src/pulldown.js +12 -0
  55. package/packages/table/src/body.js +41 -7
  56. package/packages/table/src/cell.js +4 -6
  57. package/packages/table/src/methods.js +40 -14
  58. package/packages/tools/src/utils.js +1 -0
  59. package/packages/validator/src/mixin.js +11 -1
  60. package/styles/base/checked.scss +5 -0
  61. package/styles/button.scss +4 -4
  62. package/styles/modal.scss +14 -13
  63. package/styles/table.scss +4 -4
  64. package/styles/variable.scss +8 -0
  65. package/types/all.d.ts +1 -0
  66. package/types/column.d.ts +7 -1
  67. package/types/form.d.ts +2 -1
  68. package/types/table.d.ts +6 -2
@@ -253,7 +253,7 @@ export default {
253
253
  created () {
254
254
  const { data, formOpts, proxyOpts, proxyConfig } = this
255
255
  if (proxyConfig && (data || (proxyOpts.form && formOpts.data))) {
256
- console.error('[vxe-grid] There is a conflict between the props proxy-config and data.')
256
+ UtilTools.error('vxe.error.errConflicts', ['grid.data', 'grid.proxy-config'])
257
257
  }
258
258
 
259
259
  if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
@@ -401,7 +401,7 @@ export default {
401
401
  handleActiveMethod (params) {
402
402
  const { editConfig } = this
403
403
  const activeMethod = editConfig ? editConfig.activeMethod : null
404
- return this.pendingRecords.indexOf(params.row) === -1 && (!activeMethod || activeMethod(params))
404
+ return this.pendingRecords.indexOf(params.row) === -1 && (!activeMethod || activeMethod({ ...params, $grid: this }))
405
405
  },
406
406
  initToolbar () {
407
407
  this.$nextTick(() => {
@@ -531,6 +531,7 @@ export default {
531
531
  }
532
532
  sortList = defaultSort.map((item) => {
533
533
  return {
534
+ field: item.field,
534
535
  property: item.field,
535
536
  order: item.order
536
537
  }
@@ -39,6 +39,17 @@ export default {
39
39
  elemStore[`${prefix}xSpace`] = $refs.xSpace
40
40
  elemStore[`${prefix}repair`] = $refs.repair
41
41
  },
42
+ destroyed () {
43
+ const { $parent: $xetable, fixedType } = this
44
+ const { elemStore } = $xetable
45
+ const prefix = `${fixedType || 'main'}-header-`
46
+ elemStore[`${prefix}wrapper`] = null
47
+ elemStore[`${prefix}table`] = null
48
+ elemStore[`${prefix}colgroup`] = null
49
+ elemStore[`${prefix}list`] = null
50
+ elemStore[`${prefix}xSpace`] = null
51
+ elemStore[`${prefix}repair`] = null
52
+ },
42
53
  render (h) {
43
54
  const { _e, $parent: $xetable, fixedType, headerColumn, fixedColumn } = this
44
55
  const { $listeners: tableListeners, tId, isGroup, resizable, border, columnKey, headerRowClassName, headerCellClassName, headerRowStyle, headerCellStyle, showHeaderOverflow: allColumnHeaderOverflow, headerAlign: allHeaderAlign, align: allAlign, highlightCurrentColumn, currentColumn, scrollXLoad, overflowX, scrollbarWidth, sortOpts, mouseConfig, columnOpts } = $xetable
@@ -756,15 +756,10 @@ export default {
756
756
  return this.maxDate ? XEUtils.toStringDate(this.maxDate) : null
757
757
  },
758
758
  dateValue () {
759
- const { value, isDatePickerType, type, dateValueFormat } = this
759
+ const { value, isDatePickerType, dateValueFormat } = this
760
760
  let val = null
761
761
  if (value && isDatePickerType) {
762
- let date
763
- if (type === 'time') {
764
- date = toStringTimeDate(value)
765
- } else {
766
- date = XEUtils.toStringDate(value, dateValueFormat)
767
- }
762
+ const date = this.parseDate(value, dateValueFormat)
768
763
  if (XEUtils.isValidDate(date)) {
769
764
  val = date
770
765
  }
@@ -1272,6 +1267,13 @@ export default {
1272
1267
  }
1273
1268
  this.$emit('clear', { $panel: $refs.panel, value, $event: evnt })
1274
1269
  },
1270
+ parseDate (value, format) {
1271
+ const { type } = this
1272
+ if (type === 'time') {
1273
+ return toStringTimeDate(value)
1274
+ }
1275
+ return XEUtils.toStringDate(value, format)
1276
+ },
1275
1277
  /**
1276
1278
  * 检查初始值
1277
1279
  */
@@ -1321,12 +1323,7 @@ export default {
1321
1323
  if (type === 'week' || type === 'quarter') {
1322
1324
  // 周和季度选择器不支持解析,无需处理
1323
1325
  } else {
1324
- let inpDateVal
1325
- if (type === 'time') {
1326
- inpDateVal = toStringTimeDate(inputValue)
1327
- } else {
1328
- inpDateVal = XEUtils.toStringDate(inputValue, dateLabelFormat)
1329
- }
1326
+ let inpDateVal = this.parseDate(inputValue, dateLabelFormat)
1330
1327
  if (XEUtils.isValidDate(inpDateVal)) {
1331
1328
  if (type === 'time') {
1332
1329
  inpDateVal = toStringTimeDate(inpDateVal)
@@ -1660,11 +1657,7 @@ export default {
1660
1657
  let dValue = null
1661
1658
  let dLabel = ''
1662
1659
  if (date) {
1663
- if (type === 'time') {
1664
- dValue = toStringTimeDate(date)
1665
- } else {
1666
- dValue = XEUtils.toStringDate(date, valueFormat)
1667
- }
1660
+ dValue = this.parseDate(date, valueFormat)
1668
1661
  }
1669
1662
  if (XEUtils.isValidDate(dValue)) {
1670
1663
  dLabel = XEUtils.toDateString(dValue, dateLabelFormat, { firstDay: firstDayOfWeek })
@@ -459,7 +459,7 @@ export default {
459
459
  maximize () {
460
460
  return this.$nextTick().then(() => {
461
461
  if (!this.zoomLocat) {
462
- const marginSize = this.marginSize
462
+ const marginSize = Math.max(0, this.marginSize)
463
463
  const modalBoxElem = this.getBox()
464
464
  const { visibleHeight, visibleWidth } = DomTools.getDomNode()
465
465
  this.zoomLocat = {
@@ -6,6 +6,7 @@ export default {
6
6
  name: 'VxePulldown',
7
7
  mixins: [vSize],
8
8
  props: {
9
+ value: Boolean,
9
10
  disabled: Boolean,
10
11
  placement: String,
11
12
  size: { type: String, default: () => GlobalConfig.size },
@@ -24,6 +25,15 @@ export default {
24
25
  isActivated: false
25
26
  }
26
27
  },
28
+ watch: {
29
+ value (value) {
30
+ if (value) {
31
+ this.showPanel()
32
+ } else {
33
+ this.hidePanel()
34
+ }
35
+ }
36
+ },
27
37
  created () {
28
38
  GlobalEvent.on(this, 'mousewheel', this.handleGlobalMousewheelEvent)
29
39
  GlobalEvent.on(this, 'mousedown', this.handleGlobalMousedownEvent)
@@ -140,6 +150,7 @@ export default {
140
150
  this.animatVisible = true
141
151
  setTimeout(() => {
142
152
  this.visiblePanel = true
153
+ this.$emit('update:input', true)
143
154
  this.updatePlacement()
144
155
  setTimeout(() => {
145
156
  resolve(this.updatePlacement())
@@ -156,6 +167,7 @@ export default {
156
167
  */
157
168
  hidePanel () {
158
169
  this.visiblePanel = false
170
+ this.$emit('update:input', false)
159
171
  return new Promise(resolve => {
160
172
  if (this.animatVisible) {
161
173
  this.hidePanelTimeout = setTimeout(() => {
@@ -455,6 +455,18 @@ export default {
455
455
  this.$el._onscroll = null
456
456
  this.$el.onscroll = null
457
457
  },
458
+ destroyed () {
459
+ const { $parent: $xetable, fixedType } = this
460
+ const { elemStore } = $xetable
461
+ const prefix = `${fixedType || 'main'}-body-`
462
+ elemStore[`${prefix}wrapper`] = null
463
+ elemStore[`${prefix}table`] = null
464
+ elemStore[`${prefix}colgroup`] = null
465
+ elemStore[`${prefix}list`] = null
466
+ elemStore[`${prefix}xSpace`] = null
467
+ elemStore[`${prefix}ySpace`] = null
468
+ elemStore[`${prefix}emptyBlock`] = null
469
+ },
458
470
  render (h) {
459
471
  const { _e, $parent: $xetable, fixedColumn, fixedType } = this
460
472
  let { $scopedSlots, tId, tableData, tableColumn, visibleColumn, showOverflow: allColumnOverflow, keyboardConfig, keyboardOpts, mergeList, spanMethod, scrollXLoad, scrollYLoad, isAllOverflow, emptyOpts, mouseConfig, mouseOpts, sYOpts } = $xetable
@@ -595,8 +607,8 @@ export default {
595
607
  const rightElem = rightBody ? rightBody.$el : null
596
608
  const bodyYElem = elemStore['main-body-ySpace']
597
609
  const bodyXElem = elemStore['main-body-xSpace']
598
- const bodyHeight = bodyYElem ? bodyYElem.clientHeight : 0
599
- const bodyWidth = bodyXElem ? bodyXElem.clientWidth : 0
610
+ const bodyHeight = scrollYLoad && bodyYElem ? bodyYElem.clientHeight : bodyElem.clientHeight
611
+ const bodyWidth = scrollXLoad && bodyXElem ? bodyXElem.clientWidth : bodyElem.clientWidth
600
612
  let scrollTop = scrollBodyElem.scrollTop
601
613
  const scrollLeft = bodyElem.scrollLeft
602
614
  const isRollX = scrollLeft !== lastScrollLeft
@@ -638,11 +650,22 @@ export default {
638
650
  if (isRollX && validTip && validTip.visible) {
639
651
  validTip.updatePlacement()
640
652
  }
641
- $xetable.emitEvent('scroll', { type: renderType, fixed: fixedType, scrollTop, scrollLeft, bodyHeight, bodyWidth, isX: isRollX, isY: isRollY }, evnt)
653
+ $xetable.emitEvent('scroll', {
654
+ type: renderType,
655
+ fixed: fixedType,
656
+ scrollTop,
657
+ scrollLeft,
658
+ scrollHeight: bodyElem.scrollHeight,
659
+ scrollWidth: bodyElem.scrollWidth,
660
+ bodyHeight,
661
+ bodyWidth,
662
+ isX: isRollX,
663
+ isY: isRollY
664
+ }, evnt)
642
665
  },
643
666
  handleWheel (evnt, isTopWheel, deltaTop, isRollX, isRollY) {
644
667
  const { $parent: $xetable } = this
645
- const { $refs, elemStore } = $xetable
668
+ const { $refs, elemStore, scrollYLoad, scrollXLoad } = $xetable
646
669
  const { tableBody, leftBody, rightBody } = $refs
647
670
  const bodyElem = tableBody.$el
648
671
  const leftElem = leftBody ? leftBody.$el : null
@@ -650,8 +673,8 @@ export default {
650
673
  const remainSize = this.isPrevWheelTop === isTopWheel ? Math.max(0, this.wheelYSize - this.wheelYTotal) : 0
651
674
  const bodyYElem = elemStore['main-body-ySpace']
652
675
  const bodyXElem = elemStore['main-body-xSpace']
653
- const bodyHeight = bodyYElem ? bodyYElem.clientHeight : 0
654
- const bodyWidth = bodyXElem ? bodyXElem.clientWidth : 0
676
+ const bodyHeight = scrollYLoad && bodyYElem ? bodyYElem.clientHeight : bodyElem.clientHeight
677
+ const bodyWidth = scrollXLoad && bodyXElem ? bodyXElem.clientWidth : bodyElem.clientWidth
655
678
  this.isPrevWheelTop = isTopWheel
656
679
  this.wheelYSize = Math.abs(isTopWheel ? deltaTop - remainSize : deltaTop + remainSize)
657
680
  this.wheelYInterval = 0
@@ -679,7 +702,18 @@ export default {
679
702
  }
680
703
  this.wheelYTotal = wheelYTotal
681
704
  this.wheelYInterval = wheelYInterval
682
- $xetable.emitEvent('scroll', { type: renderType, fixed: fixedType, scrollTop: bodyElem.scrollTop, scrollLeft: bodyElem.scrollLeft, bodyHeight, bodyWidth, isX: isRollX, isY: isRollY }, evnt)
705
+ $xetable.emitEvent('scroll', {
706
+ type: renderType,
707
+ fixed: fixedType,
708
+ scrollTop: bodyElem.scrollTop,
709
+ scrollLeft: bodyElem.scrollLeft,
710
+ scrollHeight: bodyElem.scrollHeight,
711
+ scrollWidth: bodyElem.scrollWidth,
712
+ bodyHeight,
713
+ bodyWidth,
714
+ isX: isRollX,
715
+ isY: isRollY
716
+ }, evnt)
683
717
  }
684
718
  }
685
719
  handleSmooth()
@@ -352,25 +352,23 @@ export const Cell = {
352
352
  */
353
353
  renderCheckboxHeader (h, params) {
354
354
  const { $table, column, isHidden } = params
355
- const { isIndeterminate: isAllCheckboxIndeterminate, isAllCheckboxDisabled } = $table
355
+ const { isAllSelected: isAllCheckboxSelected, isIndeterminate: isAllCheckboxIndeterminate, isAllCheckboxDisabled } = $table
356
356
  const { slots } = column
357
357
  const headerSlot = slots ? slots.header : null
358
358
  const titleSlot = slots ? slots.title : null
359
359
  const checkboxOpts = $table.checkboxOpts
360
360
  const headerTitle = column.getTitle()
361
- let isChecked = false
362
361
  let on
363
362
  if (!isHidden) {
364
- isChecked = isAllCheckboxDisabled ? false : $table.isAllSelected
365
363
  on = {
366
364
  click (evnt) {
367
365
  if (!isAllCheckboxDisabled) {
368
- $table.triggerCheckAllEvent(evnt, !isChecked)
366
+ $table.triggerCheckAllEvent(evnt, !isAllCheckboxSelected)
369
367
  }
370
368
  }
371
369
  }
372
370
  }
373
- const checkboxParams = { ...params, checked: isChecked, disabled: isAllCheckboxDisabled, indeterminate: isAllCheckboxIndeterminate }
371
+ const checkboxParams = { ...params, checked: isAllCheckboxSelected, disabled: isAllCheckboxDisabled, indeterminate: isAllCheckboxIndeterminate }
374
372
  if (headerSlot) {
375
373
  return renderTitleContent(h, checkboxParams, $table.callSlot(headerSlot, checkboxParams, h))
376
374
  }
@@ -384,7 +382,7 @@ export const Cell = {
384
382
  return renderTitleContent(h, checkboxParams, [
385
383
  h('span', {
386
384
  class: ['vxe-cell--checkbox', {
387
- 'is--checked': isChecked,
385
+ 'is--checked': isAllCheckboxSelected,
388
386
  'is--disabled': isAllCheckboxDisabled,
389
387
  'is--indeterminate': isAllCheckboxIndeterminate
390
388
  }],
@@ -1083,20 +1083,21 @@ const Methods = {
1083
1083
  * 用于多选行,获取已选中的数据
1084
1084
  */
1085
1085
  getCheckboxRecords (isFull) {
1086
- const { tableFullData, afterFullData, treeConfig, treeOpts, checkboxOpts } = this
1086
+ const { tableFullData, afterFullData, treeConfig, treeOpts, checkboxOpts, tableFullTreeData, afterTreeFullData } = this
1087
+ const { transform, children, mapChildren } = treeOpts
1087
1088
  const { checkField: property } = checkboxOpts
1088
- const currTableData = isFull ? tableFullData : afterFullData
1089
+ const currTableData = isFull ? (transform ? tableFullTreeData : tableFullData) : (transform ? afterTreeFullData : afterFullData)
1089
1090
  let rowList = []
1090
1091
  if (property) {
1091
1092
  if (treeConfig) {
1092
- rowList = XEUtils.filterTree(currTableData, row => XEUtils.get(row, property), treeOpts)
1093
+ rowList = XEUtils.filterTree(currTableData, row => XEUtils.get(row, property), { children: transform ? mapChildren : children })
1093
1094
  } else {
1094
1095
  rowList = currTableData.filter(row => XEUtils.get(row, property))
1095
1096
  }
1096
1097
  } else {
1097
1098
  const { selection } = this
1098
1099
  if (treeConfig) {
1099
- rowList = XEUtils.filterTree(currTableData, row => selection.indexOf(row) > -1, treeOpts)
1100
+ rowList = XEUtils.filterTree(currTableData, row => selection.indexOf(row) > -1, { children: transform ? mapChildren : children })
1100
1101
  } else {
1101
1102
  rowList = currTableData.filter(row => selection.indexOf(row) > -1)
1102
1103
  }
@@ -1138,7 +1139,7 @@ const Methods = {
1138
1139
  const filterColumns = []
1139
1140
  const orderColumns = []
1140
1141
  tableFullColumn.forEach(column => {
1141
- const { sortable, order, filters } = column
1142
+ const { property, sortable, order, filters } = column
1142
1143
  if (!allRemoteFilter && filters && filters.length) {
1143
1144
  const valueList = []
1144
1145
  const itemList = []
@@ -1153,7 +1154,7 @@ const Methods = {
1153
1154
  }
1154
1155
  }
1155
1156
  if (!allRemoteSort && sortable && order) {
1156
- orderColumns.push({ column, property: column.property, order })
1157
+ orderColumns.push({ column, field: column.property, property, order })
1157
1158
  }
1158
1159
  })
1159
1160
  if (filterColumns.length) {
@@ -2461,7 +2462,7 @@ const Methods = {
2461
2462
  // }
2462
2463
  // 如果是按下非功能键之外允许直接编辑
2463
2464
  if (selected.column && selected.row && isEnableConf(selected.column.editRender)) {
2464
- if (!editOpts.activeMethod || editOpts.activeMethod(selected.args)) {
2465
+ if (!editOpts.activeMethod || editOpts.activeMethod({ ...selected.args, $table: this })) {
2465
2466
  if (editMethod) {
2466
2467
  editMethod({
2467
2468
  row: selected.row,
@@ -2963,14 +2964,28 @@ const Methods = {
2963
2964
  const { afterFullData, selection, treeIndeterminates, checkboxOpts, treeConfig } = this
2964
2965
  const { checkField, halfField, checkStrictly, checkMethod } = checkboxOpts
2965
2966
  if (!checkStrictly) {
2967
+ const disableRows = []
2968
+ const checkRows = []
2969
+ let isAllResolve = false
2966
2970
  let isAllSelected = false
2967
2971
  let isIndeterminate = false
2968
2972
  if (checkField) {
2969
- isAllSelected = afterFullData.length && afterFullData.every(
2973
+ isAllResolve = afterFullData.every(
2970
2974
  checkMethod
2971
- ? (row) => !checkMethod({ row }) || XEUtils.get(row, checkField)
2975
+ ? (row) => {
2976
+ if (!checkMethod({ row })) {
2977
+ disableRows.push(row)
2978
+ return true
2979
+ }
2980
+ if (XEUtils.get(row, checkField)) {
2981
+ checkRows.push(row)
2982
+ return true
2983
+ }
2984
+ return false
2985
+ }
2972
2986
  : row => XEUtils.get(row, checkField)
2973
2987
  )
2988
+ isAllSelected = isAllResolve && afterFullData.length !== disableRows.length
2974
2989
  if (treeConfig) {
2975
2990
  if (halfField) {
2976
2991
  isIndeterminate = !isAllSelected && afterFullData.some(row => XEUtils.get(row, checkField) || XEUtils.get(row, halfField) || treeIndeterminates.indexOf(row) > -1)
@@ -2985,11 +3000,22 @@ const Methods = {
2985
3000
  }
2986
3001
  }
2987
3002
  } else {
2988
- isAllSelected = afterFullData.length && afterFullData.every(
3003
+ isAllResolve = afterFullData.every(
2989
3004
  checkMethod
2990
- ? (row) => !checkMethod({ row }) || selection.indexOf(row) > -1
3005
+ ? (row) => {
3006
+ if (!checkMethod({ row })) {
3007
+ disableRows.push(row)
3008
+ return true
3009
+ }
3010
+ if (selection.indexOf(row) > -1) {
3011
+ checkRows.push(row)
3012
+ return true
3013
+ }
3014
+ return false
3015
+ }
2991
3016
  : row => selection.indexOf(row) > -1
2992
3017
  )
3018
+ isAllSelected = isAllResolve && afterFullData.length !== disableRows.length
2993
3019
  if (treeConfig) {
2994
3020
  isIndeterminate = !isAllSelected && afterFullData.some(row => treeIndeterminates.indexOf(row) > -1 || selection.indexOf(row) > -1)
2995
3021
  } else {
@@ -3585,9 +3611,9 @@ const Methods = {
3585
3611
  getSortColumns () {
3586
3612
  const sortList = []
3587
3613
  this.tableFullColumn.forEach((column) => {
3588
- const { order } = column
3614
+ const { property, order } = column
3589
3615
  if ((column.sortable || column.remoteSort) && order) {
3590
- sortList.push({ column, property: column.property, order })
3616
+ sortList.push({ column, field: column.property, property, order })
3591
3617
  }
3592
3618
  })
3593
3619
  return sortList
@@ -4584,7 +4610,7 @@ const Methods = {
4584
4610
  }
4585
4611
 
4586
4612
  // Module methods
4587
- const funcs = 'setFilter,openFilter,clearFilter,getCheckedFilters,closeMenu,setActiveCellArea,getActiveCellArea,getCellAreas,clearCellAreas,copyCellArea,cutCellArea,pasteCellArea,getCopyCellArea,clearCopyCellArea,setCellAreas,openFind,openReplace,getSelectedCell,clearSelected,insert,insertAt,remove,removeCheckboxRow,removeRadioRow,removeCurrentRow,getRecordset,getInsertRecords,getRemoveRecords,getUpdateRecords,clearActived,getActiveRecord,isActiveByRow,setActiveRow,setActiveCell,setSelectCell,clearValidate,fullValidate,validate,openExport,openPrint,exportData,openImport,importData,saveFile,readFile,importByFile,print'.split(',')
4613
+ const funcs = 'setFilter,openFilter,clearFilter,getCheckedFilters,closeMenu,setActiveCellArea,getActiveCellArea,getCellAreas,clearCellAreas,copyCellArea,cutCellArea,pasteCellArea,getCopyCellArea,clearCopyCellArea,setCellAreas,openFind,openReplace,closeFNR,getSelectedCell,clearSelected,insert,insertAt,remove,removeCheckboxRow,removeRadioRow,removeCurrentRow,getRecordset,getInsertRecords,getRemoveRecords,getUpdateRecords,clearActived,getActiveRecord,isActiveByRow,setActiveRow,setActiveCell,setSelectCell,clearValidate,fullValidate,validate,openExport,openPrint,exportData,openImport,importData,saveFile,readFile,importByFile,print'.split(',')
4588
4614
 
4589
4615
  funcs.forEach(name => {
4590
4616
  Methods[name] = function (...args) {
@@ -57,6 +57,7 @@ class ColumnInfo {
57
57
  // 基本属性
58
58
  type: _vm.type,
59
59
  property: _vm.field,
60
+ field: _vm.field,
60
61
  title: _vm.title,
61
62
  width: _vm.width,
62
63
  minWidth: _vm.minWidth,
@@ -127,7 +127,16 @@ export default {
127
127
  colVailds.push(
128
128
  this.validCellRules('all', row, column)
129
129
  .catch(({ rule, rules }) => {
130
- const rest = { rule, rules, rowIndex: this.getRowIndex(row), row, columnIndex: this.getColumnIndex(column), column, $table: this }
130
+ const rest = {
131
+ rule,
132
+ rules,
133
+ rowIndex: this.getRowIndex(row),
134
+ row,
135
+ columnIndex: this.getColumnIndex(column),
136
+ column,
137
+ field: column.property,
138
+ $table: this
139
+ }
131
140
  if (!validRest[column.property]) {
132
141
  validRest[column.property] = []
133
142
  }
@@ -250,6 +259,7 @@ export default {
250
259
  rowIndex: this.getRowIndex(row),
251
260
  column,
252
261
  columnIndex: this.getColumnIndex(column),
262
+ field: column.property,
253
263
  $table: this
254
264
  })
255
265
  if (customValid) {
@@ -170,5 +170,10 @@
170
170
  border-color: $vxe-primary-disabled-color;
171
171
  }
172
172
  }
173
+ .vxe-checkbox--indeterminate-icon {
174
+ &:after {
175
+ background-color: $vxe-primary-disabled-color;
176
+ }
177
+ }
173
178
  }
174
179
  }
@@ -124,7 +124,7 @@ $btnThemeList: (
124
124
  line-height: 1;
125
125
  border: 1px solid $vxe-input-border-color;
126
126
  &.is--round {
127
- border-radius: $vxe-button-height-default * 0.5;
127
+ border-radius: $vxe-button-round-border-radius-default;
128
128
  }
129
129
  &:not(.is--round) {
130
130
  border-radius: $vxe-border-radius;
@@ -223,7 +223,7 @@ $btnThemeList: (
223
223
  min-width: $vxe-button-height-medium;
224
224
  }
225
225
  &.is--round {
226
- border-radius: $vxe-button-height-medium * 0.5;
226
+ border-radius: $vxe-button-round-border-radius-medium;
227
227
  }
228
228
  }
229
229
  .vxe-button--loading-icon,
@@ -239,7 +239,7 @@ $btnThemeList: (
239
239
  min-width: $vxe-button-height-small;
240
240
  }
241
241
  &.is--round {
242
- border-radius: $vxe-button-height-small * 0.5;
242
+ border-radius: $vxe-button-round-border-radius-small;
243
243
  }
244
244
  }
245
245
  .vxe-button--loading-icon,
@@ -255,7 +255,7 @@ $btnThemeList: (
255
255
  min-width: $vxe-button-height-mini;
256
256
  }
257
257
  &.is--round {
258
- border-radius: $vxe-button-height-mini * 0.5;
258
+ border-radius: $vxe-button-round-border-radius-mini;
259
259
  }
260
260
  }
261
261
  .vxe-button--loading-icon,
package/styles/modal.scss CHANGED
@@ -294,7 +294,8 @@
294
294
  }
295
295
  }
296
296
  .vxe-modal--resize {
297
- $SpaceSize: 8;
297
+ $SpaceSize: 8px;
298
+ $SpaceWidth: 5px;
298
299
  .wl-resize,
299
300
  .wr-resize,
300
301
  .swst-resize,
@@ -308,32 +309,32 @@
308
309
  }
309
310
  .wl-resize,
310
311
  .wr-resize {
311
- width: #{$SpaceSize}px;
312
+ width: $SpaceSize;
312
313
  height: 100%;
313
314
  top: 0;
314
315
  cursor: w-resize;
315
316
  }
316
317
  .wl-resize {
317
- left: -#{$SpaceSize * 0.5 + 1}px;
318
+ left: -$SpaceWidth;
318
319
  }
319
320
  .wr-resize {
320
- right: -#{$SpaceSize * 0.5 + 1}px;
321
+ right: -$SpaceWidth;
321
322
  }
322
323
  .swst-resize,
323
324
  .sest-resize,
324
325
  .swlb-resize,
325
326
  .selb-resize {
326
- width: #{$SpaceSize + 2}px;
327
- height: #{$SpaceSize + 2}px;
327
+ width: $SpaceSize + 2;
328
+ height: $SpaceSize + 2;
328
329
  z-index: 101;
329
330
  }
330
331
  .swst-resize,
331
332
  .sest-resize {
332
- top: -#{$SpaceSize}px;
333
+ top: -$SpaceSize;
333
334
  }
334
335
  .swlb-resize,
335
336
  .selb-resize {
336
- bottom: -#{$SpaceSize}px;
337
+ bottom: -$SpaceSize;
337
338
  }
338
339
  .sest-resize,
339
340
  .swlb-resize {
@@ -345,24 +346,24 @@
345
346
  }
346
347
  .swst-resize,
347
348
  .swlb-resize {
348
- left: -#{$SpaceSize}px;
349
+ left: -$SpaceSize;
349
350
  }
350
351
  .sest-resize,
351
352
  .selb-resize {
352
- right: -#{$SpaceSize}px;
353
+ right: -$SpaceSize;
353
354
  }
354
355
  .st-resize,
355
356
  .sb-resize {
356
357
  width: 100%;
357
- height: #{$SpaceSize}px;
358
+ height: $SpaceSize;
358
359
  left: 0;
359
360
  cursor: s-resize;
360
361
  }
361
362
  .st-resize {
362
- top: -#{$SpaceSize * 0.5 + 1}px;
363
+ top: -$SpaceWidth;
363
364
  }
364
365
  .sb-resize {
365
- bottom: -#{$SpaceSize * 0.5 + 1}px;
366
+ bottom: -$SpaceWidth;
366
367
  }
367
368
  }
368
369
  }
package/styles/table.scss CHANGED
@@ -474,7 +474,7 @@
474
474
  line-height: $vxe-table-row-line-height;
475
475
  text-align: left;
476
476
  &:not(.col--ellipsis) {
477
- padding: #{floor(($vxe-table-row-height-default - $vxe-table-row-line-height) * 0.5)} 0;
477
+ padding: $vxe-table-column-padding-default;
478
478
  }
479
479
  &.col--current {
480
480
  background-color: $vxe-table-column-current-background-color;
@@ -612,7 +612,7 @@
612
612
  .vxe-body--column,
613
613
  .vxe-footer--column {
614
614
  &:not(.col--ellipsis) {
615
- padding: #{floor(($vxe-table-row-height-medium - $vxe-table-row-line-height) * 0.5)} 0;
615
+ padding: $vxe-table-column-padding-medium;
616
616
  }
617
617
  }
618
618
  .vxe-cell {
@@ -638,7 +638,7 @@
638
638
  .vxe-body--column,
639
639
  .vxe-footer--column {
640
640
  &:not(.col--ellipsis) {
641
- padding: #{floor(($vxe-table-row-height-small - $vxe-table-row-line-height) * 0.5)} 0;
641
+ padding: $vxe-table-column-padding-small;
642
642
  }
643
643
  }
644
644
  .vxe-cell {
@@ -664,7 +664,7 @@
664
664
  .vxe-body--column,
665
665
  .vxe-footer--column {
666
666
  &:not(.col--ellipsis) {
667
- padding: #{floor(($vxe-table-row-height-mini - $vxe-table-row-line-height) * 0.5)} 0;
667
+ padding: $vxe-table-column-padding-mini;
668
668
  }
669
669
  }
670
670
  .vxe-cell {
@@ -62,6 +62,10 @@ $vxe-table-row-hover-checkbox-checked-background-color: #ffebbc !default;
62
62
  $vxe-table-row-current-background-color: #e6f7ff !default;
63
63
  $vxe-table-row-hover-current-background-color: #d7effb !default;
64
64
 
65
+ $vxe-table-column-padding-default: 13px 0 !default;
66
+ $vxe-table-column-padding-medium: 11px 0 !default;
67
+ $vxe-table-column-padding-small: 9px 0 !default;
68
+ $vxe-table-column-padding-mini: 7px 0 !default;
65
69
  $vxe-table-column-hover-background-color: #d7effb !default;
66
70
  $vxe-table-column-current-background-color: #e6f7ff !default;
67
71
  $vxe-table-column-icon-border-color: #c0c4cc !default;
@@ -175,6 +179,10 @@ $vxe-button-height-default: 34px !default;
175
179
  $vxe-button-height-medium: 32px !default;
176
180
  $vxe-button-height-small: 30px !default;
177
181
  $vxe-button-height-mini: 28px !default;
182
+ $vxe-button-round-border-radius-default: 17px !default;
183
+ $vxe-button-round-border-radius-medium: 16px !default;
184
+ $vxe-button-round-border-radius-small: 15px !default;
185
+ $vxe-button-round-border-radius-mini: 14px !default;
178
186
 
179
187
  /*input*/
180
188
  $vxe-input-background-color: #fff !default;
package/types/all.d.ts CHANGED
@@ -73,6 +73,7 @@ export * from './modal'
73
73
  export * from './tooltip'
74
74
  export * from './form'
75
75
  export * from './form-item'
76
+ export * from './form-gather'
76
77
  export * from './switch'
77
78
  export * from './list'
78
79
  export * from './pulldown'
package/types/column.d.ts CHANGED
@@ -306,6 +306,13 @@ export interface ColumnOptions {
306
306
  * 列对象
307
307
  */
308
308
  export class ColumnInfo {
309
+ /**
310
+ * 该属性已废弃,该属性被 field 替换
311
+ * @deprecated
312
+ */
313
+ property: string;
314
+
315
+ field: string;
309
316
  title: string;
310
317
  width: number | string;
311
318
  minWidth: number | string;
@@ -314,7 +321,6 @@ export class ColumnInfo {
314
321
  align: ColumnAlign;
315
322
  headerAlign: ColumnAlign;
316
323
  footerAlign: ColumnAlign;
317
- property: string;
318
324
  type: string;
319
325
  sortable: boolean;
320
326
  treeNode: boolean;