vxe-table 4.7.70 → 4.7.72

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 (42) hide show
  1. package/es/style.css +1 -1
  2. package/es/style.min.css +1 -1
  3. package/es/table/module/custom/panel.js +29 -14
  4. package/es/table/module/export/export-panel.js +13 -4
  5. package/es/table/module/menu/panel.js +41 -12
  6. package/es/table/style.css +9 -26
  7. package/es/table/style.min.css +1 -1
  8. package/es/ui/index.js +3 -2
  9. package/es/ui/src/log.js +1 -1
  10. package/es/vxe-table/style.css +9 -26
  11. package/es/vxe-table/style.min.css +1 -1
  12. package/lib/index.umd.js +59 -22
  13. package/lib/index.umd.min.js +1 -1
  14. package/lib/style.css +1 -1
  15. package/lib/style.min.css +1 -1
  16. package/lib/table/module/custom/panel.js +20 -9
  17. package/lib/table/module/custom/panel.min.js +1 -1
  18. package/lib/table/module/export/export-panel.js +9 -2
  19. package/lib/table/module/export/export-panel.min.js +1 -1
  20. package/lib/table/module/menu/panel.js +26 -8
  21. package/lib/table/module/menu/panel.min.js +1 -1
  22. package/lib/table/style/style.css +9 -26
  23. package/lib/table/style/style.min.css +1 -1
  24. package/lib/ui/index.js +3 -2
  25. package/lib/ui/index.min.js +1 -1
  26. package/lib/ui/src/log.js +1 -1
  27. package/lib/ui/src/log.min.js +1 -1
  28. package/lib/vxe-table/style/style.css +9 -26
  29. package/lib/vxe-table/style/style.min.css +1 -1
  30. package/package.json +2 -2
  31. package/packages/table/module/custom/panel.ts +29 -14
  32. package/packages/table/module/export/export-panel.ts +13 -4
  33. package/packages/table/module/menu/panel.ts +42 -12
  34. package/packages/ui/index.ts +1 -0
  35. package/styles/components/table-module/menu.scss +9 -27
  36. package/styles/theme/base.scss +1 -1
  37. /package/es/{iconfont.1724578101191.ttf → iconfont.1724722752271.ttf} +0 -0
  38. /package/es/{iconfont.1724578101191.woff → iconfont.1724722752271.woff} +0 -0
  39. /package/es/{iconfont.1724578101191.woff2 → iconfont.1724722752271.woff2} +0 -0
  40. /package/lib/{iconfont.1724578101191.ttf → iconfont.1724722752271.ttf} +0 -0
  41. /package/lib/{iconfont.1724578101191.woff → iconfont.1724722752271.woff} +0 -0
  42. /package/lib/{iconfont.1724578101191.woff2 → iconfont.1724722752271.woff2} +0 -0
@@ -1,9 +1,12 @@
1
1
  import { defineComponent, h, Teleport, inject, ref, Ref, createCommentVNode } from 'vue'
2
+ import { VxeUI } from '../../../ui'
2
3
  import { getFuncText } from '../../../ui/src/utils'
3
4
  import XEUtils from 'xe-utils'
4
5
 
5
6
  import type { VxeTablePrivateMethods, VxeTableConstructor, VxeTableMethods } from '../../../../types'
6
7
 
8
+ const { getIcon } = VxeUI
9
+
7
10
  export default defineComponent({
8
11
  name: 'VxeTableMenuPanel',
9
12
  setup (props, context) {
@@ -49,6 +52,8 @@ export default defineComponent({
49
52
  key: gIndex
50
53
  }, options.map((item, index) => {
51
54
  const hasChildMenus = item.children && item.children.some((child: any) => child.visible !== false)
55
+ const prefixOpts = Object.assign({}, item.prefixConfig)
56
+ const suffixOpts = Object.assign({}, item.suffixConfig)
52
57
  return item.visible === false
53
58
  ? null
54
59
  : h('li', {
@@ -70,15 +75,25 @@ export default defineComponent({
70
75
  $xeTable.ctxMenuMouseoutEvent(evnt, item)
71
76
  }
72
77
  }, [
73
- h('i', {
74
- class: ['vxe-context-menu--link-prefix', item.prefixIcon]
75
- }),
76
- h('span', {
78
+ h('div', {
79
+ class: ['vxe-context-menu--link-prefix', prefixOpts.className || '']
80
+ }, [
81
+ h('i', {
82
+ class: prefixOpts.icon || item.prefixIcon
83
+ }),
84
+ prefixOpts.content ? h('span', {}, `${prefixOpts.content}`) : createCommentVNode()
85
+ ]),
86
+ h('div', {
77
87
  class: 'vxe-context-menu--link-content'
78
88
  }, getFuncText(item.name)),
79
- h('i', {
80
- class: ['vxe-context-menu--link-suffix', hasChildMenus ? item.suffixIcon || 'suffix--haschild' : item.suffixIcon]
81
- })
89
+ h('div', {
90
+ class: ['vxe-context-menu--link-suffix', suffixOpts.className || '']
91
+ }, [
92
+ h('i', {
93
+ class: (suffixOpts.icon || item.suffixIcon) || (hasChildMenus ? getIcon().TABLE_MENU_OPTIONS : '')
94
+ }),
95
+ suffixOpts.content ? h('span', `${suffixOpts.content}`) : createCommentVNode()
96
+ ])
82
97
  ]),
83
98
  hasChildMenus
84
99
  ? h('ul', {
@@ -86,6 +101,8 @@ export default defineComponent({
86
101
  'is--show': item === ctxMenuStore.selected && ctxMenuStore.showChild
87
102
  }]
88
103
  }, item.children.map((child: any, cIndex: any) => {
104
+ const childPrefixOpts = Object.assign({}, child.prefixConfig)
105
+ const childSuffixOpts = Object.assign({}, child.suffixConfig)
89
106
  return child.visible === false
90
107
  ? null
91
108
  : h('li', {
@@ -107,12 +124,25 @@ export default defineComponent({
107
124
  $xeTable.ctxMenuMouseoutEvent(evnt, item)
108
125
  }
109
126
  }, [
110
- h('i', {
111
- class: ['vxe-context-menu--link-prefix', child.prefixIcon]
112
- }),
113
- h('span', {
127
+ h('div', {
128
+ class: ['vxe-context-menu--link-prefix', childPrefixOpts.className || '']
129
+ }, [
130
+ h('i', {
131
+ class: childPrefixOpts.icon || child.prefixIcon
132
+ }),
133
+ childPrefixOpts.content ? h('span', `${childPrefixOpts.content}`) : createCommentVNode()
134
+ ]),
135
+ h('div', {
114
136
  class: 'vxe-context-menu--link-content'
115
- }, getFuncText(child.name))
137
+ }, getFuncText(child.name)),
138
+ h('div', {
139
+ class: ['vxe-context-menu--link-suffix', childSuffixOpts.className || '']
140
+ }, [
141
+ h('i', {
142
+ class: childSuffixOpts.icon
143
+ }),
144
+ childSuffixOpts.content ? h('span', `${childSuffixOpts.content}`) : createCommentVNode()
145
+ ])
116
146
  ])
117
147
  ])
118
148
  }))
@@ -233,6 +233,7 @@ VxeUI.setIcon({
233
233
  TABLE_RADIO_CHECKED: iconPrefix + 'radio-checked-fill',
234
234
  TABLE_RADIO_UNCHECKED: iconPrefix + 'radio-unchecked',
235
235
  TABLE_CUSTOM_SORT: iconPrefix + 'drag-handle',
236
+ TABLE_MENU_OPTIONS: iconPrefix + 'arrow-right',
236
237
 
237
238
  // toolbar
238
239
  TOOLBAR_TOOLS_REFRESH: iconPrefix + 'repeat',
@@ -19,46 +19,28 @@
19
19
  background-color: var(--vxe-ui-table-menu-background-color);
20
20
  }
21
21
  .vxe-context-menu--link {
22
- display: block;
23
- padding: 0 2.5em;
22
+ display: flex;
23
+ flex-direction: row;
24
24
  width: var(--vxe-ui-table-menu-item-width);
25
25
  line-height: 26px;
26
+ padding: 0 0.8em;
26
27
  color: var(--vxe-ui-font-color);
27
28
  cursor: pointer;
28
29
  .vxe-context-menu--link-prefix,
29
30
  .vxe-context-menu--link-suffix {
30
- position: absolute;
31
- top: 5px;
32
- margin-right: 5px;
33
- font-size: 16px;
34
- }
35
- .vxe-context-menu--link-prefix {
36
- left: 5px;
37
- }
38
- .vxe-context-menu--link-suffix {
39
- right: 5px;
40
- &.suffix--haschild {
41
- top: 8px;
42
- &:before {
43
- position: absolute;
44
- content: "";
45
- border: 4px solid transparent;
46
- border-left-color: #727272;
47
- }
48
- }
31
+ min-width: 2em;
32
+ flex-shrink: 0;
33
+ text-align: center;
34
+ padding: 0 0.2em;
49
35
  }
50
36
  .vxe-context-menu--link-content {
51
- display: block;
37
+ flex-grow: 1;
38
+ padding: 0 0.2em;
52
39
  overflow: hidden;
53
40
  text-overflow: ellipsis;
54
41
  white-space: nowrap;
55
42
  }
56
43
  }
57
- .vxe-table--context-menu-clild-wrapper {
58
- .vxe-context-menu--link {
59
- padding: 0 2em 0 2.5em;
60
- }
61
- }
62
44
  .vxe-context-menu--option-wrapper,
63
45
  .vxe-table--context-menu-clild-wrapper {
64
46
  margin: 0;
@@ -78,7 +78,7 @@
78
78
  --vxe-ui-table-fixed-left-scrolling-box-shadow: 8px 0px 10px -5px var(--vxe-ui-table-fixed-scrolling-box-shadow-color);
79
79
  --vxe-ui-table-fixed-right-scrolling-box-shadow: -8px 0px 10px -5px var(--vxe-ui-table-fixed-scrolling-box-shadow-color);
80
80
 
81
- --vxe-ui-table-menu-item-width: 178px;
81
+ --vxe-ui-table-menu-item-width: 198px;
82
82
  --vxe-ui-table-menu-background-color: #fff;
83
83
 
84
84
  --vxe-ui-table-validate-error-color: #f56c6c;