vxe-table 4.22.4 → 4.23.0-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 (81) hide show
  1. package/dist/all.esm.js +211 -126
  2. package/dist/style.css +1 -1
  3. package/es/grid/src/grid.js +14 -2
  4. package/es/locale/lang/fr-FR.js +29 -29
  5. package/es/style.css +1 -1
  6. package/es/table/module/custom/panel.js +4 -3
  7. package/es/table/module/edit/hook.js +5 -4
  8. package/es/table/module/export/hook.js +6 -4
  9. package/es/table/module/filter/hook.js +2 -2
  10. package/es/table/module/keyboard/hook.js +4 -3
  11. package/es/table/module/menu/hook.js +3 -3
  12. package/es/table/render/index.js +7 -4
  13. package/es/table/src/body.js +4 -4
  14. package/es/table/src/header.js +4 -3
  15. package/es/table/src/props.js +4 -0
  16. package/es/table/src/table.js +140 -90
  17. package/es/table/src/util.js +7 -3
  18. package/es/ui/index.js +9 -11
  19. package/es/ui/src/log.js +1 -1
  20. package/es/ui/src/utils.js +9 -0
  21. package/lib/grid/src/grid.js +13 -1
  22. package/lib/grid/src/grid.min.js +1 -1
  23. package/lib/index.umd.js +136 -84
  24. package/lib/index.umd.min.js +1 -1
  25. package/lib/locale/lang/fr-FR.js +29 -29
  26. package/lib/locale/lang/fr-FR.min.js +1 -1
  27. package/lib/locale/lang/fr-FR.umd.js +29 -29
  28. package/lib/style.css +1 -1
  29. package/lib/table/module/custom/panel.js +3 -1
  30. package/lib/table/module/custom/panel.min.js +1 -1
  31. package/lib/table/module/edit/hook.js +4 -3
  32. package/lib/table/module/edit/hook.min.js +1 -1
  33. package/lib/table/module/export/hook.js +9 -3
  34. package/lib/table/module/export/hook.min.js +1 -1
  35. package/lib/table/module/filter/hook.js +1 -1
  36. package/lib/table/module/filter/hook.min.js +1 -1
  37. package/lib/table/module/keyboard/hook.js +4 -3
  38. package/lib/table/module/keyboard/hook.min.js +1 -1
  39. package/lib/table/module/menu/hook.js +2 -2
  40. package/lib/table/module/menu/hook.min.js +1 -1
  41. package/lib/table/render/index.js +11 -5
  42. package/lib/table/render/index.min.js +1 -1
  43. package/lib/table/src/body.js +3 -3
  44. package/lib/table/src/body.min.js +1 -1
  45. package/lib/table/src/header.js +3 -2
  46. package/lib/table/src/header.min.js +1 -1
  47. package/lib/table/src/props.js +4 -0
  48. package/lib/table/src/props.min.js +1 -1
  49. package/lib/table/src/table.js +48 -46
  50. package/lib/table/src/table.min.js +1 -1
  51. package/lib/table/src/util.js +12 -2
  52. package/lib/table/src/util.min.js +1 -1
  53. package/lib/ui/index.js +9 -11
  54. package/lib/ui/index.min.js +1 -1
  55. package/lib/ui/src/log.js +1 -1
  56. package/lib/ui/src/log.min.js +1 -1
  57. package/lib/ui/src/utils.js +10 -0
  58. package/lib/ui/src/utils.min.js +1 -1
  59. package/package.json +2 -2
  60. package/packages/grid/src/grid.ts +14 -2
  61. package/packages/locale/lang/fr-FR.ts +903 -903
  62. package/packages/table/module/custom/panel.ts +4 -3
  63. package/packages/table/module/edit/hook.ts +5 -4
  64. package/packages/table/module/export/hook.ts +6 -4
  65. package/packages/table/module/filter/hook.ts +2 -2
  66. package/packages/table/module/keyboard/hook.ts +4 -3
  67. package/packages/table/module/menu/hook.ts +3 -3
  68. package/packages/table/render/index.ts +7 -4
  69. package/packages/table/src/body.ts +4 -4
  70. package/packages/table/src/header.ts +4 -3
  71. package/packages/table/src/props.ts +4 -0
  72. package/packages/table/src/table.ts +141 -88
  73. package/packages/table/src/util.ts +7 -3
  74. package/packages/ui/index.ts +8 -10
  75. package/packages/ui/src/utils.ts +10 -0
  76. /package/es/{iconfont.1791617063720.ttf → iconfont.1791954193706.ttf} +0 -0
  77. /package/es/{iconfont.1791617063720.woff → iconfont.1791954193706.woff} +0 -0
  78. /package/es/{iconfont.1791617063720.woff2 → iconfont.1791954193706.woff2} +0 -0
  79. /package/lib/{iconfont.1791617063720.ttf → iconfont.1791954193706.ttf} +0 -0
  80. /package/lib/{iconfont.1791617063720.woff → iconfont.1791954193706.woff} +0 -0
  81. /package/lib/{iconfont.1791617063720.woff2 → iconfont.1791954193706.woff2} +0 -0
@@ -2,7 +2,7 @@ import { watch, reactive } from 'vue'
2
2
  import XEUtils from 'xe-utils'
3
3
  import { ColumnInfo } from './columnInfo'
4
4
  import { isPx, isScale, queryElement } from '../../ui/src/dom'
5
- import { eqEmptyValue } from '../../ui/src/utils'
5
+ import { eqEmptyValue, hasEnableConf } from '../../ui/src/utils'
6
6
 
7
7
  import type { VxeTableConstructor, VxeTablePrivateMethods, VxeTableDefines, VxeTablePropTypes, TableReactData, TableInternalData } from '../../../types'
8
8
 
@@ -976,6 +976,10 @@ export function getLastChildColumn (column: VxeTableDefines.ColumnInfo): VxeTabl
976
976
  export function clearTableDefaultStatus ($xeTable: VxeTableConstructor & VxeTablePrivateMethods) {
977
977
  const { props, internalData } = $xeTable
978
978
 
979
+ const { keyboardConfig, mouseConfig } = props
980
+ const { computeMouseOpts, computeKeyboardOpts } = $xeTable.getComputeMaps()
981
+ const mouseOpts = computeMouseOpts.value
982
+ const keyboardOpts = computeKeyboardOpts.value
979
983
  internalData.initStatus = false
980
984
  const actionList = [
981
985
  $xeTable.clearSort(),
@@ -995,12 +999,12 @@ export function clearTableDefaultStatus ($xeTable: VxeTableConstructor & VxeTabl
995
999
  $xeTable.clearFilter()
996
1000
  )
997
1001
  }
998
- if ($xeTable.clearSelected && (props.keyboardConfig || props.mouseConfig)) {
1002
+ if ($xeTable.clearSelected && (hasEnableConf(keyboardConfig, keyboardOpts) || hasEnableConf(mouseConfig, mouseOpts))) {
999
1003
  actionList.push(
1000
1004
  $xeTable.clearSelected()
1001
1005
  )
1002
1006
  }
1003
- if ($xeTable.clearCellAreas && props.mouseConfig) {
1007
+ if ($xeTable.clearCellAreas && hasEnableConf(mouseConfig, mouseOpts)) {
1004
1008
  actionList.push(
1005
1009
  $xeTable.clearCellAreas(),
1006
1010
  $xeTable.clearCopyCellArea()
@@ -269,16 +269,14 @@ VxeUI.setConfig({
269
269
  oSize: 0
270
270
  },
271
271
  scrollbarConfig: {
272
- // width: 14,
273
- // height: 14,
274
- x: {
275
- // position: 'bottom',
276
- visible: true
277
- },
278
- y: {
279
- // position: 'right',
280
- visible: true
281
- }
272
+ // xConfig: {
273
+ // // position: 'bottom',
274
+ // // visible: true
275
+ // },
276
+ // yConfig: {
277
+ // // position: 'right',
278
+ // // visible: true
279
+ // }
282
280
  },
283
281
  undoRedoHistoryConfig: {
284
282
  stackSize: 50
@@ -8,6 +8,16 @@ export function isEnableConf (conf: any): boolean {
8
8
  return conf && conf.enabled !== false
9
9
  }
10
10
 
11
+ /**
12
+ * 用于开关类型的配置项
13
+ * 局部启用规则:conf={}
14
+ * 局部禁用规则:conf={enabled:false}
15
+ * 全局默认启用规则:conf.enabled=true
16
+ */
17
+ export function hasEnableConf (conf: any, opts: any): boolean {
18
+ return opts && (conf ? opts.enabled !== false : opts.enabled)
19
+ }
20
+
11
21
  export function isEmptyValue (cellValue: any) {
12
22
  return cellValue === null || cellValue === undefined || cellValue === ''
13
23
  }