vxe-table 3.8.20 → 3.8.22

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 (167) hide show
  1. package/lib/button/style/style.css +2 -0
  2. package/lib/button/style/style.min.css +1 -1
  3. package/lib/button-group/style/style.css +1 -0
  4. package/lib/checkbox/style/style.css +1 -0
  5. package/lib/checkbox-group/style/style.css +1 -0
  6. package/lib/colgroup/style/style.css +1 -0
  7. package/lib/column/style/style.css +1 -0
  8. package/lib/custom/style/style.css +3 -0
  9. package/lib/custom/style/style.min.css +1 -1
  10. package/lib/edit/src/mixin.js +2 -2
  11. package/lib/edit/src/mixin.min.js +1 -1
  12. package/lib/edit/style/style.css +1 -0
  13. package/lib/export/src/mixin.js +1 -1
  14. package/lib/export/src/mixin.min.js +1 -1
  15. package/lib/export/style/style.css +1 -0
  16. package/lib/filter/style/style.css +1 -0
  17. package/lib/form/style/style.css +1 -0
  18. package/lib/form-gather/style/style.css +1 -0
  19. package/lib/form-item/style/style.css +1 -0
  20. package/lib/grid/style/style.css +2 -0
  21. package/lib/grid/style/style.min.css +1 -1
  22. package/lib/icon/style/style.css +4 -2
  23. package/lib/icon/style/style.min.css +4 -2
  24. package/lib/index.css +1 -1
  25. package/lib/index.umd.js +173 -148
  26. package/lib/index.umd.min.js +1 -1
  27. package/lib/input/style/style.css +4 -3
  28. package/lib/input/style/style.min.css +1 -1
  29. package/lib/keyboard/style/style.css +1 -0
  30. package/lib/list/style/style.css +1 -0
  31. package/lib/loading/style/style.css +1 -0
  32. package/lib/locale/lang/en-US.js +1 -0
  33. package/lib/locale/lang/en-US.min.js +1 -1
  34. package/lib/locale/lang/en-US.umd.js +1 -0
  35. package/lib/locale/lang/es-ES.js +1 -0
  36. package/lib/locale/lang/es-ES.min.js +1 -1
  37. package/lib/locale/lang/es-ES.umd.js +1 -0
  38. package/lib/locale/lang/ja-JP.js +1 -0
  39. package/lib/locale/lang/ja-JP.min.js +1 -1
  40. package/lib/locale/lang/ja-JP.umd.js +1 -0
  41. package/lib/locale/lang/pt-BR.js +1 -0
  42. package/lib/locale/lang/pt-BR.min.js +1 -1
  43. package/lib/locale/lang/pt-BR.umd.js +1 -0
  44. package/lib/locale/lang/zh-CN.js +1 -0
  45. package/lib/locale/lang/zh-CN.min.js +1 -1
  46. package/lib/locale/lang/zh-CN.umd.js +1 -0
  47. package/lib/locale/lang/zh-HK.min.js +1 -1
  48. package/lib/locale/lang/zh-HK.umd.js +1 -0
  49. package/lib/locale/lang/zh-MO.min.js +1 -1
  50. package/lib/locale/lang/zh-MO.umd.js +1 -0
  51. package/lib/locale/lang/zh-TC.js +1 -0
  52. package/lib/locale/lang/zh-TC.min.js +1 -1
  53. package/lib/locale/lang/zh-TC.umd.js +1 -0
  54. package/lib/locale/lang/zh-TW.min.js +1 -1
  55. package/lib/locale/lang/zh-TW.umd.js +1 -0
  56. package/lib/menu/style/style.css +1 -0
  57. package/lib/modal/style/style.css +4 -0
  58. package/lib/modal/style/style.min.css +1 -1
  59. package/lib/optgroup/style/style.css +1 -0
  60. package/lib/option/style/style.css +1 -0
  61. package/lib/pager/src/pager.js +29 -25
  62. package/lib/pager/src/pager.min.js +1 -1
  63. package/lib/pager/style/style.css +2 -19
  64. package/lib/pager/style/style.min.css +1 -1
  65. package/lib/pulldown/style/style.css +3 -1
  66. package/lib/pulldown/style/style.min.css +1 -1
  67. package/lib/radio/style/style.css +1 -0
  68. package/lib/radio-button/style/style.css +1 -0
  69. package/lib/radio-group/style/style.css +1 -0
  70. package/lib/select/style/style.css +2 -0
  71. package/lib/select/style/style.min.css +1 -1
  72. package/lib/style.css +1 -1
  73. package/lib/style.min.css +1 -1
  74. package/lib/switch/style/style.css +1 -0
  75. package/lib/table/src/header.js +4 -3
  76. package/lib/table/src/header.min.js +1 -1
  77. package/lib/table/src/methods.js +56 -37
  78. package/lib/table/src/methods.min.js +1 -1
  79. package/lib/table/style/style.css +17 -10
  80. package/lib/table/style/style.min.css +1 -1
  81. package/lib/textarea/style/style.css +1 -0
  82. package/lib/toolbar/style/style.css +1 -0
  83. package/lib/tools/log.js +1 -1
  84. package/lib/tools/log.min.js +1 -1
  85. package/lib/tooltip/style/style.css +1 -0
  86. package/lib/v-x-e-table/index.js +1 -1
  87. package/lib/v-x-e-table/index.min.js +1 -1
  88. package/lib/v-x-e-table/src/renderer.js +78 -78
  89. package/lib/v-x-e-table/src/renderer.min.js +1 -1
  90. package/lib/v-x-e-table/style/style.css +3 -1
  91. package/lib/v-x-e-table/style/style.min.css +1 -1
  92. package/lib/validator/style/style.css +1 -0
  93. package/lib/vxe-button/style/style.css +2 -0
  94. package/lib/vxe-button/style/style.min.css +1 -1
  95. package/lib/vxe-button-group/style/style.css +1 -0
  96. package/lib/vxe-checkbox/style/style.css +1 -0
  97. package/lib/vxe-checkbox-group/style/style.css +1 -0
  98. package/lib/vxe-colgroup/style/style.css +1 -0
  99. package/lib/vxe-column/style/style.css +1 -0
  100. package/lib/vxe-form/style/style.css +1 -0
  101. package/lib/vxe-form-gather/style/style.css +1 -0
  102. package/lib/vxe-form-item/style/style.css +1 -0
  103. package/lib/vxe-grid/style/style.css +2 -0
  104. package/lib/vxe-grid/style/style.min.css +1 -1
  105. package/lib/vxe-icon/style/style.css +3 -1
  106. package/lib/vxe-icon/style/style.min.css +1 -1
  107. package/lib/vxe-input/style/style.css +4 -3
  108. package/lib/vxe-input/style/style.min.css +1 -1
  109. package/lib/vxe-list/style/style.css +1 -0
  110. package/lib/vxe-loading/style/style.css +1 -0
  111. package/lib/vxe-modal/style/style.css +4 -0
  112. package/lib/vxe-modal/style/style.min.css +1 -1
  113. package/lib/vxe-optgroup/style/style.css +1 -0
  114. package/lib/vxe-option/style/style.css +1 -0
  115. package/lib/vxe-pager/style/style.css +2 -19
  116. package/lib/vxe-pager/style/style.min.css +1 -1
  117. package/lib/vxe-pulldown/style/style.css +3 -1
  118. package/lib/vxe-pulldown/style/style.min.css +1 -1
  119. package/lib/vxe-radio/style/style.css +1 -0
  120. package/lib/vxe-radio-button/style/style.css +1 -0
  121. package/lib/vxe-radio-group/style/style.css +1 -0
  122. package/lib/vxe-select/style/style.css +2 -0
  123. package/lib/vxe-select/style/style.min.css +1 -1
  124. package/lib/vxe-switch/style/style.css +1 -0
  125. package/lib/vxe-table/style/style.css +17 -10
  126. package/lib/vxe-table/style/style.min.css +1 -1
  127. package/lib/vxe-table-custom-module/style/style.css +3 -0
  128. package/lib/vxe-table-custom-module/style/style.min.css +1 -1
  129. package/lib/vxe-table-edit-module/style/style.css +1 -0
  130. package/lib/vxe-table-export-module/style/style.css +1 -0
  131. package/lib/vxe-table-filter-module/style/style.css +1 -0
  132. package/lib/vxe-table-keyboard-module/style/style.css +1 -0
  133. package/lib/vxe-table-menu-module/style/style.css +1 -0
  134. package/lib/vxe-table-validator-module/style/style.css +1 -0
  135. package/lib/vxe-textarea/style/style.css +1 -0
  136. package/lib/vxe-toolbar/style/style.css +1 -0
  137. package/lib/vxe-tooltip/style/style.css +1 -0
  138. package/package.json +1 -1
  139. package/packages/edit/src/mixin.js +2 -2
  140. package/packages/export/src/mixin.js +1 -1
  141. package/packages/locale/lang/en-US.js +1 -0
  142. package/packages/locale/lang/es-ES.js +1 -0
  143. package/packages/locale/lang/ja-JP.js +1 -0
  144. package/packages/locale/lang/pt-BR.js +1 -0
  145. package/packages/locale/lang/zh-CN.js +1 -0
  146. package/packages/locale/lang/zh-TC.js +1 -0
  147. package/packages/pager/src/pager.js +24 -21
  148. package/packages/table/src/header.js +4 -3
  149. package/packages/table/src/methods.js +46 -23
  150. package/packages/v-x-e-table/src/renderer.js +78 -78
  151. package/styles/button.scss +1 -0
  152. package/styles/custom.scss +2 -0
  153. package/styles/grid.scss +1 -0
  154. package/styles/input.scss +3 -3
  155. package/styles/modal.scss +3 -0
  156. package/styles/old-icon.scss +1 -1
  157. package/styles/pager.scss +1 -19
  158. package/styles/pulldown.scss +2 -1
  159. package/styles/select.scss +1 -0
  160. package/styles/table.scss +14 -8
  161. package/styles/variable.scss +4 -0
  162. /package/lib/icon/style/{iconfont.1724204493937.ttf → iconfont.1724292682903.ttf} +0 -0
  163. /package/lib/icon/style/{iconfont.1724204493937.woff → iconfont.1724292682903.woff} +0 -0
  164. /package/lib/icon/style/{iconfont.1724204493937.woff2 → iconfont.1724292682903.woff2} +0 -0
  165. /package/lib/{iconfont.1724204493937.ttf → iconfont.1724292682903.ttf} +0 -0
  166. /package/lib/{iconfont.1724204493937.woff → iconfont.1724292682903.woff} +0 -0
  167. /package/lib/{iconfont.1724204493937.woff2 → iconfont.1724292682903.woff2} +0 -0
@@ -2,6 +2,7 @@
2
2
  /*size*/
3
3
  /*icon*/
4
4
  /*color*/
5
+ /*layout*/
5
6
  /*input/radio/checkbox*/
6
7
  /*popup*/
7
8
  /*table*/
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vxe-table",
3
- "version": "3.8.20",
3
+ "version": "3.8.22",
4
4
  "description": "一个基于 vue 的 PC 端表单/表格组件,支持增删改查、虚拟树、列拖拽,懒加载、快捷菜单、数据校验、树形结构、打印导出、自定义模板、渲染器、JSON 配置式...",
5
5
  "scripts": {
6
6
  "update": "npm install --legacy-peer-deps",
@@ -623,10 +623,10 @@ export default {
623
623
  let autoSelect = editRender.autoSelect || editRender.autoselect
624
624
  let inputElem
625
625
  if (!autoFocus && compRender) {
626
- autoFocus = compRender.tableAutoFocus || compRender.tableAutofocus || compRender.autofocus
626
+ autoFocus = compRender.tableAutoFocus || compRender.tableAutofocus || compRender.autoFocus || compRender.autofocus
627
627
  }
628
628
  if (!autoSelect && compRender) {
629
- autoSelect = compRender.tableAutoSelect || compRender.autoselect
629
+ autoSelect = compRender.tableAutoSelect || compRender.autoSelect || compRender.autoselect
630
630
  }
631
631
  // 如果指定了聚焦 class
632
632
  if (XEUtils.isFunction(autoFocus)) {
@@ -166,7 +166,7 @@ function getLabelData ($xetable, opts, columns, datas) {
166
166
  if (!exportLabelMethod && renderOpts && renderOpts.name) {
167
167
  const compConf = VXETable.renderer.get(renderOpts.name)
168
168
  if (compConf) {
169
- exportLabelMethod = compConf.exportMethod || compConf.cellExportMethod
169
+ exportLabelMethod = compConf.tableExportMethod || compConf.exportMethod || compConf.cellExportMethod
170
170
  }
171
171
  }
172
172
  if (exportLabelMethod) {
@@ -80,6 +80,7 @@ export default {
80
80
  },
81
81
  pager: {
82
82
  goto: 'Go to',
83
+ gotoTitle: 'Number',
83
84
  pagesize: '{0}/page',
84
85
  total: 'Total {0} record',
85
86
  pageClassifier: '',
@@ -80,6 +80,7 @@ export default {
80
80
  },
81
81
  pager: {
82
82
  goto: 'Ir a',
83
+ gotoTitle: 'Number',
83
84
  pagesize: '{0}/página',
84
85
  total: 'Total {0} registro',
85
86
  pageClassifier: '',
@@ -80,6 +80,7 @@ export default {
80
80
  },
81
81
  pager: {
82
82
  goto: '移動',
83
+ gotoTitle: '页数',
83
84
  pagesize: '{0}件/ページ',
84
85
  total: '全 {0} 件',
85
86
  pageClassifier: 'ページ',
@@ -80,6 +80,7 @@ export default {
80
80
  },
81
81
  pager: {
82
82
  goto: 'Ir para',
83
+ gotoTitle: 'Number',
83
84
  pagesize: '{0}/página',
84
85
  total: 'Total de {0} registros',
85
86
  pageClassifier: '',
@@ -80,6 +80,7 @@ export default {
80
80
  },
81
81
  pager: {
82
82
  goto: '前往',
83
+ gotoTitle: '页数',
83
84
  pagesize: '{0}条/页',
84
85
  total: '共 {0} 条记录',
85
86
  pageClassifier: '页',
@@ -80,6 +80,7 @@ export default {
80
80
  },
81
81
  pager: {
82
82
  goto: '前往',
83
+ gotoTitle: '页数',
83
84
  pagesize: '{0}項/頁',
84
85
  total: '共 {0} 項記錄',
85
86
  pageClassifier: '頁',
@@ -298,17 +298,21 @@ export default {
298
298
  isFull ? h('span', {
299
299
  class: 'vxe-pager--goto-text'
300
300
  }, GlobalConfig.i18n('vxe.pager.goto')) : null,
301
- h('input', {
301
+ h('vxe-input', {
302
302
  class: 'vxe-pager--goto',
303
- domProps: {
304
- value: this.inpCurrPage
305
- },
306
- attrs: {
307
- type: 'text',
308
- autocomplete: 'off'
303
+ props: {
304
+ value: this.inpCurrPage,
305
+ placeholder: GlobalConfig.i18n('vxe.pager.gotoTitle'),
306
+ align: 'center',
307
+ type: 'integer',
308
+ max: this.pageCount,
309
+ min: 1,
310
+ controls: false
309
311
  },
310
312
  on: {
311
- input: this.jumpInputEvent,
313
+ modelValue: (val) => {
314
+ this.inpCurrPage = val
315
+ },
312
316
  keydown: this.jumpKeydownEvent,
313
317
  blur: this.triggerJumpEvent
314
318
  }
@@ -448,25 +452,24 @@ export default {
448
452
  this.$emit('update:pageSize', pageSize)
449
453
  this.$emit('page-change', { type: 'size', pageSize, currentPage })
450
454
  },
451
- jumpInputEvent (evnt) {
452
- this.inpCurrPage = evnt.target.value
453
- },
454
- jumpKeydownEvent (evnt) {
455
- if (evnt.keyCode === 13) {
456
- this.triggerJumpEvent(evnt)
457
- } else if (evnt.keyCode === 38) {
458
- evnt.preventDefault()
455
+ jumpKeydownEvent (params) {
456
+ const { $event } = params
457
+ if ($event.keyCode === 13) {
458
+ this.triggerJumpEvent(params)
459
+ } else if ($event.keyCode === 38) {
460
+ $event.preventDefault()
459
461
  this.nextPage()
460
- } else if (evnt.keyCode === 40) {
461
- evnt.preventDefault()
462
+ } else if ($event.keyCode === 40) {
463
+ $event.preventDefault()
462
464
  this.prevPage()
463
465
  }
464
466
  },
465
- triggerJumpEvent (evnt) {
466
- const value = XEUtils.toInteger(evnt.target.value)
467
+ triggerJumpEvent (params) {
468
+ const { $event } = params
469
+ const value = XEUtils.toInteger($event.target.value)
467
470
  const current = value <= 0 ? 1 : value >= this.pageCount ? this.pageCount : value
468
471
  const currPage = XEUtils.toValueString(current)
469
- evnt.target.value = currPage
472
+ $event.target.value = currPage
470
473
  this.inpCurrPage = currPage
471
474
  this.jumpPage(current)
472
475
  }
@@ -117,6 +117,7 @@ export default {
117
117
  }, cols.map((column, $columnIndex) => {
118
118
  const { type, showHeaderOverflow, headerAlign, align, headerClassName } = column
119
119
  // const { enabled } = tooltipOpts
120
+ const colid = column.id
120
121
  const isColGroup = column.children && column.children.length
121
122
  const fixedHiddenColumn = fixedType ? column.fixed !== fixedType && !isColGroup : column.fixed && overflowX
122
123
  const headOverflow = XEUtils.isUndefined(showHeaderOverflow) || XEUtils.isNull(showHeaderOverflow) ? allColumnHeaderOverflow : showHeaderOverflow
@@ -145,7 +146,7 @@ export default {
145
146
  thOns.mousedown = evnt => $xetable.triggerHeaderCellMousedownEvent(evnt, params)
146
147
  }
147
148
  return h('th', {
148
- class: ['vxe-header--column', column.id, {
149
+ class: ['vxe-header--column', colid, {
149
150
  [`col--${headAlign}`]: headAlign,
150
151
  [`col--${type}`]: type,
151
152
  'col--last': $columnIndex === cols.length - 1,
@@ -159,13 +160,13 @@ export default {
159
160
  'col--current': currentColumn === column
160
161
  }, UtilTools.getClass(headerClassName, params), UtilTools.getClass(headerCellClassName, params)],
161
162
  attrs: {
162
- colid: column.id,
163
+ colid,
163
164
  colspan: column.colSpan > 1 ? column.colSpan : null,
164
165
  rowspan: column.rowSpan > 1 ? column.rowSpan : null
165
166
  },
166
167
  style: headerCellStyle ? (XEUtils.isFunction(headerCellStyle) ? headerCellStyle(params) : headerCellStyle) : null,
167
168
  on: thOns,
168
- key: columnKey || columnOpts.useKey || isColGroup ? column.id : $columnIndex
169
+ key: columnKey || columnOpts.useKey || isColGroup ? colid : $columnIndex
169
170
  }, [
170
171
  h('div', {
171
172
  class: ['vxe-cell', {
@@ -2761,7 +2761,7 @@ const Methods = {
2761
2761
  const isUpArrow = keyCode === 38
2762
2762
  const isRightArrow = keyCode === 39
2763
2763
  const isDwArrow = keyCode === 40
2764
- const isDel = keyCode === 46
2764
+ const hasDeleteKey = keyCode === 46
2765
2765
  const isF2 = keyCode === 113
2766
2766
  const isContextMenu = keyCode === 93
2767
2767
  const hasMetaKey = evnt.metaKey
@@ -2772,6 +2772,7 @@ const Methods = {
2772
2772
  const operCtxMenu = isCtxMenu && ctxMenuStore.visible && (isEnter || isSpacebar || operArrow)
2773
2773
  const isEditStatus = isEnableConf(editConfig) && actived.column && actived.row
2774
2774
  const childrenField = treeOpts.children || treeOpts.childrenField
2775
+ const beforeEditMethod = editOpts.beforeEditMethod || editOpts.activeMethod
2775
2776
  let params
2776
2777
  if (filterStore.visible) {
2777
2778
  if (isEsc) {
@@ -2872,9 +2873,32 @@ const Methods = {
2872
2873
  } else if (actived.row || actived.column) {
2873
2874
  this.moveTabSelected(actived.args, hasShiftKey, evnt)
2874
2875
  }
2875
- } else if (keyboardConfig && (treeConfig || isEnableConf(editConfig)) && (isDel || (treeConfig && (rowOpts.isCurrent || highlightCurrentRow) && currentRow ? hasBackspaceKey && keyboardOpts.isArrow : hasBackspaceKey))) {
2876
+ } else if (keyboardConfig && keyboardOpts.isDel && hasDeleteKey && isEnableConf(editConfig) && (selected.row || selected.column)) {
2877
+ // 如果是删除键
2876
2878
  if (!isEditStatus) {
2877
- const { delMethod, backMethod } = keyboardOpts
2879
+ const { delMethod } = keyboardOpts
2880
+ const delPaqrams = {
2881
+ row: selected.row,
2882
+ rowIndex: this.getRowIndex(selected.row),
2883
+ column: selected.column,
2884
+ columnIndex: this.getColumnIndex(selected.column),
2885
+ $table: this
2886
+ }
2887
+ // 是否被禁用
2888
+ if (!beforeEditMethod || beforeEditMethod(params)) {
2889
+ if (delMethod) {
2890
+ delMethod(delPaqrams)
2891
+ } else {
2892
+ setCellValue(selected.row, selected.column, null)
2893
+ }
2894
+ // 如果按下 del 键,更新表尾数据
2895
+ this.updateFooter()
2896
+ this.emitEvent('cell-delete-value', delPaqrams, evnt)
2897
+ }
2898
+ }
2899
+ } else if (hasBackspaceKey && keyboardConfig && keyboardOpts.isBack && isEnableConf(editConfig) && (selected.row || selected.column)) {
2900
+ if (!isEditStatus) {
2901
+ const { backMethod } = keyboardOpts
2878
2902
  // 如果是删除键
2879
2903
  if (keyboardOpts.isDel && isEnableConf(editConfig) && (selected.row || selected.column)) {
2880
2904
  const delPaqrams = {
@@ -2884,12 +2908,8 @@ const Methods = {
2884
2908
  columnIndex: this.getColumnIndex(selected.column),
2885
2909
  $table: this
2886
2910
  }
2887
- if (delMethod) {
2888
- delMethod(delPaqrams)
2889
- } else {
2890
- setCellValue(selected.row, selected.column, null)
2891
- }
2892
- if (hasBackspaceKey) {
2911
+ // 是否被禁用
2912
+ if (!beforeEditMethod || beforeEditMethod(params)) {
2893
2913
  if (backMethod) {
2894
2914
  backMethod({
2895
2915
  row: selected.row,
@@ -2899,25 +2919,28 @@ const Methods = {
2899
2919
  $table: this
2900
2920
  })
2901
2921
  } else {
2922
+ setCellValue(selected.row, selected.column, null)
2902
2923
  this.handleActived(selected.args, evnt)
2903
2924
  }
2904
- } else if (isDel) {
2905
- // 如果按下 del 键,更新表尾数据
2906
- this.updateFooter()
2907
- }
2908
- this.emitEvent('cell-delete-value', delPaqrams, evnt)
2909
- } else if (hasBackspaceKey && keyboardOpts.isArrow && treeConfig && (rowOpts.isCurrent || highlightCurrentRow) && currentRow) {
2910
- // 如果树形表格回退键关闭当前行返回父节点
2911
- const { parent: parentRow } = XEUtils.findTree(this.afterFullData, item => item === currentRow, { children: childrenField })
2912
- if (parentRow) {
2913
- evnt.preventDefault()
2914
- params = { $table: this, row: parentRow }
2915
- this.setTreeExpand(parentRow, false)
2916
- .then(() => this.scrollToRow(parentRow))
2917
- .then(() => this.triggerCurrentRowEvent(evnt, params))
2925
+ this.emitEvent('cell-backspace-value', delPaqrams, evnt)
2918
2926
  }
2919
2927
  }
2920
2928
  }
2929
+ } else if (hasBackspaceKey && keyboardConfig && treeConfig && keyboardOpts.isBack && (rowOpts.isCurrent || highlightCurrentRow) && currentRow) {
2930
+ // 如果树形表格回退键关闭当前行返回父节点
2931
+ const { parent: parentRow } = XEUtils.findTree(this.afterTreeFullData, item => item === currentRow, { children: childrenField })
2932
+ if (parentRow) {
2933
+ evnt.preventDefault()
2934
+ params = {
2935
+ $table: this,
2936
+ row: parentRow,
2937
+ rowIndex: this.getRowIndex(parentRow),
2938
+ $rowIndex: this.getVMRowIndex(parentRow)
2939
+ }
2940
+ this.setTreeExpand(parentRow, false)
2941
+ .then(() => this.scrollToRow(parentRow))
2942
+ .then(() => this.triggerCurrentRowEvent(evnt, params))
2943
+ }
2921
2944
  } else if (keyboardConfig && keyboardOpts.isEdit && !hasCtrlKey && !hasMetaKey && (isSpacebar || (keyCode >= 48 && keyCode <= 57) || (keyCode >= 65 && keyCode <= 90) || (keyCode >= 96 && keyCode <= 111) || (keyCode >= 186 && keyCode <= 192) || (keyCode >= 219 && keyCode <= 222))) {
2922
2945
  const { editMethod } = keyboardOpts
2923
2946
  // 启用编辑后,空格键功能将失效
@@ -665,25 +665,25 @@ function oldFormItemRadioAndCheckboxRender (h, renderOpts, params) {
665
665
  */
666
666
  const renderMap = {
667
667
  input: {
668
- autoFocus: 'input',
669
- renderEdit: nativeEditRender,
670
- renderDefault: nativeEditRender,
671
- renderFilter: nativeFilterRender,
672
- defaultFilterMethod: handleInputFilterMethod,
673
- renderItemContent: nativeItemRender
668
+ tableAutofocus: 'input',
669
+ renderTableEdit: nativeEditRender,
670
+ renderTableDefault: nativeEditRender,
671
+ renderTableFilter: nativeFilterRender,
672
+ defaultTableFilterMethod: handleInputFilterMethod,
673
+ renderFormItemContent: nativeItemRender
674
674
  },
675
675
  textarea: {
676
- autoFocus: 'textarea',
677
- renderEdit: nativeEditRender,
678
- renderItemContent: nativeItemRender
676
+ tableAutofocus: 'textarea',
677
+ renderTableEdit: nativeEditRender,
678
+ renderFormItemContent: nativeItemRender
679
679
  },
680
680
  select: {
681
- renderEdit: nativeSelectEditRender,
682
- renderDefault: nativeSelectEditRender,
683
- renderCell (h, renderOpts, params) {
681
+ renderTableEdit: nativeSelectEditRender,
682
+ renderTableDefault: nativeSelectEditRender,
683
+ renderTableCell (h, renderOpts, params) {
684
684
  return getCellLabelVNs(h, renderOpts, params, getSelectCellValue(renderOpts, params))
685
685
  },
686
- renderFilter (h, renderOpts, params) {
686
+ renderTableFilter (h, renderOpts, params) {
687
687
  const { column } = params
688
688
  return column.filters.map((option, oIndex) => {
689
689
  return h('select', {
@@ -695,8 +695,8 @@ const renderMap = {
695
695
  renderOpts.optionGroups ? renderNativeOptgroups(h, renderOpts, params, renderNativeOptions) : renderNativeOptions(h, renderOpts.options, renderOpts, params))
696
696
  })
697
697
  },
698
- defaultFilterMethod: handleFilterMethod,
699
- renderItemContent (h, renderOpts, params) {
698
+ defaultTableFilterMethod: handleFilterMethod,
699
+ renderFormItemContent (h, renderOpts, params) {
700
700
  return [
701
701
  h('select', {
702
702
  class: 'vxe-default-select',
@@ -706,12 +706,12 @@ const renderMap = {
706
706
  renderOpts.optionGroups ? renderNativeOptgroups(h, renderOpts, params, renderNativeFormOptions) : renderNativeFormOptions(h, renderOpts.options, renderOpts, params))
707
707
  ]
708
708
  },
709
- cellExportMethod: handleExportSelectMethod
709
+ tableExportMethod: handleExportSelectMethod
710
710
  },
711
711
  VxeInput: {
712
- autoFocus: '.vxe-input--inner',
713
- renderEdit: defaultEditRender,
714
- renderCell (h, renderOpts, params) {
712
+ tableAutofocus: '.vxe-input--inner',
713
+ renderTableEdit: defaultEditRender,
714
+ renderTableCell (h, renderOpts, params) {
715
715
  const { props = {} } = renderOpts
716
716
  const { row, column } = params
717
717
  const digits = props.digits || GlobalConfig.input.digits
@@ -732,22 +732,22 @@ const renderMap = {
732
732
  }
733
733
  return getCellLabelVNs(h, renderOpts, params, cellValue)
734
734
  },
735
- renderDefault: defaultEditRender,
736
- renderFilter: defaultFilterRender,
737
- defaultFilterMethod: handleInputFilterMethod,
738
- renderItemContent: defaultItemRender
735
+ renderTableDefault: defaultEditRender,
736
+ renderTableFilter: defaultFilterRender,
737
+ defaultTableFilterMethod: handleInputFilterMethod,
738
+ renderFormItemContent: defaultItemRender
739
739
  },
740
740
  VxeTextarea: {
741
- autoFocus: '.vxe-textarea--inner',
742
- renderItemContent: defaultItemRender
741
+ tableAutofocus: '.vxe-textarea--inner',
742
+ renderFormItemContent: defaultItemRender
743
743
  },
744
744
  VxeButton: {
745
- renderDefault: defaultCellRender,
746
- renderItemContent: defaultFormItemRender
745
+ renderTableDefault: defaultCellRender,
746
+ renderFormItemContent: defaultFormItemRender
747
747
  },
748
748
  VxeButtonGroup: {
749
- renderDefault: defaultCellRender,
750
- renderItemContent (h, renderOpts, params) {
749
+ renderTableDefault: defaultCellRender,
750
+ renderFormItemContent (h, renderOpts, params) {
751
751
  const { options } = renderOpts
752
752
  const { data, property } = params
753
753
  const itemValue = XEUtils.get(data, property)
@@ -761,13 +761,13 @@ const renderMap = {
761
761
  }
762
762
  },
763
763
  VxeSelect: {
764
- autoFocus: '.vxe-input--inner',
765
- renderEdit: defaultSelectEditRender,
766
- renderDefault: defaultSelectEditRender,
767
- renderCell (h, renderOpts, params) {
764
+ tableAutofocus: '.vxe-input--inner',
765
+ renderTableEdit: defaultSelectEditRender,
766
+ renderTableDefault: defaultSelectEditRender,
767
+ renderTableCell (h, renderOpts, params) {
768
768
  return getCellLabelVNs(h, renderOpts, params, getSelectCellValue(renderOpts, params))
769
769
  },
770
- renderFilter (h, renderOpts, params) {
770
+ renderTableFilter (h, renderOpts, params) {
771
771
  const { column } = params
772
772
  const { options, optionProps, optionGroups, optionGroupProps } = renderOpts
773
773
  const nativeOn = getNativeOns(renderOpts, params)
@@ -781,8 +781,8 @@ const renderMap = {
781
781
  })
782
782
  })
783
783
  },
784
- defaultFilterMethod: handleFilterMethod,
785
- renderItemContent (h, renderOpts, params) {
784
+ defaultTableFilterMethod: handleFilterMethod,
785
+ renderFormItemContent (h, renderOpts, params) {
786
786
  const { data, property } = params
787
787
  const { options, optionProps, optionGroups, optionGroupProps } = renderOpts
788
788
  const itemValue = XEUtils.get(data, property)
@@ -794,36 +794,36 @@ const renderMap = {
794
794
  })
795
795
  ]
796
796
  },
797
- cellExportMethod: handleExportSelectMethod
797
+ tableExportMethod: handleExportSelectMethod
798
798
  },
799
799
  VxeRadio: {
800
- autoFocus: '.vxe-radio--input',
801
- renderItemContent: defaultFormItemRender
800
+ tableAutofocus: '.vxe-radio--input',
801
+ renderFormItemContent: defaultFormItemRender
802
802
  },
803
803
  VxeRadioGroup: {
804
- autoFocus: '.vxe-radio--input',
805
- renderItemContent: formItemRadioAndCheckboxRender
804
+ tableAutofocus: '.vxe-radio--input',
805
+ renderFormItemContent: formItemRadioAndCheckboxRender
806
806
  },
807
807
  VxeCheckbox: {
808
- autoFocus: '.vxe-checkbox--input',
809
- renderItemContent: defaultFormItemRender
808
+ tableAutofocus: '.vxe-checkbox--input',
809
+ renderFormItemContent: defaultFormItemRender
810
810
  },
811
811
  VxeCheckboxGroup: {
812
- autoFocus: '.vxe-checkbox--input',
813
- renderItemContent: formItemRadioAndCheckboxRender
812
+ tableAutofocus: '.vxe-checkbox--input',
813
+ renderFormItemContent: formItemRadioAndCheckboxRender
814
814
  },
815
815
  VxeSwitch: {
816
- autoFocus: '.vxe-switch--button',
817
- renderEdit: defaultEditRender,
818
- renderDefault: defaultEditRender,
819
- renderItemContent: defaultItemRender
816
+ tableAutofocus: '.vxe-switch--button',
817
+ renderTableEdit: defaultEditRender,
818
+ renderTableDefault: defaultEditRender,
819
+ renderFormItemContent: defaultItemRender
820
820
  },
821
821
 
822
822
  // 以下已废弃
823
823
  $input: {
824
- autoFocus: '.vxe-input--inner',
825
- renderEdit: oldEditRender,
826
- renderCell (h, renderOpts, params) {
824
+ tableAutofocus: '.vxe-input--inner',
825
+ renderTableEdit: oldEditRender,
826
+ renderTableCell (h, renderOpts, params) {
827
827
  const { props = {} } = renderOpts
828
828
  const { row, column } = params
829
829
  const digits = props.digits || GlobalConfig.input.digits
@@ -843,31 +843,31 @@ const renderMap = {
843
843
  }
844
844
  return getCellLabelVNs(h, renderOpts, params, cellValue)
845
845
  },
846
- renderDefault: oldEditRender,
847
- renderFilter: oldFilterRender,
848
- defaultFilterMethod: handleInputFilterMethod,
849
- renderItemContent: oldItemRender
846
+ renderTableDefault: oldEditRender,
847
+ renderTableFilter: oldFilterRender,
848
+ defaultTableFilterMethod: handleInputFilterMethod,
849
+ renderFormItemContent: oldItemRender
850
850
  },
851
851
  $textarea: {
852
- autoFocus: '.vxe-textarea--inner',
853
- renderItemContent: oldItemRender
852
+ tableAutofocus: '.vxe-textarea--inner',
853
+ renderFormItemContent: oldItemRender
854
854
  },
855
855
  $button: {
856
- renderDefault: oldButtonEditRender,
857
- renderItemContent: oldButtonItemRender
856
+ renderTableDefault: oldButtonEditRender,
857
+ renderFormItemContent: oldButtonItemRender
858
858
  },
859
859
  $buttons: {
860
- renderDefault: oldButtonsEditRender,
861
- renderItemContent: oldButtonsItemRender
860
+ renderTableDefault: oldButtonsEditRender,
861
+ renderFormItemContent: oldButtonsItemRender
862
862
  },
863
863
  $select: {
864
- autoFocus: '.vxe-input--inner',
865
- renderEdit: oldSelectEditRender,
866
- renderDefault: oldSelectEditRender,
867
- renderCell (h, renderOpts, params) {
864
+ tableAutofocus: '.vxe-input--inner',
865
+ renderTableEdit: oldSelectEditRender,
866
+ renderTableDefault: oldSelectEditRender,
867
+ renderTableCell (h, renderOpts, params) {
868
868
  return getCellLabelVNs(h, renderOpts, params, getSelectCellValue(renderOpts, params))
869
869
  },
870
- renderFilter (h, renderOpts, params) {
870
+ renderTableFilter (h, renderOpts, params) {
871
871
  const { column } = params
872
872
  const { options, optionProps, optionGroups, optionGroupProps } = renderOpts
873
873
  const nativeOn = getNativeOns(renderOpts, params)
@@ -881,8 +881,8 @@ const renderMap = {
881
881
  })
882
882
  })
883
883
  },
884
- defaultFilterMethod: handleFilterMethod,
885
- renderItemContent (h, renderOpts, params) {
884
+ defaultTableFilterMethod: handleFilterMethod,
885
+ renderFormItemContent (h, renderOpts, params) {
886
886
  const { data, property } = params
887
887
  const { options, optionProps, optionGroups, optionGroupProps } = renderOpts
888
888
  const itemValue = XEUtils.get(data, property)
@@ -894,21 +894,21 @@ const renderMap = {
894
894
  })
895
895
  ]
896
896
  },
897
- cellExportMethod: handleExportSelectMethod
897
+ tableExportMethod: handleExportSelectMethod
898
898
  },
899
899
  $radio: {
900
- autoFocus: '.vxe-radio--input',
901
- renderItemContent: oldFormItemRadioAndCheckboxRender
900
+ tableAutofocus: '.vxe-radio--input',
901
+ renderFormItemContent: oldFormItemRadioAndCheckboxRender
902
902
  },
903
903
  $checkbox: {
904
- autoFocus: '.vxe-checkbox--input',
905
- renderItemContent: oldFormItemRadioAndCheckboxRender
904
+ tableAutofocus: '.vxe-checkbox--input',
905
+ renderFormItemContent: oldFormItemRadioAndCheckboxRender
906
906
  },
907
907
  $switch: {
908
- autoFocus: '.vxe-switch--button',
909
- renderEdit: oldEditRender,
910
- renderDefault: oldEditRender,
911
- renderItemContent: oldItemRender
908
+ tableAutofocus: '.vxe-switch--button',
909
+ renderTableEdit: oldEditRender,
910
+ renderTableDefault: oldEditRender,
911
+ renderFormItemContent: oldItemRender
912
912
  }
913
913
  // 以上已废弃
914
914
  }
@@ -262,6 +262,7 @@ $btnThemeList: (
262
262
  }
263
263
  .vxe-button--dropdown {
264
264
  position: relative;
265
+ outline: 0;
265
266
  &+.vxe-button-wrapper,
266
267
  &+.vxe-button.type--button,
267
268
  &+.vxe-button--dropdown {
@@ -100,6 +100,7 @@
100
100
  flex-grow: 1;
101
101
  overflow-x: hidden;
102
102
  overflow-y: auto;
103
+ outline: 0;
103
104
  }
104
105
 
105
106
  .vxe-table-custom--header,
@@ -221,6 +222,7 @@
221
222
  .vxe-table-custom-popup--body {
222
223
  overflow: auto;
223
224
  height: 100%;
225
+ outline: 0;
224
226
  }
225
227
 
226
228
  .vxe-table-custom-popup--table-wrapper {
package/styles/grid.scss CHANGED
@@ -42,6 +42,7 @@
42
42
  .vxe-grid--right-wrapper {
43
43
  flex-shrink: 0;
44
44
  overflow: auto;
45
+ outline: 0;
45
46
  }
46
47
  .vxe-grid--table-wrapper {
47
48
  flex-grow: 1;
package/styles/input.scss CHANGED
@@ -86,10 +86,10 @@ $iconWidth: 1.6em;
86
86
  top: 1px;
87
87
  right: 0.5em;
88
88
  height: calc(100% - 2px);
89
- color: var($vxe-input-count-color);
90
- background-color: var($vxe-input-count-background-color);
89
+ color: $vxe-input-count-color;
90
+ background-color: $vxe-input-count-background-color;
91
91
  &.is--error {
92
- color: var($vxe-input-count-error-color);
92
+ color: $vxe-input-count-error-color;
93
93
  }
94
94
  }
95
95
 
package/styles/modal.scss CHANGED
@@ -12,6 +12,7 @@
12
12
  color: $vxe-font-color;
13
13
  font-family: $vxe-font-family;
14
14
  transition: top .4s ease-in-out;
15
+ outline: 0;
15
16
  &.is--active {
16
17
  display: block;
17
18
  }
@@ -166,6 +167,7 @@
166
167
  text-align: left;
167
168
  pointer-events: auto;
168
169
  opacity: 0;
170
+ outline: 0;
169
171
  &.is--drag {
170
172
  cursor: move;
171
173
  .vxe-modal--body,
@@ -231,6 +233,7 @@
231
233
  .vxe-modal--body {
232
234
  display: flex;
233
235
  flex-grow: 1;
236
+ outline: 0;
234
237
  }
235
238
  .vxe-modal--header {
236
239
  display: flex;
@@ -92,7 +92,7 @@
92
92
  border-width: 0.1em;
93
93
  border-style: solid;
94
94
  border-color: inherit;
95
- background-color: var(--vxe-ui-layout-background-color);
95
+ background-color: $vxe-layout-background-color;
96
96
  }
97
97
  }
98
98