vxe-pc-ui 4.3.84 → 4.3.86

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 (64) hide show
  1. package/es/icon/style.css +1 -1
  2. package/es/link/src/link.js +5 -5
  3. package/es/link/style.css +1 -1
  4. package/es/link/style.min.css +1 -1
  5. package/es/style.css +1 -1
  6. package/es/style.min.css +1 -1
  7. package/es/table-select/src/table-select.js +7 -5
  8. package/es/text-ellipsis/src/text-ellipsis.js +49 -8
  9. package/es/text-ellipsis/style.css +47 -3
  10. package/es/text-ellipsis/style.min.css +1 -1
  11. package/es/ui/index.js +4 -2
  12. package/es/ui/src/log.js +1 -1
  13. package/es/vxe-link/style.css +1 -1
  14. package/es/vxe-link/style.min.css +1 -1
  15. package/es/vxe-text-ellipsis/style.css +47 -3
  16. package/es/vxe-text-ellipsis/style.min.css +1 -1
  17. package/helper/vetur/attributes.json +1 -1
  18. package/helper/vetur/tags.json +1 -1
  19. package/lib/icon/style/style.css +1 -1
  20. package/lib/icon/style/style.min.css +1 -1
  21. package/lib/index.umd.js +70 -17
  22. package/lib/index.umd.min.js +1 -1
  23. package/lib/link/src/link.js +3 -3
  24. package/lib/link/src/link.min.js +1 -1
  25. package/lib/link/style/style.css +1 -1
  26. package/lib/link/style/style.min.css +1 -1
  27. package/lib/style.css +1 -1
  28. package/lib/style.min.css +1 -1
  29. package/lib/table-select/src/table-select.js +7 -5
  30. package/lib/table-select/src/table-select.min.js +1 -1
  31. package/lib/text-ellipsis/src/text-ellipsis.js +55 -6
  32. package/lib/text-ellipsis/src/text-ellipsis.min.js +1 -1
  33. package/lib/text-ellipsis/style/style.css +47 -3
  34. package/lib/text-ellipsis/style/style.min.css +1 -1
  35. package/lib/ui/index.js +4 -2
  36. package/lib/ui/index.min.js +1 -1
  37. package/lib/ui/src/log.js +1 -1
  38. package/lib/ui/src/log.min.js +1 -1
  39. package/lib/vxe-link/style/style.css +1 -1
  40. package/lib/vxe-link/style/style.min.css +1 -1
  41. package/lib/vxe-text-ellipsis/style/style.css +47 -3
  42. package/lib/vxe-text-ellipsis/style/style.min.css +1 -1
  43. package/package.json +1 -1
  44. package/packages/link/src/link.ts +7 -5
  45. package/packages/table-select/src/table-select.ts +7 -5
  46. package/packages/text-ellipsis/src/text-ellipsis.ts +52 -8
  47. package/packages/ui/index.ts +3 -1
  48. package/styles/components/link.scss +1 -1
  49. package/styles/components/text-ellipsis.scss +22 -3
  50. package/types/components/table-plugins/extend-cell-area.d.ts +1 -1
  51. package/types/components/table.d.ts +4 -0
  52. package/types/components/text-ellipsis.d.ts +17 -1
  53. /package/es/icon/{iconfont.1739429668166.ttf → iconfont.1739613334299.ttf} +0 -0
  54. /package/es/icon/{iconfont.1739429668166.woff → iconfont.1739613334299.woff} +0 -0
  55. /package/es/icon/{iconfont.1739429668166.woff2 → iconfont.1739613334299.woff2} +0 -0
  56. /package/es/{iconfont.1739429668166.ttf → iconfont.1739613334299.ttf} +0 -0
  57. /package/es/{iconfont.1739429668166.woff → iconfont.1739613334299.woff} +0 -0
  58. /package/es/{iconfont.1739429668166.woff2 → iconfont.1739613334299.woff2} +0 -0
  59. /package/lib/icon/style/{iconfont.1739429668166.ttf → iconfont.1739613334299.ttf} +0 -0
  60. /package/lib/icon/style/{iconfont.1739429668166.woff → iconfont.1739613334299.woff} +0 -0
  61. /package/lib/icon/style/{iconfont.1739429668166.woff2 → iconfont.1739613334299.woff2} +0 -0
  62. /package/lib/{iconfont.1739429668166.ttf → iconfont.1739613334299.ttf} +0 -0
  63. /package/lib/{iconfont.1739429668166.woff → iconfont.1739613334299.woff} +0 -0
  64. /package/lib/{iconfont.1739429668166.woff2 → iconfont.1739613334299.woff2} +0 -0
@@ -1,18 +1,29 @@
1
- import { defineComponent, ref, h, PropType, watch, computed, reactive, onMounted, onBeforeUnmount } from 'vue'
1
+ import { defineComponent, ref, h, PropType, watch, computed, reactive, resolveComponent, onMounted, onBeforeUnmount } from 'vue'
2
2
  import XEUtils from 'xe-utils'
3
- import { getConfig, createEvent, useSize } from '../../ui'
3
+ import { getConfig, createEvent, usePermission, useSize, renderEmptyElement } from '../../ui'
4
4
 
5
5
  import type { TextEllipsisReactData, VxeTextEllipsisEmits, VxeTextEllipsisPropTypes, TextEllipsisMethods, TextEllipsisPrivateMethods, ValueOf, TextEllipsisPrivateRef, VxeTextEllipsisPrivateComputed, VxeTextEllipsisConstructor, VxeTextEllipsisPrivateMethods } from '../../../types'
6
6
 
7
7
  export default defineComponent({
8
8
  name: 'VxeTextEllipsis',
9
9
  props: {
10
+ href: String as PropType<VxeTextEllipsisPropTypes.Href>,
11
+ target: String as PropType<VxeTextEllipsisPropTypes.Target>,
10
12
  content: [String, Number] as PropType<VxeTextEllipsisPropTypes.Content>,
11
13
  lineClamp: [String, Number] as PropType<VxeTextEllipsisPropTypes.LineClamp>,
12
14
  status: String as PropType<VxeTextEllipsisPropTypes.Status>,
13
15
  title: [String, Number] as PropType<VxeTextEllipsisPropTypes.Title>,
14
16
  loading: Boolean as PropType<VxeTextEllipsisPropTypes.Loading>,
15
17
  offsetLength: [String, Number] as PropType<VxeTextEllipsisPropTypes.OffsetLength>,
18
+ routerLink: Object as PropType<VxeTextEllipsisPropTypes.RouterLink>,
19
+ underline: {
20
+ type: Boolean as PropType<VxeTextEllipsisPropTypes.Underline>,
21
+ default: () => getConfig().textEllipsis.underline
22
+ },
23
+ /**
24
+ * 权限码
25
+ */
26
+ permissionCode: [String, Number] as PropType<VxeTextEllipsisPropTypes.PermissionCode>,
16
27
  size: {
17
28
  type: String as PropType<VxeTextEllipsisPropTypes.Size>,
18
29
  default: () => getConfig().textEllipsis.size || getConfig().size
@@ -28,6 +39,8 @@ export default defineComponent({
28
39
 
29
40
  const { computeSize } = useSize(props)
30
41
 
42
+ const { computePermissionInfo } = usePermission(props)
43
+
31
44
  const refElem = ref<HTMLDivElement>()
32
45
  const realityElem = ref<HTMLDivElement>()
33
46
 
@@ -171,17 +184,50 @@ export default defineComponent({
171
184
 
172
185
  Object.assign($xeTextEllipsis, textEllipsisMethods, textEllipsisPrivateMethods)
173
186
 
187
+ const renderContent = () => {
188
+ const { routerLink, href, target, title } = props
189
+ const visibleContent = computeVisibleContent.value
190
+ if (routerLink) {
191
+ return h(resolveComponent('router-link'), {
192
+ class: 'vxe-text-ellipsis--link',
193
+ title,
194
+ target,
195
+ to: routerLink
196
+ }, {
197
+ default () {
198
+ return renderContent()
199
+ }
200
+ })
201
+ }
202
+ if (href) {
203
+ return h('a', {
204
+ class: 'vxe-text-ellipsis--link',
205
+ href,
206
+ target,
207
+ title
208
+ }, visibleContent)
209
+ }
210
+ return h('span', {
211
+ class: 'vxe-text-ellipsis--content'
212
+ }, visibleContent)
213
+ }
214
+
174
215
  const renderVN = () => {
175
- const { loading, status, title } = props
216
+ const { loading, status, title, underline } = props
217
+ const permissionInfo = computePermissionInfo.value
176
218
  const vSize = computeSize.value
177
- const visibleContent = computeVisibleContent.value
178
219
  const textLineClamp = computeTextLineClamp.value
179
220
 
221
+ if (!permissionInfo.visible) {
222
+ return renderEmptyElement($xeTextEllipsis)
223
+ }
224
+
180
225
  return h('div', {
181
226
  ref: refElem,
182
227
  class: ['vxe-text-ellipsis', textLineClamp > 1 ? 'is--multi' : 'is--single', {
183
228
  [`size--${vSize}`]: vSize,
184
229
  [`theme--${status}`]: status,
230
+ 'is--underline': underline,
185
231
  'is--loading': loading
186
232
  }],
187
233
  title,
@@ -189,11 +235,9 @@ export default defineComponent({
189
235
  }, [
190
236
  h('span', {
191
237
  ref: realityElem,
192
- class: 'vxe-text-ellipsis-reality'
238
+ class: 'vxe-text-ellipsis--reality'
193
239
  }),
194
- h('span', {
195
- class: 'vxe-text-ellipsis-content'
196
- }, visibleContent)
240
+ renderContent()
197
241
  ])
198
242
  }
199
243
 
@@ -300,7 +300,9 @@ setConfig({
300
300
  },
301
301
  tabs: {},
302
302
  tag: {},
303
- textEllipsis: {},
303
+ textEllipsis: {
304
+ underline: true
305
+ },
304
306
  text: {},
305
307
  textarea: {
306
308
  resize: 'none'
@@ -54,8 +54,8 @@ $btnThemeList: (
54
54
 
55
55
  .vxe-link {
56
56
  text-decoration: none;
57
+ color: inherit;
57
58
  &:not(.is--disabled) {
58
- color: var(--vxe-ui-font-color);
59
59
  cursor: pointer;
60
60
  &:hover {
61
61
  color: var(--vxe-ui-font-primary-color);
@@ -56,11 +56,25 @@ $btnThemeList: (
56
56
  display: block;
57
57
  overflow: hidden;
58
58
  white-space: normal;
59
- color: var(--vxe-ui-font-color);
60
59
  @for $index from 0 to list.length($btnThemeList) {
61
60
  $item: list.nth($btnThemeList, $index + 1);
62
61
  &.theme--#{map.get($item, name)} {
63
62
  color: map.get($item, textColor);
63
+ & > .vxe-text-ellipsis--link {
64
+ &:focus {
65
+ color: map.get($item, btnDarkenColor);
66
+ }
67
+ &:hover {
68
+ color: map.get($item, btnLightenColor);
69
+ }
70
+ }
71
+ }
72
+ }
73
+ &.is--underline {
74
+ &:hover {
75
+ .vxe-text-ellipsis--link {
76
+ text-decoration: underline;
77
+ }
64
78
  }
65
79
  }
66
80
  &.is--single {
@@ -85,7 +99,7 @@ $btnThemeList: (
85
99
  }
86
100
  }
87
101
  }
88
- .vxe-text-ellipsis-reality {
102
+ .vxe-text-ellipsis--reality {
89
103
  display: none;
90
104
  z-index: -1;
91
105
  pointer-events: none;
@@ -95,9 +109,14 @@ $btnThemeList: (
95
109
  padding: 0 0.1em;
96
110
  user-select: none;
97
111
  }
98
- .vxe-text-ellipsis--content {
112
+ .vxe-text-ellipsis--content,
113
+ .vxe-text-ellipsis--link {
99
114
  padding: 0 0.1em;
100
115
  }
116
+ .vxe-text-ellipsis--link {
117
+ text-decoration: none;
118
+ color: inherit;
119
+ }
101
120
 
102
121
  .vxe-text-ellipsis {
103
122
  &.size--medium {
@@ -82,7 +82,7 @@ export interface VxeTableProPrivateMethods<D = any> {
82
82
  handleMousedownCellAreaEvent(evnt: MouseEvent, params: VxeTableDefines.CellClickEventParams<D>): void
83
83
  handleFilterEvent(evnt: Event, params: VxeTableDefines.FilterChangeEventParams<D>): any
84
84
  handleSortEvent(evnt: Event, params: VxeTableDefines.SortChangeEventParams<D>): any
85
- handleRecalculateCellAreas(): any
85
+ handleRecalculateCellAreaEvent(): any
86
86
  handleCopyCellAreaEvent(evnt: ClipboardEvent): void
87
87
  handlePasteCellAreaEvent(evnt: ClipboardEvent): void
88
88
  handleCutCellAreaEvent(evnt: ClipboardEvent): void
@@ -1000,6 +1000,10 @@ export namespace VxeTablePropTypes {
1000
1000
  reserve?: boolean
1001
1001
  height?: number
1002
1002
  padding?: boolean
1003
+ /**
1004
+ * @deprecated
1005
+ * @private
1006
+ */
1003
1007
  mode?: 'inside' | 'fixed' | '' | null
1004
1008
  loadMethod?(params: {
1005
1009
  $table: VxeTableConstructor<D>
@@ -1,5 +1,5 @@
1
1
  import { RenderFunction, SetupContext, Ref } from 'vue'
2
- import { DefineVxeComponentApp, DefineVxeComponentOptions, DefineVxeComponentInstance, VxeComponentBaseOptions, VxeComponentEventParams, VxeComponentSizeType, ValueOf, VxeComponentStatusType } from '@vxe-ui/core'
2
+ import { DefineVxeComponentApp, DefineVxeComponentOptions, DefineVxeComponentInstance, VxeComponentBaseOptions, VxeComponentEventParams, VxeComponentSizeType, ValueOf, VxeComponentStatusType, VxeComponentPermissionCodeType } from '@vxe-ui/core'
3
3
 
4
4
  /* eslint-disable no-use-before-define,@typescript-eslint/ban-types */
5
5
 
@@ -23,21 +23,37 @@ export interface TextEllipsisPrivateRef {
23
23
  export interface VxeTextEllipsisPrivateRef extends TextEllipsisPrivateRef { }
24
24
 
25
25
  export namespace VxeTextEllipsisPropTypes {
26
+ export type Href = null | string
27
+ export type Target = null | '' | '_blank' | '_self' | '_parent' | '_top'
26
28
  export type Status = VxeComponentStatusType
27
29
  export type Title = string | number
28
30
  export type LineClamp = string | number
29
31
  export type Loading = boolean
30
32
  export type OffsetLength = string | number
33
+ export type RouterLink = {
34
+ path?: string
35
+ name?: string | number | null
36
+ query?: any
37
+ params?: any
38
+ target?: null | '' | '_blank' | '_self' | '_parent' | '_top'
39
+ }
40
+ export type Underline = boolean
41
+ export type PermissionCode = VxeComponentPermissionCodeType
31
42
  export type Content = string | number
32
43
  export type Size = VxeComponentSizeType
33
44
  }
34
45
 
35
46
  export type VxeTextEllipsisProps = {
47
+ href?: VxeTextEllipsisPropTypes.Href
48
+ target?: VxeTextEllipsisPropTypes.Target
36
49
  status?: VxeTextEllipsisPropTypes.Status
37
50
  title?: VxeTextEllipsisPropTypes.Title
38
51
  lineClamp?: VxeTextEllipsisPropTypes.LineClamp
39
52
  loading?: VxeTextEllipsisPropTypes.Loading
40
53
  offsetLength?: VxeTextEllipsisPropTypes.OffsetLength
54
+ underline?: VxeTextEllipsisPropTypes.Underline
55
+ routerLink?: VxeTextEllipsisPropTypes.RouterLink
56
+ permissionCode?: VxeTextEllipsisPropTypes.PermissionCode
41
57
  content?: VxeTextEllipsisPropTypes.Content
42
58
  size?: VxeTextEllipsisPropTypes.Size
43
59
  }