vxe-pc-ui 1.9.21 → 1.9.23

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 (96) hide show
  1. package/es/components.js +3 -3
  2. package/es/form-design/render/use-widget-form.js +2 -2
  3. package/es/icon/style.css +1 -1
  4. package/es/modal/index.js +14 -1
  5. package/es/modal/src/modal.js +51 -20
  6. package/es/modal/style.css +19 -10
  7. package/es/modal/style.min.css +1 -1
  8. package/es/style.css +1 -1
  9. package/es/style.min.css +1 -1
  10. package/es/tip/index.js +12 -0
  11. package/es/{tips/src/tips.js → tip/src/tip.js} +12 -12
  12. package/es/{tips → tip}/style.css +26 -26
  13. package/es/tip/style.min.css +1 -0
  14. package/es/ui/index.js +3 -3
  15. package/es/ui/src/log.js +1 -1
  16. package/es/vxe-modal/style.css +19 -10
  17. package/es/vxe-modal/style.min.css +1 -1
  18. package/es/vxe-tip/index.js +3 -0
  19. package/es/{vxe-tips → vxe-tip}/style.css +26 -26
  20. package/es/vxe-tip/style.min.css +1 -0
  21. package/helper/vetur/attributes.json +1 -1
  22. package/helper/vetur/tags.json +1 -1
  23. package/lib/components.js +5 -5
  24. package/lib/components.min.js +1 -1
  25. package/lib/form-design/render/use-widget-form.js +2 -2
  26. package/lib/form-design/render/use-widget-form.min.js +1 -1
  27. package/lib/icon/style/style.css +1 -1
  28. package/lib/icon/style/style.min.css +1 -1
  29. package/lib/index.umd.js +106 -44
  30. package/lib/index.umd.min.js +1 -1
  31. package/lib/modal/index.js +14 -1
  32. package/lib/modal/index.min.js +1 -1
  33. package/lib/modal/src/modal.js +59 -15
  34. package/lib/modal/src/modal.min.js +1 -1
  35. package/lib/modal/style/style.css +19 -10
  36. package/lib/modal/style/style.min.css +1 -1
  37. package/lib/style.css +1 -1
  38. package/lib/style.min.css +1 -1
  39. package/lib/tip/index.js +19 -0
  40. package/lib/tip/index.min.js +1 -0
  41. package/lib/{tips/src/tips.js → tip/src/tip.js} +12 -12
  42. package/lib/tip/src/tip.min.js +1 -0
  43. package/lib/{vxe-tips → tip}/style/style.css +26 -26
  44. package/lib/tip/style/style.min.css +1 -0
  45. package/lib/ui/index.js +3 -3
  46. package/lib/ui/index.min.js +1 -1
  47. package/lib/ui/src/log.js +1 -1
  48. package/lib/ui/src/log.min.js +1 -1
  49. package/lib/vxe-modal/style/style.css +19 -10
  50. package/lib/vxe-modal/style/style.min.css +1 -1
  51. package/lib/{vxe-tips → vxe-tip}/index.js +5 -5
  52. package/lib/vxe-tip/index.min.js +1 -0
  53. package/lib/{tips → vxe-tip}/style/style.css +26 -26
  54. package/lib/vxe-tip/style/style.min.css +1 -0
  55. package/package.json +1 -1
  56. package/packages/components.ts +3 -3
  57. package/packages/form-design/render/use-widget-form.ts +2 -2
  58. package/packages/modal/index.ts +15 -1
  59. package/packages/modal/src/modal.ts +55 -14
  60. package/packages/tip/index.ts +17 -0
  61. package/packages/{tips/src/tips.ts → tip/src/tip.ts} +22 -22
  62. package/packages/ui/index.ts +2 -2
  63. package/styles/all.scss +1 -1
  64. package/styles/components/modal.scss +19 -4
  65. package/styles/components/{tips.scss → tip.scss} +5 -5
  66. package/types/all.d.ts +3 -3
  67. package/types/components/modal.d.ts +15 -2
  68. package/types/components/table.d.ts +1 -1
  69. package/types/components/tip.d.ts +79 -0
  70. package/types/ui/global-config.d.ts +2 -2
  71. package/es/tips/index.js +0 -10
  72. package/es/tips/style.min.css +0 -1
  73. package/es/vxe-tips/index.js +0 -3
  74. package/es/vxe-tips/style.min.css +0 -1
  75. package/lib/tips/index.js +0 -17
  76. package/lib/tips/index.min.js +0 -1
  77. package/lib/tips/src/tips.min.js +0 -1
  78. package/lib/tips/style/style.min.css +0 -1
  79. package/lib/vxe-tips/index.min.js +0 -1
  80. package/lib/vxe-tips/style/style.min.css +0 -1
  81. package/packages/tips/index.ts +0 -14
  82. package/types/components/tips.d.ts +0 -79
  83. /package/es/icon/style/{iconfont.1717772085052.ttf → iconfont.1717851573434.ttf} +0 -0
  84. /package/es/icon/style/{iconfont.1717772085052.woff → iconfont.1717851573434.woff} +0 -0
  85. /package/es/icon/style/{iconfont.1717772085052.woff2 → iconfont.1717851573434.woff2} +0 -0
  86. /package/es/{iconfont.1717772085052.ttf → iconfont.1717851573434.ttf} +0 -0
  87. /package/es/{iconfont.1717772085052.woff → iconfont.1717851573434.woff} +0 -0
  88. /package/es/{iconfont.1717772085052.woff2 → iconfont.1717851573434.woff2} +0 -0
  89. /package/lib/icon/style/{iconfont.1717772085052.ttf → iconfont.1717851573434.ttf} +0 -0
  90. /package/lib/icon/style/{iconfont.1717772085052.woff → iconfont.1717851573434.woff} +0 -0
  91. /package/lib/icon/style/{iconfont.1717772085052.woff2 → iconfont.1717851573434.woff2} +0 -0
  92. /package/lib/{iconfont.1717772085052.ttf → iconfont.1717851573434.ttf} +0 -0
  93. /package/lib/{iconfont.1717772085052.woff → iconfont.1717851573434.woff} +0 -0
  94. /package/lib/{iconfont.1717772085052.woff2 → iconfont.1717851573434.woff2} +0 -0
  95. /package/lib/{tips → tip}/style/index.js +0 -0
  96. /package/lib/{vxe-tips → vxe-tip}/style/index.js +0 -0
@@ -64,6 +64,7 @@ function handleOpen (defOpts: VxeModalDefines.ModalOptions, content: VxeModalPro
64
64
  function openAlert (content: VxeModalPropTypes.Content | VxeModalDefines.ModalOptions, title?: VxeModalPropTypes.Title, options?: VxeModalDefines.ModalOptions) {
65
65
  return handleOpen({
66
66
  type: 'alert',
67
+ showHeader: true,
67
68
  showFooter: true
68
69
  }, content, title, options)
69
70
  }
@@ -72,6 +73,7 @@ function openConfirm (content: VxeModalPropTypes.Content | VxeModalDefines.Modal
72
73
  return handleOpen({
73
74
  type: 'confirm',
74
75
  status: 'question',
76
+ showHeader: true,
75
77
  showFooter: true
76
78
  }, content, title, options)
77
79
  }
@@ -85,13 +87,25 @@ function openMessage (content: VxeModalPropTypes.Content | VxeModalDefines.Modal
85
87
  }, content, '', options)
86
88
  }
87
89
 
90
+ function openNotification (content: VxeModalPropTypes.Content | VxeModalDefines.ModalOptions, options?: VxeModalDefines.ModalOptions) {
91
+ return handleOpen({
92
+ type: 'notification',
93
+ mask: false,
94
+ lockView: false,
95
+ showHeader: true,
96
+ draggable: false,
97
+ position: 'top-right'
98
+ }, content, '', options)
99
+ }
100
+
88
101
  export const ModalController = {
89
102
  get: getModal,
90
103
  close: closeModal,
91
104
  open: openModal,
92
105
  alert: openAlert,
93
106
  confirm: openConfirm,
94
- message: openMessage
107
+ message: openMessage,
108
+ notification: openNotification
95
109
  }
96
110
 
97
111
  export const VxeModal = Object.assign(VxeModalComponent, {
@@ -11,7 +11,8 @@ import { errLog } from '../../ui/src/log'
11
11
  import type { VxeModalConstructor, VxeModalPropTypes, ModalReactData, VxeModalEmits, ModalEventTypes, VxeButtonInstance, ModalMethods, ModalPrivateRef, VxeModalMethods } from '../../../types'
12
12
 
13
13
  export const allActiveModals: VxeModalConstructor[] = []
14
- export const msgQueue: VxeModalConstructor[] = []
14
+ const msgQueue: VxeModalConstructor[] = []
15
+ const notifyQueue: VxeModalConstructor[] = []
15
16
 
16
17
  export default defineComponent({
17
18
  name: 'VxeModal',
@@ -117,7 +118,7 @@ export default defineComponent({
117
118
  let modalMethods = {} as ModalMethods
118
119
 
119
120
  const computeIsMsg = computed(() => {
120
- return props.type === 'message'
121
+ return props.type === 'message' || props.type === 'notification'
121
122
  })
122
123
 
123
124
  const getBox = () => {
@@ -173,8 +174,10 @@ export default defineComponent({
173
174
 
174
175
  const updateStyle = () => {
175
176
  nextTick(() => {
177
+ const { type } = props
178
+ const queueList = type === 'notification' ? notifyQueue : msgQueue
176
179
  let offsetTop = 0
177
- msgQueue.forEach(comp => {
180
+ queueList.forEach(comp => {
178
181
  const boxElem = comp.getBox()
179
182
  offsetTop += XEUtils.toNumber(comp.props.top)
180
183
  comp.reactData.modalTop = offsetTop
@@ -184,8 +187,10 @@ export default defineComponent({
184
187
  }
185
188
 
186
189
  const removeMsgQueue = () => {
187
- if (msgQueue.indexOf($xeModal) > -1) {
188
- XEUtils.remove(msgQueue, comp => comp === $xeModal)
190
+ const { type } = props
191
+ const queueList = type === 'notification' ? notifyQueue : msgQueue
192
+ if (queueList.indexOf($xeModal) > -1) {
193
+ XEUtils.remove(queueList, comp => comp === $xeModal)
189
194
  }
190
195
  updateStyle()
191
196
  }
@@ -279,8 +284,10 @@ export default defineComponent({
279
284
  }
280
285
 
281
286
  const addMsgQueue = () => {
282
- if (msgQueue.indexOf($xeModal) === -1) {
283
- msgQueue.push($xeModal)
287
+ const { type } = props
288
+ const queueList = type === 'notification' ? notifyQueue : msgQueue
289
+ if (queueList.indexOf($xeModal) === -1) {
290
+ queueList.push($xeModal)
284
291
  }
285
292
  updateStyle()
286
293
  }
@@ -331,8 +338,17 @@ export default defineComponent({
331
338
  })
332
339
  }
333
340
 
341
+ let msgTimeout: any = null
342
+
343
+ const handleMsgAutoClose = () => {
344
+ const { duration } = props
345
+ if (duration !== -1) {
346
+ msgTimeout = setTimeout(() => closeModal('close'), XEUtils.toNumber(duration))
347
+ }
348
+ }
349
+
334
350
  const openModal = () => {
335
- const { duration, remember, showFooter } = props
351
+ const { remember, showFooter } = props
336
352
  const { inited, visible } = reactData
337
353
  const isMsg = computeIsMsg.value
338
354
  if (!inited) {
@@ -365,9 +381,7 @@ export default defineComponent({
365
381
  }, 10)
366
382
  if (isMsg) {
367
383
  addMsgQueue()
368
- if (duration !== -1) {
369
- setTimeout(() => closeModal('close'), XEUtils.toNumber(duration))
370
- }
384
+ handleMsgAutoClose()
371
385
  } else {
372
386
  nextTick(() => {
373
387
  const { fullscreen } = props
@@ -403,6 +417,26 @@ export default defineComponent({
403
417
  }
404
418
  }
405
419
 
420
+ const selfMouseoverEvent = () => {
421
+ if (msgTimeout === null) {
422
+ return
423
+ }
424
+ const isMsg = computeIsMsg.value
425
+ if (isMsg) {
426
+ clearTimeout(msgTimeout)
427
+ msgTimeout = null
428
+ }
429
+ }
430
+
431
+ const selfMouseoutEvent = () => {
432
+ if (msgTimeout === null) {
433
+ const isMsg = computeIsMsg.value
434
+ if (isMsg) {
435
+ handleMsgAutoClose()
436
+ }
437
+ }
438
+ }
439
+
406
440
  const handleGlobalKeydownEvent = (evnt: KeyboardEvent) => {
407
441
  const isEsc = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ESCAPE)
408
442
  if (isEsc) {
@@ -882,16 +916,22 @@ export default defineComponent({
882
916
  }
883
917
 
884
918
  const renderVN = () => {
885
- const { className, type, animat, loading, status, lockScroll, padding, lockView, mask, resize } = props
919
+ const { className, type, animat, position, loading, status, lockScroll, padding, lockView, mask, resize } = props
886
920
  const { inited, zoomLocat, modalTop, contentVisible, visible } = reactData
887
921
  const vSize = computeSize.value
922
+ const isMsg = computeIsMsg.value
923
+ const ons: Record<string, any> = {}
924
+ if (isMsg) {
925
+ ons.onMouseover = selfMouseoverEvent
926
+ ons.onMouseout = selfMouseoutEvent
927
+ }
888
928
  return h(Teleport, {
889
929
  to: 'body',
890
930
  disabled: props.transfer ? !inited : true
891
931
  }, [
892
932
  h('div', {
893
933
  ref: refElem,
894
- class: ['vxe-modal--wrapper', `type--${type}`, className || '', {
934
+ class: ['vxe-modal--wrapper', `type--${type}`, className || '', position ? `pos--${position}` : '', {
895
935
  [`size--${vSize}`]: vSize,
896
936
  [`status--${status}`]: status,
897
937
  'is--padding': padding,
@@ -909,7 +949,8 @@ export default defineComponent({
909
949
  zIndex: reactData.modalZindex,
910
950
  top: modalTop ? `${modalTop}px` : null
911
951
  },
912
- onClick: selfClickEvent
952
+ onClick: selfClickEvent,
953
+ ...ons
913
954
  }, [
914
955
  h('div', {
915
956
  ref: refModalBox,
@@ -0,0 +1,17 @@
1
+ import { App } from 'vue'
2
+ import VxeTipComponent from './src/tip'
3
+ import { dynamicApp } from '../dynamics'
4
+
5
+ export const VxeTip = Object.assign({}, VxeTipComponent, {
6
+ install (app: App) {
7
+ app.component(VxeTipComponent.name as string, VxeTipComponent)
8
+ app.component('VxeTipsComponent' as string, VxeTipComponent)
9
+ }
10
+ })
11
+
12
+ dynamicApp.component(VxeTipComponent.name as string, VxeTipComponent)
13
+
14
+ export const Tips = VxeTip
15
+ export const Tip = VxeTip
16
+
17
+ export default VxeTip
@@ -1,26 +1,26 @@
1
1
  import { defineComponent, ref, h, reactive, PropType, createCommentVNode } from 'vue'
2
2
  import XEUtils from 'xe-utils'
3
3
  import { getConfig } from '../../ui'
4
- import { getSlotVNs } from '../..//ui/src/vn'
4
+ import { getSlotVNs } from '../../ui/src/vn'
5
5
 
6
- import type { VxeTipsPropTypes, TipsReactData, VxeTipsEmits, TipsPrivateRef, VxeTipsPrivateComputed, VxeTipsConstructor, VxeTipsPrivateMethods } from '../../../types'
6
+ import type { VxeTipPropTypes, TipReactData, VxeTipEmits, TipPrivateRef, VxeTipPrivateComputed, VxeTipConstructor, VxeTipPrivateMethods } from '../../../types'
7
7
 
8
8
  export default defineComponent({
9
- name: 'VxeTips',
9
+ name: 'VxeTip',
10
10
  props: {
11
11
  title: {
12
- type: [String, Number] as PropType<VxeTipsPropTypes.Title>,
13
- default: () => getConfig().tips.title
12
+ type: [String, Number] as PropType<VxeTipPropTypes.Title>,
13
+ default: () => getConfig().tip.title
14
14
  },
15
- content: [String, Number] as PropType<VxeTipsPropTypes.Content>,
16
- status: String as PropType<VxeTipsPropTypes.Status>,
15
+ content: [String, Number] as PropType<VxeTipPropTypes.Content>,
16
+ status: String as PropType<VxeTipPropTypes.Status>,
17
17
  icon: {
18
- type: String as PropType<VxeTipsPropTypes.Icon>,
19
- default: () => getConfig().tips.icon
18
+ type: String as PropType<VxeTipPropTypes.Icon>,
19
+ default: () => getConfig().tip.icon
20
20
  }
21
21
  },
22
22
  emits: [
23
- ] as VxeTipsEmits,
23
+ ] as VxeTipEmits,
24
24
  setup (props, context) {
25
25
  const { slots } = context
26
26
 
@@ -28,17 +28,17 @@ export default defineComponent({
28
28
 
29
29
  const refElem = ref<HTMLDivElement>()
30
30
 
31
- const reactData = reactive<TipsReactData>({
31
+ const reactData = reactive<TipReactData>({
32
32
  })
33
33
 
34
- const refMaps: TipsPrivateRef = {
34
+ const refMaps: TipPrivateRef = {
35
35
  refElem
36
36
  }
37
37
 
38
- const computeMaps: VxeTipsPrivateComputed = {
38
+ const computeMaps: VxeTipPrivateComputed = {
39
39
  }
40
40
 
41
- const $xeTips = {
41
+ const $xeTip = {
42
42
  xID,
43
43
  props,
44
44
  context,
@@ -46,7 +46,7 @@ export default defineComponent({
46
46
 
47
47
  getRefMaps: () => refMaps,
48
48
  getComputeMaps: () => computeMaps
49
- } as unknown as VxeTipsConstructor & VxeTipsPrivateMethods
49
+ } as unknown as VxeTipConstructor & VxeTipPrivateMethods
50
50
 
51
51
  const renderVN = () => {
52
52
  const { status, content, icon, title } = props
@@ -55,13 +55,13 @@ export default defineComponent({
55
55
  const iconSlot = slots.icon
56
56
  return h('div', {
57
57
  ref: refElem,
58
- class: ['vxe-tips', {
58
+ class: ['vxe-tip', {
59
59
  [`theme--${status}`]: status
60
60
  }]
61
61
  }, [
62
62
  iconSlot || icon
63
63
  ? h('div', {
64
- class: 'vxe-tips--icon'
64
+ class: 'vxe-tip--icon'
65
65
  }, iconSlot
66
66
  ? getSlotVNs(iconSlot({}))
67
67
  : [
@@ -71,23 +71,23 @@ export default defineComponent({
71
71
  ])
72
72
  : createCommentVNode(),
73
73
  h('div', {
74
- class: 'vxe-tips--body'
74
+ class: 'vxe-tip--body'
75
75
  }, [
76
76
  titleSlot || title
77
77
  ? h('div', {
78
- class: 'vxe-tips--title'
78
+ class: 'vxe-tip--title'
79
79
  }, titleSlot ? getSlotVNs(titleSlot({})) : XEUtils.toValueString(title))
80
80
  : createCommentVNode(),
81
81
  h('div', {
82
- class: 'vxe-tips--content'
82
+ class: 'vxe-tip--content'
83
83
  }, defaultSlot ? getSlotVNs(defaultSlot({})) : XEUtils.toValueString(content))
84
84
  ])
85
85
  ])
86
86
  }
87
87
 
88
- $xeTips.renderVN = renderVN
88
+ $xeTip.renderVN = renderVN
89
89
 
90
- return $xeTips
90
+ return $xeTip
91
91
  },
92
92
  render () {
93
93
  return this.renderVN()
@@ -123,7 +123,7 @@ setConfig({
123
123
  loading: {},
124
124
  modal: {
125
125
  // size: null,
126
- top: 15,
126
+ top: 16,
127
127
  showHeader: true,
128
128
  minWidth: 340,
129
129
  minHeight: 140,
@@ -176,7 +176,7 @@ setConfig({
176
176
  tabs: {},
177
177
  textarea: {},
178
178
  toolbar: {},
179
- tips: {},
179
+ tip: {},
180
180
  tooltip: {
181
181
  // size: null,
182
182
  trigger: 'hover',
package/styles/all.scss CHANGED
@@ -59,7 +59,7 @@
59
59
  @import './components/tag.scss';
60
60
  @import './components/text.scss';
61
61
  @import './components/textarea.scss';
62
- @import './components/tips.scss';
62
+ @import './components/tip.scss';
63
63
  @import './components/tooltip.scss';
64
64
  @import './components/tree.scss';
65
65
  @import './components/tree-select.scss';
@@ -20,7 +20,8 @@
20
20
  background-color: rgba(0, 0, 0, 0.5);
21
21
  }
22
22
  }
23
- &.type--message {
23
+ &.type--message,
24
+ &.type--notification {
24
25
  .vxe-modal--box {
25
26
  opacity: 1;
26
27
  transform: translateY(0);
@@ -52,7 +53,9 @@
52
53
  &:not(.lock--view) {
53
54
  pointer-events: none;
54
55
  }
55
- &:not(.type--message) {
56
+ &.type--modal,
57
+ &.type--alert,
58
+ &.type--confirm {
56
59
  &.lock--scroll {
57
60
  overflow: hidden;
58
61
  }
@@ -84,7 +87,8 @@
84
87
  @include createAnimationTransition(background-color, .2s);
85
88
  }
86
89
  }
87
- &.type--message {
90
+ &.type--message,
91
+ &.type--notification {
88
92
  .vxe-modal--box {
89
93
  &:not(.is--drag) {
90
94
  @include createAnimationTransition(all, .4s, ease-out);
@@ -93,6 +97,7 @@
93
97
  }
94
98
  }
95
99
  &.type--message,
100
+ &.type--notification,
96
101
  &.type--alert,
97
102
  &.type--confirm {
98
103
  .vxe-modal--body {
@@ -100,8 +105,18 @@
100
105
  word-break: break-word;
101
106
  }
102
107
  }
103
- &.type--message {
108
+ &.type--message,
109
+ &.type--notification {
110
+ width: 100%;
111
+ height: 100%;
112
+ padding: 0 var(--vxe-ui-layout-padding-double);
104
113
  text-align: center;
114
+ &.pos--top-left {
115
+ text-align: left;
116
+ }
117
+ &.pos--top-right {
118
+ text-align: right;
119
+ }
105
120
  .vxe-modal--box {
106
121
  display: inline-block;
107
122
  padding: 2px 0;
@@ -31,7 +31,7 @@ $btnThemeList: (
31
31
  )
32
32
  );
33
33
 
34
- .vxe-tips {
34
+ .vxe-tip {
35
35
  position: relative;
36
36
  display: flex;
37
37
  flex-direction: row;
@@ -56,7 +56,7 @@ $btnThemeList: (
56
56
  &::after {
57
57
  background-color: map-get($item, borderColor);
58
58
  }
59
- .vxe-tips--icon {
59
+ .vxe-tip--icon {
60
60
  color: map-get($item, borderColor);
61
61
  }
62
62
  }
@@ -71,16 +71,16 @@ $btnThemeList: (
71
71
  font-size: var(--vxe-ui-font-size-mini);
72
72
  }
73
73
  }
74
- .vxe-tips--icon {
74
+ .vxe-tip--icon {
75
75
  flex-shrink: 0;
76
76
  font-size: 1.2em;
77
77
  line-height: 2em;
78
78
  padding-right: var(--vxe-ui-layout-padding-half);
79
79
  }
80
- .vxe-tips--body {
80
+ .vxe-tip--body {
81
81
  flex-grow: 1;
82
82
  }
83
- .vxe-tips--title {
83
+ .vxe-tip--title {
84
84
  font-size: 1.1em;
85
85
  line-height: 2em;
86
86
  font-weight: 700;
package/types/all.d.ts CHANGED
@@ -60,7 +60,7 @@ import VxeTabs from './components/tabs'
60
60
  import VxeTag from './components/tag'
61
61
  import VxeText from './components/text'
62
62
  import VxeTextarea from './components/textarea'
63
- import VxeTips from './components/tips'
63
+ import VxeTip from './components/tip'
64
64
  import VxeTooltip from './components/tooltip'
65
65
  import VxeTree from './components/tree'
66
66
  import VxeTreeSelect from './components/tree-select'
@@ -136,7 +136,7 @@ declare module '@vue/runtime-core' {
136
136
  VxeTag: typeof VxeTag
137
137
  VxeText: typeof VxeText
138
138
  VxeTextarea: typeof VxeTextarea
139
- VxeTips: typeof VxeTips
139
+ VxeTip: typeof VxeTip
140
140
  VxeTooltip: typeof VxeTooltip
141
141
  VxeTree: typeof VxeTree
142
142
  VxeTreeSelect: typeof VxeTreeSelect
@@ -213,7 +213,7 @@ export * from './components/tabs'
213
213
  export * from './components/tag'
214
214
  export * from './components/text'
215
215
  export * from './components/textarea'
216
- export * from './components/tips'
216
+ export * from './components/tip'
217
217
  export * from './components/tooltip'
218
218
  export * from './components/tree'
219
219
  export * from './components/tree-select'
@@ -25,7 +25,8 @@ export interface VxeModalPrivateRef extends ModalPrivateRef { }
25
25
  /**
26
26
  * 窗口类型
27
27
  */
28
- export type ModalType = 'alert' | 'confirm' | 'message' | 'modal'
28
+ export type ModalType = 'alert' | 'confirm' | 'message' | 'notification' | 'modal'
29
+
29
30
  /**
30
31
  * 窗口状态
31
32
  */
@@ -51,7 +52,7 @@ export namespace VxeModalPropTypes {
51
52
  export type IconStatus = string
52
53
  export type ClassName = string
53
54
  export type Top = number | string
54
- export type Position = 'center' | ModalPosition
55
+ export type Position = 'center' | 'top-left' | 'top-right' | ModalPosition
55
56
  export type Title = string | number
56
57
  export type Duration = number | string
57
58
  export type Content = number | string | null
@@ -335,6 +336,18 @@ export interface ModalController {
335
336
  * @param options 参数
336
337
  */
337
338
  message(options: VxeModalDefines.ModalOptions): Promise<ModalEventTypes>
339
+ /**
340
+ * 创建消息通知
341
+ * @param content 消息内容
342
+ * @param title 标题
343
+ * @param options 参数
344
+ */
345
+ notification(content: VxeModalPropTypes.Content, options?: VxeModalDefines.ModalOptions): Promise<ModalEventTypes>
346
+ /**
347
+ * 创建消息通知
348
+ * @param options 参数
349
+ */
350
+ notification(options: VxeModalDefines.ModalOptions): Promise<ModalEventTypes>
338
351
  /**
339
352
  * 获取动态的活动窗口
340
353
  * @param id 窗口唯一标识
@@ -338,7 +338,7 @@ export namespace VxeTablePropTypes {
338
338
  mode?: 'simple' | 'popup' | '' | null
339
339
  trigger?: string,
340
340
  immediate?: boolean
341
- placement?: 'left' | 'right' | 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight'
341
+ placement?: 'left' | 'right' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right'
342
342
  /**
343
343
  * 自定义列是否允许列选中的方法,该方法的返回值用来决定这一列的 checkbox 是否可以选中
344
344
  */
@@ -0,0 +1,79 @@
1
+ import { RenderFunction, SetupContext, Ref, ComponentPublicInstance, DefineComponent } from 'vue'
2
+ import { defineVxeComponent, VxeComponentBaseOptions, VxeComponentEventParams, VxeComponentStatusType, ValueOf } from '@vxe-ui/core'
3
+
4
+ /* eslint-disable no-use-before-define,@typescript-eslint/ban-types */
5
+
6
+ export declare const VxeTip: defineVxeComponent<VxeTipProps, VxeTipEventProps>
7
+ export type VxeTipComponent = DefineComponent<VxeTipProps, VxeTipEmits>
8
+
9
+ export type VxeTipInstance = ComponentPublicInstance<VxeTipProps, VxeTipConstructor>
10
+
11
+ export interface VxeTipConstructor extends VxeComponentBaseOptions, VxeTipMethods {
12
+ props: VxeTipProps
13
+ context: SetupContext<VxeTipEmits>
14
+ reactData: TipReactData
15
+ getRefMaps(): TipPrivateRef
16
+ getComputeMaps(): TipPrivateComputed
17
+ renderVN: RenderFunction
18
+ }
19
+
20
+ export interface TipPrivateRef {
21
+ refElem: Ref<HTMLDivElement | undefined>
22
+ }
23
+ export interface VxeTipPrivateRef extends TipPrivateRef { }
24
+
25
+ export namespace VxeTipPropTypes {
26
+ export type Title = string | number
27
+ export type Content = string | number
28
+ export type Status = VxeComponentStatusType
29
+ export type Icon = string
30
+ }
31
+
32
+ export type VxeTipProps = {
33
+ title?: VxeTipPropTypes.Title
34
+ content?: VxeTipPropTypes.Content
35
+ status?: VxeTipPropTypes.Status
36
+ icon?: VxeTipPropTypes.Icon
37
+ }
38
+
39
+ export interface TipPrivateComputed {
40
+ }
41
+ export interface VxeTipPrivateComputed extends TipPrivateComputed { }
42
+
43
+ export interface TipReactData {
44
+ }
45
+
46
+ export interface TipMethods {
47
+ dispatchEvent(type: ValueOf<VxeTipEmits>, params: Record<string, any>, evnt: Event | null): void
48
+ }
49
+ export interface VxeTipMethods extends TipMethods { }
50
+
51
+ export interface TipPrivateMethods { }
52
+ export interface VxeTipPrivateMethods extends TipPrivateMethods { }
53
+
54
+ export type VxeTipEmits = []
55
+
56
+ export namespace VxeTipDefines {
57
+ export interface TipEventParams extends VxeComponentEventParams {
58
+ $tip: VxeTipConstructor
59
+ }
60
+ }
61
+
62
+ export type VxeTipEventProps = {}
63
+
64
+ export interface VxeTipListeners { }
65
+
66
+ export namespace VxeTipEvents { }
67
+
68
+ export namespace VxeTipSlotTypes {
69
+ export interface DefaultSlotParams {}
70
+ }
71
+
72
+ export interface VxeTipSlots {
73
+ default: (params: VxeTipSlotTypes.DefaultSlotParams) => any
74
+ title: (params: VxeTipSlotTypes.DefaultSlotParams) => any
75
+ icon: (params: VxeTipSlotTypes.DefaultSlotParams) => any
76
+ }
77
+
78
+ export const Tip: typeof VxeTip
79
+ export default VxeTip
@@ -55,7 +55,7 @@ import { VxeTabPaneProps } from '../components/tab-pane'
55
55
  import { VxeTabsProps } from '../components/tabs'
56
56
  import { VxeTextProps } from '../components/text'
57
57
  import { VxeTextareaProps } from '../components/textarea'
58
- import { VxeTipsProps } from '../components/tips'
58
+ import { VxeTipProps } from '../components/tip'
59
59
  import { VxeTooltipProps } from '../components/tooltip'
60
60
  import { VxeTreeProps } from '../components/tree'
61
61
  import { VxeTreeSelectProps } from '../components/tree-select'
@@ -128,7 +128,7 @@ declare module '@vxe-ui/core' {
128
128
  tabs?: VxeTabsProps
129
129
  text?: VxeTextProps
130
130
  textarea?: VxeTextareaProps
131
- tips?: VxeTipsProps
131
+ tip?: VxeTipProps
132
132
  tooltip?: VxeTooltipProps
133
133
  tree?: VxeTreeProps
134
134
  treeSelect?: VxeTreeSelectProps
package/es/tips/index.js DELETED
@@ -1,10 +0,0 @@
1
- import VxeTipsComponent from './src/tips';
2
- import { dynamicApp } from '../dynamics';
3
- export const VxeTips = Object.assign({}, VxeTipsComponent, {
4
- install(app) {
5
- app.component(VxeTipsComponent.name, VxeTipsComponent);
6
- }
7
- });
8
- dynamicApp.component(VxeTipsComponent.name, VxeTipsComponent);
9
- export const Tips = VxeTips;
10
- export default VxeTips;
@@ -1 +0,0 @@
1
- .vxe-tips{position:relative;display:flex;flex-direction:row;color:var(--vxe-ui-font-color);margin-bottom:var(--vxe-ui-layout-padding-default);padding:var(--vxe-ui-layout-padding-default) var(--vxe-ui-layout-padding-double) var(--vxe-ui-layout-padding-double) var(--vxe-ui-layout-padding-double);font-size:var(--vxe-ui-font-size-default)}.vxe-tips::after{content:"";position:absolute;top:0;left:0;height:100%;width:5px;background-color:var(--vxe-ui-font-color);z-index:1}.vxe-tips.theme--primary{background-color:var(--vxe-ui-font-primary-tinge-color)}.vxe-tips.theme--primary::after{background-color:var(--vxe-ui-font-primary-color)}.vxe-tips.theme--primary .vxe-tips--icon{color:var(--vxe-ui-font-primary-color)}.vxe-tips.theme--success{background-color:var(--vxe-ui-status-success-tinge-color)}.vxe-tips.theme--success::after{background-color:var(--vxe-ui-status-success-color)}.vxe-tips.theme--success .vxe-tips--icon{color:var(--vxe-ui-status-success-color)}.vxe-tips.theme--info{background-color:var(--vxe-ui-status-info-tinge-color)}.vxe-tips.theme--info::after{background-color:var(--vxe-ui-status-info-color)}.vxe-tips.theme--info .vxe-tips--icon{color:var(--vxe-ui-status-info-color)}.vxe-tips.theme--warning{background-color:var(--vxe-ui-status-warning-tinge-color)}.vxe-tips.theme--warning::after{background-color:var(--vxe-ui-status-warning-color)}.vxe-tips.theme--warning .vxe-tips--icon{color:var(--vxe-ui-status-warning-color)}.vxe-tips.theme--danger{background-color:var(--vxe-ui-status-danger-tinge-color)}.vxe-tips.theme--danger::after{background-color:var(--vxe-ui-status-danger-color)}.vxe-tips.theme--danger .vxe-tips--icon{color:var(--vxe-ui-status-danger-color)}.vxe-tips.theme--error{background-color:var(--vxe-ui-status-error-tinge-color)}.vxe-tips.theme--error::after{background-color:var(--vxe-ui-status-error-color)}.vxe-tips.theme--error .vxe-tips--icon{color:var(--vxe-ui-status-error-color)}.vxe-tips.size--medium{font-size:var(--vxe-ui-font-size-medium)}.vxe-tips.size--small{font-size:var(--vxe-ui-font-size-small)}.vxe-tips.size--mini{font-size:var(--vxe-ui-font-size-mini)}.vxe-tips--icon{flex-shrink:0;font-size:1.2em;line-height:2em;padding-right:var(--vxe-ui-layout-padding-half)}.vxe-tips--body{flex-grow:1}.vxe-tips--title{font-size:1.1em;line-height:2em;font-weight:700}
@@ -1,3 +0,0 @@
1
- import VxeTips from '../tips';
2
- export * from '../tips';
3
- export default VxeTips;
@@ -1 +0,0 @@
1
- .vxe-tips{position:relative;display:flex;flex-direction:row;color:var(--vxe-ui-font-color);margin-bottom:var(--vxe-ui-layout-padding-default);padding:var(--vxe-ui-layout-padding-default) var(--vxe-ui-layout-padding-double) var(--vxe-ui-layout-padding-double) var(--vxe-ui-layout-padding-double);font-size:var(--vxe-ui-font-size-default)}.vxe-tips::after{content:"";position:absolute;top:0;left:0;height:100%;width:5px;background-color:var(--vxe-ui-font-color);z-index:1}.vxe-tips.theme--primary{background-color:var(--vxe-ui-font-primary-tinge-color)}.vxe-tips.theme--primary::after{background-color:var(--vxe-ui-font-primary-color)}.vxe-tips.theme--primary .vxe-tips--icon{color:var(--vxe-ui-font-primary-color)}.vxe-tips.theme--success{background-color:var(--vxe-ui-status-success-tinge-color)}.vxe-tips.theme--success::after{background-color:var(--vxe-ui-status-success-color)}.vxe-tips.theme--success .vxe-tips--icon{color:var(--vxe-ui-status-success-color)}.vxe-tips.theme--info{background-color:var(--vxe-ui-status-info-tinge-color)}.vxe-tips.theme--info::after{background-color:var(--vxe-ui-status-info-color)}.vxe-tips.theme--info .vxe-tips--icon{color:var(--vxe-ui-status-info-color)}.vxe-tips.theme--warning{background-color:var(--vxe-ui-status-warning-tinge-color)}.vxe-tips.theme--warning::after{background-color:var(--vxe-ui-status-warning-color)}.vxe-tips.theme--warning .vxe-tips--icon{color:var(--vxe-ui-status-warning-color)}.vxe-tips.theme--danger{background-color:var(--vxe-ui-status-danger-tinge-color)}.vxe-tips.theme--danger::after{background-color:var(--vxe-ui-status-danger-color)}.vxe-tips.theme--danger .vxe-tips--icon{color:var(--vxe-ui-status-danger-color)}.vxe-tips.theme--error{background-color:var(--vxe-ui-status-error-tinge-color)}.vxe-tips.theme--error::after{background-color:var(--vxe-ui-status-error-color)}.vxe-tips.theme--error .vxe-tips--icon{color:var(--vxe-ui-status-error-color)}.vxe-tips.size--medium{font-size:var(--vxe-ui-font-size-medium)}.vxe-tips.size--small{font-size:var(--vxe-ui-font-size-small)}.vxe-tips.size--mini{font-size:var(--vxe-ui-font-size-mini)}.vxe-tips--icon{flex-shrink:0;font-size:1.2em;line-height:2em;padding-right:var(--vxe-ui-layout-padding-half)}.vxe-tips--body{flex-grow:1}.vxe-tips--title{font-size:1.1em;line-height:2em;font-weight:700}
package/lib/tips/index.js DELETED
@@ -1,17 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = exports.VxeTips = exports.Tips = void 0;
7
- var _tips = _interopRequireDefault(require("./src/tips"));
8
- var _dynamics = require("../dynamics");
9
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
10
- const VxeTips = exports.VxeTips = Object.assign({}, _tips.default, {
11
- install(app) {
12
- app.component(_tips.default.name, _tips.default);
13
- }
14
- });
15
- _dynamics.dynamicApp.component(_tips.default.name, _tips.default);
16
- const Tips = exports.Tips = VxeTips;
17
- var _default = exports.default = VxeTips;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.VxeTips=exports.Tips=void 0;var _tips=_interopRequireDefault(require("./src/tips")),_dynamics=require("../dynamics");function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const VxeTips=exports.VxeTips=Object.assign({},_tips.default,{install(e){e.component(_tips.default.name,_tips.default)}}),Tips=(_dynamics.dynamicApp.component(_tips.default.name,_tips.default),exports.Tips=VxeTips);var _default=exports.default=VxeTips;