vxe-table 4.18.5 → 4.18.7

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 (145) hide show
  1. package/LICENSE +20 -20
  2. package/README.en.md +118 -118
  3. package/README.ja-JP.md +117 -117
  4. package/README.md +268 -268
  5. package/README.zh-TW.md +117 -117
  6. package/es/style.css +1 -1
  7. package/es/table/src/table.js +54 -0
  8. package/es/table/src/util.js +3 -4
  9. package/es/table/style.css +48 -18
  10. package/es/ui/index.js +1 -1
  11. package/es/ui/src/log.js +1 -1
  12. package/es/vxe-table/style.css +48 -18
  13. package/lib/index.common.js +1 -2
  14. package/lib/index.umd.js +2832 -2732
  15. package/lib/index.umd.min.js +1 -1
  16. package/lib/style.css +1 -1
  17. package/lib/table/src/table.js +5 -4
  18. package/lib/table/src/table.min.js +1 -1
  19. package/lib/table/src/util.js +4 -6
  20. package/lib/table/src/util.min.js +1 -1
  21. package/lib/table/style/style.css +48 -18
  22. package/lib/ui/index.js +1 -1
  23. package/lib/ui/index.min.js +1 -1
  24. package/lib/ui/src/log.js +1 -1
  25. package/lib/ui/src/log.min.js +1 -1
  26. package/lib/v-x-e-table/index.js +1 -2
  27. package/lib/v-x-e-table/index.min.js +1 -1
  28. package/lib/vxe-colgroup/index.js +1 -2
  29. package/lib/vxe-colgroup/index.min.js +1 -1
  30. package/lib/vxe-column/index.js +1 -2
  31. package/lib/vxe-column/index.min.js +1 -1
  32. package/lib/vxe-grid/index.js +1 -2
  33. package/lib/vxe-grid/index.min.js +1 -1
  34. package/lib/vxe-table/index.js +1 -2
  35. package/lib/vxe-table/index.min.js +1 -1
  36. package/lib/vxe-table/style/style.css +48 -18
  37. package/lib/vxe-toolbar/index.js +1 -2
  38. package/lib/vxe-toolbar/index.min.js +1 -1
  39. package/lib/vxe-ui/index.js +1 -2
  40. package/lib/vxe-ui/index.min.js +1 -1
  41. package/lib/vxe-v-x-e-table/index.js +1 -2
  42. package/lib/vxe-v-x-e-table/index.min.js +1 -1
  43. package/package.json +91 -91
  44. package/packages/colgroup/index.ts +22 -22
  45. package/packages/column/index.ts +22 -22
  46. package/packages/components.ts +43 -43
  47. package/packages/grid/index.ts +18 -18
  48. package/packages/grid/src/emits.ts +19 -19
  49. package/packages/grid/src/grid.ts +1768 -1768
  50. package/packages/grid/src/props.ts +23 -23
  51. package/packages/index.ts +4 -4
  52. package/packages/locale/lang/ar-EG.ts +832 -832
  53. package/packages/locale/lang/de-DE.ts +832 -832
  54. package/packages/locale/lang/en-US.ts +832 -832
  55. package/packages/locale/lang/es-ES.ts +832 -832
  56. package/packages/locale/lang/fr-FR.ts +832 -832
  57. package/packages/locale/lang/hu-HU.ts +832 -832
  58. package/packages/locale/lang/hy-AM.ts +832 -832
  59. package/packages/locale/lang/id-ID.ts +832 -832
  60. package/packages/locale/lang/it-IT.ts +832 -832
  61. package/packages/locale/lang/ja-JP.ts +832 -832
  62. package/packages/locale/lang/ko-KR.ts +832 -832
  63. package/packages/locale/lang/ms-MY.ts +832 -832
  64. package/packages/locale/lang/nb-NO.ts +832 -832
  65. package/packages/locale/lang/pt-BR.ts +832 -832
  66. package/packages/locale/lang/ru-RU.ts +832 -832
  67. package/packages/locale/lang/th-TH.ts +832 -832
  68. package/packages/locale/lang/ug-CN.ts +832 -832
  69. package/packages/locale/lang/uk-UA.ts +832 -832
  70. package/packages/locale/lang/uz-UZ.ts +832 -832
  71. package/packages/locale/lang/vi-VN.ts +832 -832
  72. package/packages/locale/lang/zh-CHT.ts +832 -832
  73. package/packages/locale/lang/zh-CN.ts +832 -832
  74. package/packages/locale/lang/zh-HK.ts +3 -3
  75. package/packages/locale/lang/zh-MO.ts +3 -3
  76. package/packages/locale/lang/zh-TC.ts +3 -3
  77. package/packages/locale/lang/zh-TW.ts +3 -3
  78. package/packages/table/index.ts +26 -26
  79. package/packages/table/module/custom/hook.ts +359 -359
  80. package/packages/table/module/custom/panel.ts +1331 -1331
  81. package/packages/table/module/edit/hook.ts +1032 -1032
  82. package/packages/table/module/export/export-panel.ts +567 -567
  83. package/packages/table/module/export/hook.ts +1654 -1654
  84. package/packages/table/module/export/import-panel.ts +266 -266
  85. package/packages/table/module/export/util.ts +24 -24
  86. package/packages/table/module/filter/hook.ts +468 -468
  87. package/packages/table/module/filter/panel.ts +301 -301
  88. package/packages/table/module/keyboard/hook.ts +495 -495
  89. package/packages/table/module/menu/hook.ts +325 -325
  90. package/packages/table/module/menu/panel.ts +201 -201
  91. package/packages/table/module/validator/hook.ts +631 -631
  92. package/packages/table/render/index.ts +1440 -1440
  93. package/packages/table/src/body.ts +932 -932
  94. package/packages/table/src/cell.ts +1290 -1290
  95. package/packages/table/src/column.ts +190 -190
  96. package/packages/table/src/columnInfo.ts +225 -225
  97. package/packages/table/src/emits.ts +123 -123
  98. package/packages/table/src/footer.ts +368 -368
  99. package/packages/table/src/group.ts +59 -59
  100. package/packages/table/src/header.ts +559 -559
  101. package/packages/table/src/props.ts +324 -324
  102. package/packages/table/src/store.ts +14 -14
  103. package/packages/table/src/table.ts +14004 -13947
  104. package/packages/table/src/use/cell-view.ts +44 -44
  105. package/packages/table/src/use/index.ts +1 -1
  106. package/packages/table/src/util.ts +1064 -1064
  107. package/packages/toolbar/index.ts +18 -18
  108. package/packages/toolbar/src/toolbar.ts +701 -701
  109. package/packages/ui/index.ts +530 -530
  110. package/packages/ui/src/anime.ts +52 -52
  111. package/packages/ui/src/comp.ts +3 -3
  112. package/packages/ui/src/dom.ts +236 -236
  113. package/packages/ui/src/log.ts +8 -8
  114. package/packages/ui/src/utils.ts +56 -56
  115. package/packages/ui/src/vn.ts +55 -55
  116. package/packages/v-x-e-table/index.d.ts +4 -4
  117. package/packages/v-x-e-table/index.ts +4 -4
  118. package/styles/all.scss +7 -7
  119. package/styles/base.scss +16 -16
  120. package/styles/components/grid.scss +89 -89
  121. package/styles/components/icon.scss +225 -225
  122. package/styles/components/old-icon.scss +715 -715
  123. package/styles/components/table-module/all.scss +6 -6
  124. package/styles/components/table-module/custom.scss +527 -527
  125. package/styles/components/table-module/export.scss +130 -130
  126. package/styles/components/table-module/filter.scss +130 -130
  127. package/styles/components/table-module/menu.scss +81 -81
  128. package/styles/components/table.scss +2679 -2679
  129. package/styles/components/toolbar.scss +119 -119
  130. package/styles/default.scss +2 -2
  131. package/styles/helpers/baseMixin.scss +95 -95
  132. package/styles/index.scss +4 -4
  133. package/styles/modules.scss +5 -5
  134. package/styles/theme/base.scss +93 -93
  135. package/styles/theme/dark.scss +49 -49
  136. package/styles/theme/light.scss +44 -44
  137. package/styles/variable.scss +43 -43
  138. package/types/all.d.ts +37 -37
  139. package/types/index.d.ts +4 -4
  140. /package/es/{iconfont.1773710736571.ttf → iconfont.1773991907408.ttf} +0 -0
  141. /package/es/{iconfont.1773710736571.woff → iconfont.1773991907408.woff} +0 -0
  142. /package/es/{iconfont.1773710736571.woff2 → iconfont.1773991907408.woff2} +0 -0
  143. /package/lib/{iconfont.1773710736571.ttf → iconfont.1773991907408.ttf} +0 -0
  144. /package/lib/{iconfont.1773710736571.woff → iconfont.1773991907408.woff} +0 -0
  145. /package/lib/{iconfont.1773710736571.woff2 → iconfont.1773991907408.woff2} +0 -0
@@ -1,56 +1,56 @@
1
- import XEUtils from 'xe-utils'
2
- import { VxeUI } from '@vxe-ui/core'
3
- import DomZIndex from 'dom-zindex'
4
-
5
- const { getConfig } = VxeUI
6
-
7
- export function isEnableConf (conf: any): boolean {
8
- return conf && conf.enabled !== false
9
- }
10
-
11
- export function isEmptyValue (cellValue: any) {
12
- return cellValue === null || cellValue === undefined || cellValue === ''
13
- }
14
-
15
- export function parseFile (file: File) {
16
- const name = file.name
17
- const tIndex = XEUtils.lastIndexOf(name, '.')
18
- const type = name.substring(tIndex + 1, name.length).toLowerCase()
19
- const filename = name.substring(0, tIndex)
20
- return { filename, type }
21
- }
22
-
23
- export function nextZIndex () {
24
- return DomZIndex.getNext()
25
- }
26
-
27
- export function getLastZIndex () {
28
- return DomZIndex.getCurrent()
29
- }
30
-
31
- export function hasChildrenList (item: any) {
32
- return item && item.children && item.children.length > 0
33
- }
34
-
35
- export function getFuncText (content?: string | number | boolean | null, args?: any) {
36
- if (XEUtils.eqNull(content)) {
37
- return ''
38
- }
39
- const translate = getConfig().translate
40
- return `${translate ? translate('' + content, args) : content}`
41
- }
42
-
43
- export function formatText (value: any, placeholder?: any) {
44
- return '' + (isEmptyValue(value) ? (placeholder ? getConfig().emptyCell : '') : value)
45
- }
46
-
47
- /**
48
- * 判断值为:'' | null | undefined 时都属于空值
49
- */
50
- export function eqEmptyValue (cellValue: any) {
51
- return cellValue === '' || XEUtils.eqNull(cellValue)
52
- }
53
-
54
- export function getDefaultConfig (val1: any, def1: any) {
55
- return XEUtils.eqNull(val1) ? def1 : val1
56
- }
1
+ import XEUtils from 'xe-utils'
2
+ import { VxeUI } from '@vxe-ui/core'
3
+ import DomZIndex from 'dom-zindex'
4
+
5
+ const { getConfig } = VxeUI
6
+
7
+ export function isEnableConf (conf: any): boolean {
8
+ return conf && conf.enabled !== false
9
+ }
10
+
11
+ export function isEmptyValue (cellValue: any) {
12
+ return cellValue === null || cellValue === undefined || cellValue === ''
13
+ }
14
+
15
+ export function parseFile (file: File) {
16
+ const name = file.name
17
+ const tIndex = XEUtils.lastIndexOf(name, '.')
18
+ const type = name.substring(tIndex + 1, name.length).toLowerCase()
19
+ const filename = name.substring(0, tIndex)
20
+ return { filename, type }
21
+ }
22
+
23
+ export function nextZIndex () {
24
+ return DomZIndex.getNext()
25
+ }
26
+
27
+ export function getLastZIndex () {
28
+ return DomZIndex.getCurrent()
29
+ }
30
+
31
+ export function hasChildrenList (item: any) {
32
+ return item && item.children && item.children.length > 0
33
+ }
34
+
35
+ export function getFuncText (content?: string | number | boolean | null, args?: any) {
36
+ if (XEUtils.eqNull(content)) {
37
+ return ''
38
+ }
39
+ const translate = getConfig().translate
40
+ return `${translate ? translate('' + content, args) : content}`
41
+ }
42
+
43
+ export function formatText (value: any, placeholder?: any) {
44
+ return '' + (isEmptyValue(value) ? (placeholder ? getConfig().emptyCell : '') : value)
45
+ }
46
+
47
+ /**
48
+ * 判断值为:'' | null | undefined 时都属于空值
49
+ */
50
+ export function eqEmptyValue (cellValue: any) {
51
+ return cellValue === '' || XEUtils.eqNull(cellValue)
52
+ }
53
+
54
+ export function getDefaultConfig (val1: any, def1: any) {
55
+ return XEUtils.eqNull(val1) ? def1 : val1
56
+ }
@@ -1,55 +1,55 @@
1
- import XEUtils from 'xe-utils'
2
-
3
- import type { VxeGlobalRendererHandles } from 'vxe-pc-ui'
4
- import type { VxeComponentSlotType } from '../../../types'
5
-
6
- export function getOnName (type: string) {
7
- return 'on' + type.substring(0, 1).toLocaleUpperCase() + type.substring(1)
8
- }
9
-
10
- export function getModelEvent (renderOpts: VxeGlobalRendererHandles.RenderOptions) {
11
- switch (renderOpts.name) {
12
- case 'input':
13
- case 'textarea':
14
- return 'input'
15
- case 'select':
16
- return 'change'
17
- }
18
- return 'update:modelValue'
19
- }
20
-
21
- export function getChangeEvent (renderOpts: VxeGlobalRendererHandles.RenderOptions) {
22
- switch (renderOpts.name) {
23
- case 'input':
24
- case 'textarea':
25
- case 'VxeInput':
26
- case 'VxeNumberInput':
27
- case 'VxeTextarea':
28
- case '$input':
29
- case '$textarea':
30
- return 'input'
31
- }
32
- return 'change'
33
- }
34
-
35
- export function hasInputType (renderOpts: VxeGlobalRendererHandles.RenderOptions) {
36
- switch (renderOpts.name) {
37
- case 'VxeInput':
38
- case 'VxeNumberInput':
39
- case 'VxeTextarea':
40
- case '$input':
41
- case '$textarea':
42
- return true
43
- }
44
- return false
45
- }
46
-
47
- export function getSlotVNs (vns: VxeComponentSlotType | VxeComponentSlotType[]) {
48
- if (vns === null || vns === undefined) {
49
- return []
50
- }
51
- if (XEUtils.isArray(vns)) {
52
- return vns
53
- }
54
- return [vns]
55
- }
1
+ import XEUtils from 'xe-utils'
2
+
3
+ import type { VxeGlobalRendererHandles } from 'vxe-pc-ui'
4
+ import type { VxeComponentSlotType } from '../../../types'
5
+
6
+ export function getOnName (type: string) {
7
+ return 'on' + type.substring(0, 1).toLocaleUpperCase() + type.substring(1)
8
+ }
9
+
10
+ export function getModelEvent (renderOpts: VxeGlobalRendererHandles.RenderOptions) {
11
+ switch (renderOpts.name) {
12
+ case 'input':
13
+ case 'textarea':
14
+ return 'input'
15
+ case 'select':
16
+ return 'change'
17
+ }
18
+ return 'update:modelValue'
19
+ }
20
+
21
+ export function getChangeEvent (renderOpts: VxeGlobalRendererHandles.RenderOptions) {
22
+ switch (renderOpts.name) {
23
+ case 'input':
24
+ case 'textarea':
25
+ case 'VxeInput':
26
+ case 'VxeNumberInput':
27
+ case 'VxeTextarea':
28
+ case '$input':
29
+ case '$textarea':
30
+ return 'input'
31
+ }
32
+ return 'change'
33
+ }
34
+
35
+ export function hasInputType (renderOpts: VxeGlobalRendererHandles.RenderOptions) {
36
+ switch (renderOpts.name) {
37
+ case 'VxeInput':
38
+ case 'VxeNumberInput':
39
+ case 'VxeTextarea':
40
+ case '$input':
41
+ case '$textarea':
42
+ return true
43
+ }
44
+ return false
45
+ }
46
+
47
+ export function getSlotVNs (vns: VxeComponentSlotType | VxeComponentSlotType[]) {
48
+ if (vns === null || vns === undefined) {
49
+ return []
50
+ }
51
+ if (XEUtils.isArray(vns)) {
52
+ return vns
53
+ }
54
+ return [vns]
55
+ }
@@ -1,4 +1,4 @@
1
- import VxeUI from '../ui'
2
-
3
- export * from '../ui'
4
- export default VxeUI
1
+ import VxeUI from '../ui'
2
+
3
+ export * from '../ui'
4
+ export default VxeUI
@@ -1,4 +1,4 @@
1
- import VxeUI from '../ui'
2
-
3
- export * from '../ui'
4
- export default VxeUI
1
+ import VxeUI from '../ui'
2
+
3
+ export * from '../ui'
4
+ export default VxeUI
package/styles/all.scss CHANGED
@@ -1,7 +1,7 @@
1
- @use './base.scss';
2
-
3
- @use './components/column.scss';
4
- @use './components/colgroup.scss';
5
- @use './components/table.scss';
6
- @use './components/grid.scss';
7
- @use './components/toolbar.scss';
1
+ @use './base.scss';
2
+
3
+ @use './components/column.scss';
4
+ @use './components/colgroup.scss';
5
+ @use './components/table.scss';
6
+ @use './components/grid.scss';
7
+ @use './components/toolbar.scss';
package/styles/base.scss CHANGED
@@ -1,16 +1,16 @@
1
- @use './theme/light.scss';
2
- @use './theme/dark.scss';
3
-
4
- %boxSizing {
5
- box-sizing: border-box;
6
- }
7
-
8
- [class*="vxe-"] {
9
- font-variant: tabular-nums;
10
- font-feature-settings: 'tnum';
11
- @extend %boxSizing;
12
- &:after, &:before,
13
- *:after, *:before {
14
- @extend %boxSizing;
15
- }
16
- }
1
+ @use './theme/light.scss';
2
+ @use './theme/dark.scss';
3
+
4
+ %boxSizing {
5
+ box-sizing: border-box;
6
+ }
7
+
8
+ [class*="vxe-"] {
9
+ font-variant: tabular-nums;
10
+ font-feature-settings: 'tnum';
11
+ @extend %boxSizing;
12
+ &:after, &:before,
13
+ *:after, *:before {
14
+ @extend %boxSizing;
15
+ }
16
+ }
@@ -1,89 +1,89 @@
1
- .vxe-grid {
2
- position: relative;
3
- display: flex;
4
- flex-direction: column;
5
- &.is--loading {
6
- &:before {
7
- content: "";
8
- position: absolute;
9
- top: 0;
10
- left: 0;
11
- width: 100%;
12
- height: 100%;
13
- z-index: 99;
14
- user-select: none;
15
- background-color: var(--vxe-ui-loading-background-color);
16
- }
17
- & > .vxe-table {
18
- .vxe-loading {
19
- background-color: transparent;
20
- }
21
- }
22
- }
23
- &.is--maximize {
24
- position: fixed;
25
- top: 0;
26
- left: 0;
27
- width: 100%;
28
- height: 100%;
29
- padding: 0.5em 1em;
30
- background-color: var(--vxe-ui-layout-background-color);
31
- }
32
- .vxe-grid--form-wrapper,
33
- .vxe-grid--top-wrapper,
34
- .vxe-grid--bottom-wrapper {
35
- position: relative;
36
- }
37
- .vxe-grid--table-container {
38
- display: flex;
39
- flex-direction: row;
40
- flex-grow: 1;
41
- overflow: hidden;
42
- }
43
- .vxe-grid--left-wrapper,
44
- .vxe-grid--right-wrapper {
45
- flex-shrink: 0;
46
- overflow: auto;
47
- outline: 0;
48
- }
49
- .vxe-grid--table-wrapper {
50
- flex-grow: 1;
51
- overflow: hidden;
52
- }
53
- }
54
-
55
- .vxe-grid--layout-body-wrapper {
56
- display: flex;
57
- flex-direction: row;
58
- overflow: auto;
59
- flex-grow: 1;
60
- }
61
- .vxe-grid--layout-body-content-wrapper {
62
- display: flex;
63
- flex-direction: column;
64
- flex-grow: 1;
65
- overflow: auto;
66
- }
67
- .vxe-grid--layout-header-wrapper,
68
- .vxe-grid--layout-footer-wrapper,
69
- .vxe-grid--layout-aside-left-wrapper,
70
- .vxe-grid--layout-aside-left-wrapper {
71
- flex-shrink: 0;
72
- }
73
- .vxe-grid--layout-aside-left-wrapper,
74
- .vxe-grid--layout-aside-left-wrapper {
75
- overflow: auto;
76
- }
77
-
78
- .vxe-grid {
79
- font-size: var(--vxe-ui-font-size-default);
80
- &.size--medium {
81
- font-size: var(--vxe-ui-font-size-medium);
82
- }
83
- &.size--small {
84
- font-size: var(--vxe-ui-font-size-small);
85
- }
86
- &.size--mini {
87
- font-size: var(--vxe-ui-font-size-mini);
88
- }
89
- }
1
+ .vxe-grid {
2
+ position: relative;
3
+ display: flex;
4
+ flex-direction: column;
5
+ &.is--loading {
6
+ &:before {
7
+ content: "";
8
+ position: absolute;
9
+ top: 0;
10
+ left: 0;
11
+ width: 100%;
12
+ height: 100%;
13
+ z-index: 99;
14
+ user-select: none;
15
+ background-color: var(--vxe-ui-loading-background-color);
16
+ }
17
+ & > .vxe-table {
18
+ .vxe-loading {
19
+ background-color: transparent;
20
+ }
21
+ }
22
+ }
23
+ &.is--maximize {
24
+ position: fixed;
25
+ top: 0;
26
+ left: 0;
27
+ width: 100%;
28
+ height: 100%;
29
+ padding: 0.5em 1em;
30
+ background-color: var(--vxe-ui-layout-background-color);
31
+ }
32
+ .vxe-grid--form-wrapper,
33
+ .vxe-grid--top-wrapper,
34
+ .vxe-grid--bottom-wrapper {
35
+ position: relative;
36
+ }
37
+ .vxe-grid--table-container {
38
+ display: flex;
39
+ flex-direction: row;
40
+ flex-grow: 1;
41
+ overflow: hidden;
42
+ }
43
+ .vxe-grid--left-wrapper,
44
+ .vxe-grid--right-wrapper {
45
+ flex-shrink: 0;
46
+ overflow: auto;
47
+ outline: 0;
48
+ }
49
+ .vxe-grid--table-wrapper {
50
+ flex-grow: 1;
51
+ overflow: hidden;
52
+ }
53
+ }
54
+
55
+ .vxe-grid--layout-body-wrapper {
56
+ display: flex;
57
+ flex-direction: row;
58
+ overflow: auto;
59
+ flex-grow: 1;
60
+ }
61
+ .vxe-grid--layout-body-content-wrapper {
62
+ display: flex;
63
+ flex-direction: column;
64
+ flex-grow: 1;
65
+ overflow: auto;
66
+ }
67
+ .vxe-grid--layout-header-wrapper,
68
+ .vxe-grid--layout-footer-wrapper,
69
+ .vxe-grid--layout-aside-left-wrapper,
70
+ .vxe-grid--layout-aside-left-wrapper {
71
+ flex-shrink: 0;
72
+ }
73
+ .vxe-grid--layout-aside-left-wrapper,
74
+ .vxe-grid--layout-aside-left-wrapper {
75
+ overflow: auto;
76
+ }
77
+
78
+ .vxe-grid {
79
+ font-size: var(--vxe-ui-font-size-default);
80
+ &.size--medium {
81
+ font-size: var(--vxe-ui-font-size-medium);
82
+ }
83
+ &.size--small {
84
+ font-size: var(--vxe-ui-font-size-small);
85
+ }
86
+ &.size--mini {
87
+ font-size: var(--vxe-ui-font-size-mini);
88
+ }
89
+ }