vxe-table 4.23.8 → 4.23.9

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 (126) hide show
  1. package/dist/all.esm.js +5715 -3783
  2. package/es/components.d.ts +1 -0
  3. package/es/components.js +2 -7
  4. package/es/grid/src/emits.js +1 -15
  5. package/es/grid/src/grid.js +397 -120
  6. package/es/index.esm.js +1 -0
  7. package/es/index.js +1 -0
  8. package/es/table/module/custom/hook.js +49 -42
  9. package/es/table/module/custom/panel.js +777 -527
  10. package/es/table/module/edit/hook.js +140 -62
  11. package/es/table/module/export/export-panel.js +399 -316
  12. package/es/table/module/export/hook.js +395 -337
  13. package/es/table/module/export/import-panel.js +152 -123
  14. package/es/table/module/filter/hook.js +16 -2
  15. package/es/table/module/filter/panel.js +146 -84
  16. package/es/table/module/keyboard/hook.js +8 -4
  17. package/es/table/module/menu/panel.js +197 -126
  18. package/es/table/render/index.js +151 -98
  19. package/es/table/src/body.js +355 -233
  20. package/es/table/src/cell.js +426 -269
  21. package/es/table/src/columnInfo.js +1 -0
  22. package/es/table/src/footer.js +144 -99
  23. package/es/table/src/group.js +7 -3
  24. package/es/table/src/header.js +229 -172
  25. package/es/table/src/table.js +1503 -1030
  26. package/es/table/src/util.js +15 -19
  27. package/es/toolbar/src/toolbar.js +132 -75
  28. package/es/ui/index.js +1 -1
  29. package/es/ui/src/dom.js +9 -6
  30. package/es/ui/src/log.js +1 -1
  31. package/es/ui/src/utils.d.ts +1 -1
  32. package/lib/components.js +2 -7
  33. package/lib/grid/src/emits.js +1 -15
  34. package/lib/grid/src/grid.js +397 -120
  35. package/lib/index.common.js +1 -0
  36. package/lib/index.js +1 -0
  37. package/lib/index.umd.js +5732 -3800
  38. package/lib/index.umd.min.js +3 -3
  39. package/lib/table/module/custom/hook.js +49 -42
  40. package/lib/table/module/custom/panel.js +777 -527
  41. package/lib/table/module/edit/hook.js +140 -62
  42. package/lib/table/module/export/export-panel.js +399 -316
  43. package/lib/table/module/export/hook.js +395 -337
  44. package/lib/table/module/export/import-panel.js +152 -123
  45. package/lib/table/module/filter/hook.js +16 -2
  46. package/lib/table/module/filter/panel.js +146 -84
  47. package/lib/table/module/keyboard/hook.js +8 -4
  48. package/lib/table/module/menu/panel.js +197 -126
  49. package/lib/table/render/index.js +151 -98
  50. package/lib/table/src/body.js +355 -233
  51. package/lib/table/src/cell.js +426 -269
  52. package/lib/table/src/columnInfo.js +1 -0
  53. package/lib/table/src/footer.js +144 -99
  54. package/lib/table/src/group.js +7 -3
  55. package/lib/table/src/header.js +229 -172
  56. package/lib/table/src/table.js +1471 -1029
  57. package/lib/table/src/util.js +15 -19
  58. package/lib/toolbar/src/toolbar.js +132 -75
  59. package/lib/ui/index.js +1 -1
  60. package/lib/ui/src/dom.js +9 -6
  61. package/lib/ui/src/log.js +1 -1
  62. package/package.json +2 -2
  63. package/packages/colgroup/index.ts +22 -22
  64. package/packages/column/index.ts +22 -22
  65. package/packages/components.ts +41 -44
  66. package/packages/grid/index.ts +18 -18
  67. package/packages/grid/src/emits.ts +5 -19
  68. package/packages/grid/src/grid.ts +2229 -1925
  69. package/packages/grid/src/props.ts +22 -23
  70. package/packages/index.ts +11 -11
  71. package/packages/locale/lang/fr-FR.ts +15 -15
  72. package/packages/locale/lang/it-IT.ts +4 -4
  73. package/packages/locale/lang/uk-UA.ts +1 -1
  74. package/packages/locale/lang/uz-UZ.ts +13 -13
  75. package/packages/locale/lang/zh-CN.ts +907 -907
  76. package/packages/table/index.ts +26 -26
  77. package/packages/table/module/custom/hook.ts +510 -503
  78. package/packages/table/module/custom/panel.ts +2002 -1743
  79. package/packages/table/module/edit/hook.ts +1224 -1131
  80. package/packages/table/module/export/export-panel.ts +697 -611
  81. package/packages/table/module/export/hook.ts +2160 -2059
  82. package/packages/table/module/export/import-panel.ts +319 -279
  83. package/packages/table/module/export/util.ts +25 -24
  84. package/packages/table/module/filter/hook.ts +519 -501
  85. package/packages/table/module/filter/panel.ts +368 -304
  86. package/packages/table/module/keyboard/hook.ts +498 -494
  87. package/packages/table/module/menu/hook.ts +330 -330
  88. package/packages/table/module/menu/panel.ts +272 -201
  89. package/packages/table/module/validator/hook.ts +653 -635
  90. package/packages/table/render/index.ts +1819 -1744
  91. package/packages/table/src/body.ts +1078 -955
  92. package/packages/table/src/cell.ts +1524 -1359
  93. package/packages/table/src/column.ts +192 -192
  94. package/packages/table/src/columnInfo.ts +232 -232
  95. package/packages/table/src/emits.ts +134 -134
  96. package/packages/table/src/footer.ts +425 -380
  97. package/packages/table/src/group.ts +67 -63
  98. package/packages/table/src/header.ts +642 -581
  99. package/packages/table/src/props.ts +336 -336
  100. package/packages/table/src/store.ts +14 -14
  101. package/packages/table/src/table.ts +16011 -15454
  102. package/packages/table/src/use/cell-view.ts +41 -44
  103. package/packages/table/src/use/index.ts +1 -1
  104. package/packages/table/src/util.ts +1206 -1216
  105. package/packages/toolbar/index.ts +18 -18
  106. package/packages/toolbar/src/toolbar.ts +768 -706
  107. package/packages/ui/index.ts +519 -520
  108. package/packages/ui/src/anime.ts +51 -52
  109. package/packages/ui/src/comp.ts +3 -3
  110. package/packages/ui/src/dom.ts +466 -463
  111. package/packages/ui/src/log.ts +19 -19
  112. package/packages/ui/src/utils.ts +66 -66
  113. package/packages/ui/src/vn.ts +55 -55
  114. package/packages/v-x-e-table/index.d.ts +3 -3
  115. package/packages/v-x-e-table/index.ts +3 -3
  116. package/types/all.d.ts +76 -76
  117. package/types/index.d.ts +4 -4
  118. /package/dist/{iconfont.1793007753347.ttf → iconfont.1793009263429.ttf} +0 -0
  119. /package/dist/{iconfont.1793007753347.woff → iconfont.1793009263429.woff} +0 -0
  120. /package/dist/{iconfont.1793007753347.woff2 → iconfont.1793009263429.woff2} +0 -0
  121. /package/es/{iconfont.1793007753347.ttf → iconfont.1793009263429.ttf} +0 -0
  122. /package/es/{iconfont.1793007753347.woff → iconfont.1793009263429.woff} +0 -0
  123. /package/es/{iconfont.1793007753347.woff2 → iconfont.1793009263429.woff2} +0 -0
  124. /package/lib/{iconfont.1793007753347.ttf → iconfont.1793009263429.ttf} +0 -0
  125. /package/lib/{iconfont.1793007753347.woff → iconfont.1793009263429.woff} +0 -0
  126. /package/lib/{iconfont.1793007753347.woff2 → iconfont.1793009263429.woff2} +0 -0
@@ -1,19 +1,19 @@
1
- import { VxeUI } from '@vxe-ui/core'
2
-
3
- const { log } = VxeUI
4
-
5
- const tableVersion = `table v${process.env.VUE_APP_VXE_VERSION}`
6
-
7
- export function createComponentLog (name: string) {
8
- const uiVersion = VxeUI.uiVersion ? `ui v${VxeUI.uiVersion}` : ''
9
- const ganttVersion = VxeUI.ganttVersion ? `gantt v${VxeUI.ganttVersion}` : ''
10
- const designVersion = VxeUI.designVersion ? `design v${VxeUI.designVersion}` : ''
11
- const versionInfo = [uiVersion, tableVersion, ganttVersion, designVersion].filter(v => v).join(' ')
12
- return {
13
- warnLog: log.create('warn', versionInfo + '] [' + name),
14
- errLog: log.create('error', versionInfo + '] [' + name)
15
- }
16
- }
17
-
18
- export const warnLog = log.create('warn', tableVersion)
19
- export const errLog = log.create('error', tableVersion)
1
+ import { VxeUI } from '@vxe-ui/core'
2
+
3
+ const { log } = VxeUI
4
+
5
+ const tableVersion = `table v${process.env.VUE_APP_VXE_VERSION}`
6
+
7
+ export function createComponentLog(name: string) {
8
+ const uiVersion = VxeUI.uiVersion ? `ui v${VxeUI.uiVersion}` : ''
9
+ const ganttVersion = VxeUI.ganttVersion ? `gantt v${VxeUI.ganttVersion}` : ''
10
+ const designVersion = VxeUI.designVersion ? `design v${VxeUI.designVersion}` : ''
11
+ const versionInfo = [uiVersion, tableVersion, ganttVersion, designVersion].filter((v) => v).join(' ')
12
+ return {
13
+ warnLog: log.create('warn', versionInfo + '] [' + name),
14
+ errLog: log.create('error', versionInfo + '] [' + name)
15
+ }
16
+ }
17
+
18
+ export const warnLog = log.create('warn', tableVersion)
19
+ export const errLog = log.create('error', tableVersion)
@@ -1,66 +1,66 @@
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
- /**
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
-
21
- export function isEmptyValue (cellValue: any) {
22
- return cellValue === null || cellValue === undefined || cellValue === ''
23
- }
24
-
25
- export function parseFile (file: File) {
26
- const name = file.name
27
- const tIndex = XEUtils.lastIndexOf(name, '.')
28
- const type = name.substring(tIndex + 1, name.length).toLowerCase()
29
- const filename = name.substring(0, tIndex)
30
- return { filename, type }
31
- }
32
-
33
- export function nextZIndex () {
34
- return DomZIndex.getNext()
35
- }
36
-
37
- export function getLastZIndex () {
38
- return DomZIndex.getCurrent()
39
- }
40
-
41
- export function hasChildrenList (item: any) {
42
- return item && item.children && item.children.length > 0
43
- }
44
-
45
- export function getFuncText (content?: string | number | boolean | null, args?: any) {
46
- if (XEUtils.eqNull(content)) {
47
- return ''
48
- }
49
- const translate = getConfig().translate
50
- return `${translate ? translate('' + content, args) : content}`
51
- }
52
-
53
- export function formatText (value: any, placeholder?: any) {
54
- return '' + (isEmptyValue(value) ? (placeholder ? getConfig().emptyCell : '') : value)
55
- }
56
-
57
- /**
58
- * 判断值为:'' | null | undefined 时都属于空值
59
- */
60
- export function eqEmptyValue (cellValue: any) {
61
- return cellValue === '' || XEUtils.eqNull(cellValue)
62
- }
63
-
64
- export function getDefaultConfig <T = any, D = any> (val1: T, def1: D): (T | D) {
65
- return XEUtils.eqNull(val1) ? def1 : val1
66
- }
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
+ /**
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
+
21
+ export function isEmptyValue(cellValue: any) {
22
+ return cellValue === null || cellValue === undefined || cellValue === ''
23
+ }
24
+
25
+ export function parseFile(file: File) {
26
+ const name = file.name
27
+ const tIndex = XEUtils.lastIndexOf(name, '.')
28
+ const type = name.substring(tIndex + 1, name.length).toLowerCase()
29
+ const filename = name.substring(0, tIndex)
30
+ return { filename, type }
31
+ }
32
+
33
+ export function nextZIndex() {
34
+ return DomZIndex.getNext()
35
+ }
36
+
37
+ export function getLastZIndex() {
38
+ return DomZIndex.getCurrent()
39
+ }
40
+
41
+ export function hasChildrenList(item: any) {
42
+ return item && item.children && item.children.length > 0
43
+ }
44
+
45
+ export function getFuncText(content?: string | number | boolean | null, args?: any) {
46
+ if (XEUtils.eqNull(content)) {
47
+ return ''
48
+ }
49
+ const translate = getConfig().translate
50
+ return `${translate ? translate('' + content, args) : content}`
51
+ }
52
+
53
+ export function formatText(value: any, placeholder?: any) {
54
+ return '' + (isEmptyValue(value) ? (placeholder ? getConfig().emptyCell : '') : value)
55
+ }
56
+
57
+ /**
58
+ * 判断值为:'' | null | undefined 时都属于空值
59
+ */
60
+ export function eqEmptyValue(cellValue: any) {
61
+ return cellValue === '' || XEUtils.eqNull(cellValue)
62
+ }
63
+
64
+ export function getDefaultConfig<T = any, D = any>(val1: T, def1: D): T | D {
65
+ return XEUtils.eqNull(val1) ? def1 : val1
66
+ }
@@ -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,3 +1,3 @@
1
- import VxeUI from '../ui'
2
-
3
- export default VxeUI
1
+ import VxeUI from '../ui'
2
+
3
+ export default VxeUI
@@ -1,3 +1,3 @@
1
- import VxeUI from '../ui'
2
-
3
- export default VxeUI
1
+ import VxeUI from '../ui'
2
+
3
+ export default VxeUI
package/types/all.d.ts CHANGED
@@ -1,76 +1,76 @@
1
- import { App } from 'vue'
2
- import { VxeUIExport, VxeGlobalConfig, VxeComponentKebabCaseKeys } from 'vxe-pc-ui'
3
-
4
- // Vxe Table
5
- import VxeColumn from 'vxe-pc-ui/types/components/column'
6
- import VxeColgroup from 'vxe-pc-ui/types/components/colgroup'
7
- import VxeTable from 'vxe-pc-ui/types/components/table'
8
- import VxeGrid from 'vxe-pc-ui/types/components/grid'
9
- import VxeToolbar from 'vxe-pc-ui/types/components/toolbar'
10
-
11
- declare global {
12
- interface Window {
13
- VxeUITable: VxeUIExport
14
-
15
- /**
16
- * @deprecated
17
- */
18
- VXETable: VxeUIExport
19
- }
20
- }
21
-
22
- /**
23
- * 已废弃,请使用 VxeUI
24
- * @deprecated
25
- */
26
- export const VXETable: VxeUIExport
27
-
28
- /**
29
- * 已废弃,请使用 VxeUIExport
30
- * @deprecated
31
- */
32
- export type VXETableCore = VxeUIExport
33
-
34
- export function install (app: App, options?: VxeGlobalConfig): void
35
-
36
- interface AllComponents {
37
- // Vxe Table
38
- /**
39
- * Column 基础表格 - 列
40
- */
41
- VxeColumn: typeof VxeColumn
42
- /**
43
- * Colgroup 基础表格 - 分组列
44
- */
45
- VxeColgroup: typeof VxeColgroup
46
- /**
47
- * Table 基础表格
48
- */
49
- VxeTable: typeof VxeTable
50
- /**
51
- * Grid 高级表格
52
- */
53
- VxeGrid: typeof VxeGrid
54
- /**
55
- * Toolbar 基础表格 - 工具栏
56
- */
57
- VxeToolbar: typeof VxeToolbar
58
- }
59
-
60
- declare module '@vue/runtime-core' {
61
- export interface GlobalComponents extends AllComponents {}
62
- }
63
-
64
- declare module '@vxe-ui/core' {
65
- export interface VxeGlobalComponents extends AllComponents, VxeComponentKebabCaseKeys<AllComponents> {}
66
- }
67
-
68
- // Vxe core
69
- export * from 'vxe-pc-ui/types/ui'
70
-
71
- // Vxe Table
72
- export * from 'vxe-pc-ui/types/components/column'
73
- export * from 'vxe-pc-ui/types/components/colgroup'
74
- export * from 'vxe-pc-ui/types/components/table'
75
- export * from 'vxe-pc-ui/types/components/grid'
76
- export * from 'vxe-pc-ui/types/components/toolbar'
1
+ import { App } from 'vue'
2
+ import { VxeUIExport, VxeGlobalConfig, VxeComponentKebabCaseKeys } from 'vxe-pc-ui'
3
+
4
+ // Vxe Table
5
+ import VxeColumn from 'vxe-pc-ui/types/components/column'
6
+ import VxeColgroup from 'vxe-pc-ui/types/components/colgroup'
7
+ import VxeTable from 'vxe-pc-ui/types/components/table'
8
+ import VxeGrid from 'vxe-pc-ui/types/components/grid'
9
+ import VxeToolbar from 'vxe-pc-ui/types/components/toolbar'
10
+
11
+ declare global {
12
+ interface Window {
13
+ VxeUITable: VxeUIExport
14
+
15
+ /**
16
+ * @deprecated
17
+ */
18
+ VXETable: VxeUIExport
19
+ }
20
+ }
21
+
22
+ /**
23
+ * 已废弃,请使用 VxeUI
24
+ * @deprecated
25
+ */
26
+ export const VXETable: VxeUIExport
27
+
28
+ /**
29
+ * 已废弃,请使用 VxeUIExport
30
+ * @deprecated
31
+ */
32
+ export type VXETableCore = VxeUIExport
33
+
34
+ export function install(app: App, options?: VxeGlobalConfig): void
35
+
36
+ interface AllComponents {
37
+ // Vxe Table
38
+ /**
39
+ * Column 基础表格 - 列
40
+ */
41
+ VxeColumn: typeof VxeColumn
42
+ /**
43
+ * Colgroup 基础表格 - 分组列
44
+ */
45
+ VxeColgroup: typeof VxeColgroup
46
+ /**
47
+ * Table 基础表格
48
+ */
49
+ VxeTable: typeof VxeTable
50
+ /**
51
+ * Grid 高级表格
52
+ */
53
+ VxeGrid: typeof VxeGrid
54
+ /**
55
+ * Toolbar 基础表格 - 工具栏
56
+ */
57
+ VxeToolbar: typeof VxeToolbar
58
+ }
59
+
60
+ declare module '@vue/runtime-core' {
61
+ export interface GlobalComponents extends AllComponents {}
62
+ }
63
+
64
+ declare module '@vxe-ui/core' {
65
+ export interface VxeGlobalComponents extends AllComponents, VxeComponentKebabCaseKeys<AllComponents> {}
66
+ }
67
+
68
+ // Vxe core
69
+ export * from 'vxe-pc-ui/types/ui'
70
+
71
+ // Vxe Table
72
+ export * from 'vxe-pc-ui/types/components/column'
73
+ export * from 'vxe-pc-ui/types/components/colgroup'
74
+ export * from 'vxe-pc-ui/types/components/table'
75
+ export * from 'vxe-pc-ui/types/components/grid'
76
+ export * from 'vxe-pc-ui/types/components/toolbar'
package/types/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import * as VxeUITable from './all'
2
-
3
- export * from './all'
4
- export default VxeUITable
1
+ import * as VxeUITable from './all'
2
+
3
+ export * from './all'
4
+ export default VxeUITable