vxe-pc-ui 4.9.18 → 4.9.20
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.
- package/es/card/src/card.js +11 -2
- package/es/card/style.css +45 -10
- package/es/card/style.min.css +1 -1
- package/es/icon/style.css +1 -1
- package/es/list/style.css +13 -0
- package/es/list/style.min.css +1 -1
- package/es/menu/style.css +34 -8
- package/es/menu/style.min.css +1 -1
- package/es/select/style.css +0 -1
- package/es/select/style.min.css +1 -1
- package/es/split/src/split.js +13 -3
- package/es/split/style.css +13 -0
- package/es/split/style.min.css +1 -1
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/tabs/src/tabs.js +10 -1
- package/es/tabs/style.css +78 -16
- package/es/tabs/style.min.css +1 -1
- package/es/text/src/text.js +10 -3
- package/es/tooltip/src/tooltip.js +81 -12
- package/es/tooltip/style.css +8 -5
- package/es/tooltip/style.min.css +1 -1
- package/es/ui/index.js +1 -1
- package/es/ui/src/dom.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/es/vxe-card/style.css +45 -10
- package/es/vxe-card/style.min.css +1 -1
- package/es/vxe-list/style.css +13 -0
- package/es/vxe-list/style.min.css +1 -1
- package/es/vxe-menu/style.css +34 -8
- package/es/vxe-menu/style.min.css +1 -1
- package/es/vxe-select/style.css +0 -1
- package/es/vxe-select/style.min.css +1 -1
- package/es/vxe-split/style.css +13 -0
- package/es/vxe-split/style.min.css +1 -1
- package/es/vxe-tabs/style.css +78 -16
- package/es/vxe-tabs/style.min.css +1 -1
- package/es/vxe-tooltip/style.css +8 -5
- package/es/vxe-tooltip/style.min.css +1 -1
- package/lib/card/src/card.js +12 -1
- package/lib/card/src/card.min.js +1 -1
- package/lib/card/style/style.css +45 -10
- package/lib/card/style/style.min.css +1 -1
- package/lib/icon/style/style.css +1 -1
- package/lib/icon/style/style.min.css +1 -1
- package/lib/index.umd.js +140 -20
- package/lib/index.umd.min.js +1 -1
- package/lib/list/style/style.css +13 -0
- package/lib/list/style/style.min.css +1 -1
- package/lib/menu/style/style.css +34 -8
- package/lib/menu/style/style.min.css +1 -1
- package/lib/select/style/style.css +0 -1
- package/lib/select/style/style.min.css +1 -1
- package/lib/split/src/split.js +14 -2
- package/lib/split/src/split.min.js +1 -1
- package/lib/split/style/style.css +13 -0
- package/lib/split/style/style.min.css +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/tabs/src/tabs.js +11 -0
- package/lib/tabs/src/tabs.min.js +1 -1
- package/lib/tabs/style/style.css +78 -16
- package/lib/tabs/style/style.min.css +1 -1
- package/lib/text/src/text.js +12 -3
- package/lib/text/src/text.min.js +1 -1
- package/lib/tooltip/src/tooltip.js +87 -11
- package/lib/tooltip/src/tooltip.min.js +1 -1
- package/lib/tooltip/style/style.css +8 -5
- package/lib/tooltip/style/style.min.css +1 -1
- package/lib/ui/index.js +1 -1
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/dom.js +1 -1
- package/lib/ui/src/dom.min.js +1 -1
- package/lib/ui/src/log.js +1 -1
- package/lib/ui/src/log.min.js +1 -1
- package/lib/vxe-card/style/style.css +45 -10
- package/lib/vxe-card/style/style.min.css +1 -1
- package/lib/vxe-list/style/style.css +13 -0
- package/lib/vxe-list/style/style.min.css +1 -1
- package/lib/vxe-menu/style/style.css +34 -8
- package/lib/vxe-menu/style/style.min.css +1 -1
- package/lib/vxe-select/style/style.css +0 -1
- package/lib/vxe-select/style/style.min.css +1 -1
- package/lib/vxe-split/style/style.css +13 -0
- package/lib/vxe-split/style/style.min.css +1 -1
- package/lib/vxe-tabs/style/style.css +78 -16
- package/lib/vxe-tabs/style/style.min.css +1 -1
- package/lib/vxe-tooltip/style/style.css +8 -5
- package/lib/vxe-tooltip/style/style.min.css +1 -1
- package/package.json +1 -1
- package/packages/card/src/card.ts +10 -1
- package/packages/split/src/split.ts +14 -3
- package/packages/tabs/src/tabs.ts +11 -1
- package/packages/text/src/text.ts +11 -3
- package/packages/tooltip/src/tooltip.ts +90 -17
- package/packages/ui/src/dom.ts +1 -1
- package/styles/components/card.scss +65 -11
- package/styles/components/list.scss +13 -0
- package/styles/components/menu.scss +35 -8
- package/styles/components/select.scss +0 -2
- package/styles/components/split.scss +13 -0
- package/styles/components/tabs.scss +38 -19
- package/styles/components/tooltip.scss +8 -5
- package/styles/theme/base.scss +9 -3
- package/types/components/card.d.ts +3 -1
- package/types/components/split.d.ts +3 -1
- package/types/components/table.d.ts +10 -4
- package/types/components/tabs.d.ts +3 -1
- package/types/components/tooltip.d.ts +12 -0
- /package/es/icon/{iconfont.1757160944209.ttf → iconfont.1757386401857.ttf} +0 -0
- /package/es/icon/{iconfont.1757160944209.woff → iconfont.1757386401857.woff} +0 -0
- /package/es/icon/{iconfont.1757160944209.woff2 → iconfont.1757386401857.woff2} +0 -0
- /package/es/{iconfont.1757160944209.ttf → iconfont.1757386401857.ttf} +0 -0
- /package/es/{iconfont.1757160944209.woff → iconfont.1757386401857.woff} +0 -0
- /package/es/{iconfont.1757160944209.woff2 → iconfont.1757386401857.woff2} +0 -0
- /package/lib/icon/style/{iconfont.1757160944209.ttf → iconfont.1757386401857.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1757160944209.woff → iconfont.1757386401857.woff} +0 -0
- /package/lib/icon/style/{iconfont.1757160944209.woff2 → iconfont.1757386401857.woff2} +0 -0
- /package/lib/{iconfont.1757160944209.ttf → iconfont.1757386401857.ttf} +0 -0
- /package/lib/{iconfont.1757160944209.woff → iconfont.1757386401857.woff} +0 -0
- /package/lib/{iconfont.1757160944209.woff2 → iconfont.1757386401857.woff2} +0 -0
|
@@ -4,9 +4,7 @@
|
|
|
4
4
|
top: -100%;
|
|
5
5
|
left: -100%;
|
|
6
6
|
font-size: 12px;
|
|
7
|
-
max-width: 600px;
|
|
8
7
|
border-radius: var(--vxe-ui-base-border-radius);
|
|
9
|
-
padding: 8px 12px;
|
|
10
8
|
white-space: normal;
|
|
11
9
|
word-break: break-word;
|
|
12
10
|
box-shadow: 2px 2px 4px -2px rgba(0, 0, 0, 0.2);
|
|
@@ -17,7 +15,7 @@
|
|
|
17
15
|
pointer-events: none;
|
|
18
16
|
}
|
|
19
17
|
.vxe-tooltip--wrapper.is--visible {
|
|
20
|
-
display: block;
|
|
18
|
+
display: inline-block;
|
|
21
19
|
}
|
|
22
20
|
.vxe-tooltip--wrapper.is--arrow .vxe-tooltip--arrow {
|
|
23
21
|
display: block;
|
|
@@ -31,7 +29,12 @@
|
|
|
31
29
|
background-color: transparent;
|
|
32
30
|
}
|
|
33
31
|
.vxe-tooltip--wrapper .vxe-tooltip--content {
|
|
32
|
+
padding: 8px 12px;
|
|
33
|
+
max-width: 600px;
|
|
34
|
+
max-height: 800px;
|
|
34
35
|
white-space: pre-line;
|
|
36
|
+
border-radius: var(--vxe-ui-base-border-radius);
|
|
37
|
+
overflow: auto;
|
|
35
38
|
}
|
|
36
39
|
.vxe-tooltip--wrapper .vxe-tooltip--arrow {
|
|
37
40
|
display: none;
|
|
@@ -63,10 +66,10 @@
|
|
|
63
66
|
top: -6px;
|
|
64
67
|
}
|
|
65
68
|
.vxe-tooltip--wrapper.placement--bottom .vxe-tooltip--arrow {
|
|
66
|
-
top: -
|
|
69
|
+
top: -11px;
|
|
67
70
|
}
|
|
68
71
|
.vxe-tooltip--wrapper.placement--bottom .vxe-tooltip--arrow:before {
|
|
69
|
-
top: -
|
|
72
|
+
top: -3px;
|
|
70
73
|
}
|
|
71
74
|
|
|
72
75
|
.vxe-tooltip--wrapper.theme--light {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.vxe-tooltip--wrapper{display:none;position:absolute;top:-100%;left:-100%;font-size:12px;
|
|
1
|
+
.vxe-tooltip--wrapper{display:none;position:absolute;top:-100%;left:-100%;font-size:12px;border-radius:var(--vxe-ui-base-border-radius);white-space:normal;word-break:break-word;box-shadow:2px 2px 4px -2px rgba(0,0,0,.2);color:var(--vxe-ui-font-color);font-family:var(--vxe-ui-font-family)}.vxe-tooltip--wrapper:not(.is--enterable){pointer-events:none}.vxe-tooltip--wrapper.is--visible{display:inline-block}.vxe-tooltip--wrapper.is--arrow .vxe-tooltip--arrow{display:block}.vxe-tooltip--wrapper.is--enterable:after{content:"";position:absolute;left:0;width:100%;height:6px;background-color:transparent}.vxe-tooltip--wrapper .vxe-tooltip--content{padding:8px 12px;max-width:600px;max-height:800px;white-space:pre-line;border-radius:var(--vxe-ui-base-border-radius);overflow:auto}.vxe-tooltip--wrapper .vxe-tooltip--arrow{display:none;position:absolute;border-color:transparent;border-width:6px;border-style:solid;left:50%;transform:translateX(-6px)}.vxe-tooltip--wrapper .vxe-tooltip--arrow:before{content:"";position:absolute;border-color:transparent;border-width:5px;border-style:solid;left:-5px}.vxe-tooltip--wrapper.placement--top.is--enterable:after{bottom:-6px}.vxe-tooltip--wrapper.placement--top .vxe-tooltip--arrow{bottom:-11px}.vxe-tooltip--wrapper.placement--top .vxe-tooltip--arrow:before{top:-7px}.vxe-tooltip--wrapper.placement--bottom.is--enterable:after{top:-6px}.vxe-tooltip--wrapper.placement--bottom .vxe-tooltip--arrow{top:-11px}.vxe-tooltip--wrapper.placement--bottom .vxe-tooltip--arrow:before{top:-3px}.vxe-tooltip--wrapper.theme--light{background-color:var(--vxe-ui-layout-background-color);border:1px solid var(--vxe-ui-input-border-color)}.vxe-tooltip--wrapper.theme--light.placement--top .vxe-tooltip--arrow{border-top-color:var(--vxe-ui-input-border-color)}.vxe-tooltip--wrapper.theme--light.placement--top .vxe-tooltip--arrow:before{border-top-color:var(--vxe-ui-layout-background-color)}.vxe-tooltip--wrapper.theme--light.placement--bottom .vxe-tooltip--arrow{border-bottom-color:var(--vxe-ui-input-border-color)}.vxe-tooltip--wrapper.theme--light.placement--bottom .vxe-tooltip--arrow:before{border-bottom-color:var(--vxe-ui-layout-background-color)}.vxe-tooltip--wrapper.theme--dark{background:var(--vxe-ui-tooltip-dark-background-color);color:var(--vxe-ui-tooltip-dark-color)}.vxe-tooltip--wrapper.theme--dark.placement--top .vxe-tooltip--arrow{border-top-color:var(--vxe-ui-tooltip-dark-background-color)}.vxe-tooltip--wrapper.theme--dark.placement--top .vxe-tooltip--arrow:before{border-top-color:var(--vxe-ui-tooltip-dark-background-color)}.vxe-tooltip--wrapper.theme--dark.placement--bottom .vxe-tooltip--arrow{border-bottom-color:var(--vxe-ui-tooltip-dark-background-color)}.vxe-tooltip--wrapper.theme--dark.placement--bottom .vxe-tooltip--arrow:before{border-bottom-color:var(--vxe-ui-tooltip-dark-background-color)}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ref, h, reactive, PropType, computed } from 'vue'
|
|
2
2
|
import { defineVxeComponent } from '../../ui/src/comp'
|
|
3
3
|
import { getSlotVNs } from '../../ui/src/vn'
|
|
4
|
-
import { getConfig, createEvent, renderEmptyElement } from '../../ui'
|
|
4
|
+
import { getConfig, createEvent, useSize, renderEmptyElement } from '../../ui'
|
|
5
5
|
import { toCssUnit } from '../../ui/src/dom'
|
|
6
6
|
import VxeLoadingComponent from '../../loading/src/loading'
|
|
7
7
|
import XEUtils from 'xe-utils'
|
|
@@ -30,6 +30,10 @@ export default defineVxeComponent({
|
|
|
30
30
|
padding: {
|
|
31
31
|
type: Boolean as PropType<VxeCardPropTypes.Padding>,
|
|
32
32
|
default: () => getConfig().card.padding
|
|
33
|
+
},
|
|
34
|
+
size: {
|
|
35
|
+
type: String as PropType<VxeCardPropTypes.Size>,
|
|
36
|
+
default: () => getConfig().card.size || getConfig().size
|
|
33
37
|
}
|
|
34
38
|
},
|
|
35
39
|
emits: [
|
|
@@ -41,6 +45,8 @@ export default defineVxeComponent({
|
|
|
41
45
|
|
|
42
46
|
const refElem = ref<HTMLDivElement>()
|
|
43
47
|
|
|
48
|
+
const { computeSize } = useSize(props)
|
|
49
|
+
|
|
44
50
|
const reactData = reactive<CardReactData>({
|
|
45
51
|
})
|
|
46
52
|
|
|
@@ -61,6 +67,7 @@ export default defineVxeComponent({
|
|
|
61
67
|
})
|
|
62
68
|
|
|
63
69
|
const computeMaps: VxeCardPrivateComputed = {
|
|
70
|
+
computeSize
|
|
64
71
|
}
|
|
65
72
|
|
|
66
73
|
const $xeCard = {
|
|
@@ -95,11 +102,13 @@ export default defineVxeComponent({
|
|
|
95
102
|
const footerSlot = slots.footer
|
|
96
103
|
const leftSlot = slots.left
|
|
97
104
|
const rightSlot = slots.right
|
|
105
|
+
const vSize = computeSize.value
|
|
98
106
|
const cardStyle = computeCardStyle.value
|
|
99
107
|
|
|
100
108
|
return h('div', {
|
|
101
109
|
ref: refElem,
|
|
102
110
|
class: ['vxe-card', {
|
|
111
|
+
[`size--${vSize}`]: vSize,
|
|
103
112
|
'is--border': border,
|
|
104
113
|
'is--shadow': shadow,
|
|
105
114
|
'is--padding': padding
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PropType, ref, h, reactive, provide, VNode, computed, watch, nextTick, onMounted, onUnmounted, onActivated } from 'vue'
|
|
2
2
|
import { defineVxeComponent } from '../../ui/src/comp'
|
|
3
|
-
import { getConfig, getIcon, createEvent, globalEvents, globalResize, renderEmptyElement } from '../../ui'
|
|
3
|
+
import { getConfig, getIcon, createEvent, globalEvents, globalResize, useSize, renderEmptyElement } from '../../ui'
|
|
4
4
|
import { getSlotVNs } from '../../ui/src/vn'
|
|
5
5
|
import { toCssUnit, isScale, addClass, removeClass } from '../../ui/src/dom'
|
|
6
6
|
import { getGlobalDefaultConfig } from '../../ui/src/utils'
|
|
@@ -34,7 +34,11 @@ export default defineVxeComponent({
|
|
|
34
34
|
itemConfig: Object as PropType<VxeSplitPropTypes.ItemConfig>,
|
|
35
35
|
barConfig: Object as PropType<VxeSplitPropTypes.BarConfig>,
|
|
36
36
|
resizeConfig: Object as PropType<VxeSplitPropTypes.ResizeConfig>,
|
|
37
|
-
actionConfig: Object as PropType<VxeSplitPropTypes.ActionConfig
|
|
37
|
+
actionConfig: Object as PropType<VxeSplitPropTypes.ActionConfig>,
|
|
38
|
+
size: {
|
|
39
|
+
type: String as PropType<VxeSplitPropTypes.Size>,
|
|
40
|
+
default: () => getConfig().split.size || getConfig().size
|
|
41
|
+
}
|
|
38
42
|
},
|
|
39
43
|
emits: [
|
|
40
44
|
'action-dblclick',
|
|
@@ -53,6 +57,8 @@ export default defineVxeComponent({
|
|
|
53
57
|
const refBarInfoElem = ref<HTMLDivElement>()
|
|
54
58
|
const refResizableSplitTip = ref<HTMLDivElement>()
|
|
55
59
|
|
|
60
|
+
const { computeSize } = useSize(props)
|
|
61
|
+
|
|
56
62
|
const reactData = reactive<SplitReactData>({
|
|
57
63
|
staticItems: [],
|
|
58
64
|
itemList: [],
|
|
@@ -725,6 +731,7 @@ export default defineVxeComponent({
|
|
|
725
731
|
const renderItems = () => {
|
|
726
732
|
const { border, padding, resize, vertical } = props
|
|
727
733
|
const { itemList } = reactData
|
|
734
|
+
const vSize = computeSize.value
|
|
728
735
|
const resizeOpts = computeResizeOpts.value
|
|
729
736
|
const { immediate } = resizeOpts
|
|
730
737
|
const visibleItems = computeVisibleItems.value
|
|
@@ -766,6 +773,7 @@ export default defineVxeComponent({
|
|
|
766
773
|
h('div', {
|
|
767
774
|
itemid: id,
|
|
768
775
|
class: ['vxe-split-pane', vertical ? 'is--vertical' : 'is--horizontal', immediate ? 'is-resize--immediate' : 'is-resize--lazy', {
|
|
776
|
+
[`size--${vSize}`]: vSize,
|
|
769
777
|
'is--resize': resize,
|
|
770
778
|
'is--padding': padding,
|
|
771
779
|
'is--border': border,
|
|
@@ -799,6 +807,7 @@ export default defineVxeComponent({
|
|
|
799
807
|
|
|
800
808
|
const renderVN = () => {
|
|
801
809
|
const { vertical, width, height } = props
|
|
810
|
+
const vSize = computeSize.value
|
|
802
811
|
const resizeOpts = computeResizeOpts.value
|
|
803
812
|
const { immediate, showTip } = resizeOpts
|
|
804
813
|
const defaultSlot = slots.default
|
|
@@ -811,7 +820,9 @@ export default defineVxeComponent({
|
|
|
811
820
|
}
|
|
812
821
|
return h('div', {
|
|
813
822
|
ref: refElem,
|
|
814
|
-
class: ['vxe-split', vertical ? 'is--vertical' : 'is--horizontal', immediate ? 'is-resize--immediate' : 'is-resize--lazy'
|
|
823
|
+
class: ['vxe-split', vertical ? 'is--vertical' : 'is--horizontal', immediate ? 'is-resize--immediate' : 'is-resize--lazy', {
|
|
824
|
+
[`size--${vSize}`]: vSize
|
|
825
|
+
}],
|
|
815
826
|
style: stys
|
|
816
827
|
}, [
|
|
817
828
|
h('div', {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ref, h, reactive, inject, PropType, provide, computed, onUnmounted, watch, nextTick, onMounted } from 'vue'
|
|
2
2
|
import { defineVxeComponent } from '../../ui/src/comp'
|
|
3
|
-
import { createEvent, getConfig, getIcon, globalEvents, permission, renderEmptyElement } from '../../ui'
|
|
3
|
+
import { createEvent, getConfig, getIcon, globalEvents, permission, useSize, renderEmptyElement } from '../../ui'
|
|
4
4
|
import { getSlotVNs } from '../../ui/src/vn'
|
|
5
5
|
import { toCssUnit, addClass, removeClass } from '../../ui/src/dom'
|
|
6
6
|
import { isEnableConf } from '../../ui/src/utils'
|
|
@@ -43,6 +43,10 @@ export default defineVxeComponent({
|
|
|
43
43
|
beforeChangeMethod: Function as PropType<VxeTabsPropTypes.BeforeChangeMethod>,
|
|
44
44
|
closeConfig: Object as PropType<VxeTabsPropTypes.CloseConfig>,
|
|
45
45
|
refreshConfig: Object as PropType<VxeTabsPropTypes.RefreshConfig>,
|
|
46
|
+
size: {
|
|
47
|
+
type: String as PropType<VxeTabsPropTypes.Size>,
|
|
48
|
+
default: () => getConfig().tabs.size || getConfig().size
|
|
49
|
+
},
|
|
46
50
|
// 已废弃
|
|
47
51
|
beforeCloseMethod: Function as PropType<VxeTabsPropTypes.BeforeCloseMethod>
|
|
48
52
|
},
|
|
@@ -63,6 +67,8 @@ export default defineVxeComponent({
|
|
|
63
67
|
|
|
64
68
|
const $xeParentTabs = inject<(VxeTabsConstructor & VxeTabsPrivateMethods) | null>('$xeTabs', null)
|
|
65
69
|
|
|
70
|
+
const { computeSize } = useSize(props)
|
|
71
|
+
|
|
66
72
|
const refElem = ref<HTMLDivElement>()
|
|
67
73
|
const refHeadWrapperElem = ref<HTMLDivElement>()
|
|
68
74
|
const refHeadPrevElem = ref<HTMLDivElement>()
|
|
@@ -776,6 +782,7 @@ export default defineVxeComponent({
|
|
|
776
782
|
const rendetTabBody = (tabList: VxeTabsPropTypes.Options | VxeTabPaneDefines.TabConfig[]) => {
|
|
777
783
|
const { height, padding, showBody } = props
|
|
778
784
|
const { activeName, cacheTabMaps } = reactData
|
|
785
|
+
const vSize = computeSize.value
|
|
779
786
|
const tabType = computeTabType.value
|
|
780
787
|
const tabPosition = computeTabPosition.value
|
|
781
788
|
const refreshOpts = computeRefreshOpts.value
|
|
@@ -801,6 +808,7 @@ export default defineVxeComponent({
|
|
|
801
808
|
: renderEmptyElement($xeTabs),
|
|
802
809
|
h('div', {
|
|
803
810
|
class: ['vxe-tabs-pane--body', `type--${tabType}`, `pos--${tabPosition}`, {
|
|
811
|
+
[`size--${vSize}`]: vSize,
|
|
804
812
|
'is--padding': padding,
|
|
805
813
|
'is--height': height
|
|
806
814
|
}]
|
|
@@ -822,6 +830,7 @@ export default defineVxeComponent({
|
|
|
822
830
|
const renderVN = () => {
|
|
823
831
|
const { height, padding, trigger } = props
|
|
824
832
|
const { activeName } = reactData
|
|
833
|
+
const vSize = computeSize.value
|
|
825
834
|
const tabOptions = computeTabOptions.value
|
|
826
835
|
const tabStaticOptions = computeTabStaticOptions.value
|
|
827
836
|
const tabType = computeTabType.value
|
|
@@ -852,6 +861,7 @@ export default defineVxeComponent({
|
|
|
852
861
|
return h('div', {
|
|
853
862
|
ref: refElem,
|
|
854
863
|
class: ['vxe-tabs', `pos--${tabPosition}`, `vxe-tabs--${tabType}`, `trigger--${trigger === 'manual' ? 'trigger' : 'default'}`, {
|
|
864
|
+
[`size--${vSize}`]: vSize,
|
|
855
865
|
'is--padding': padding,
|
|
856
866
|
'is--height': height
|
|
857
867
|
}],
|
|
@@ -125,6 +125,13 @@ export default defineVxeComponent({
|
|
|
125
125
|
}
|
|
126
126
|
}
|
|
127
127
|
|
|
128
|
+
const dblclickEvent = (evnt : MouseEvent) => {
|
|
129
|
+
const { loading } = props
|
|
130
|
+
if (!loading) {
|
|
131
|
+
dispatchEvent('dblclick', {}, evnt)
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
128
135
|
const prefixEvent = (evnt : MouseEvent) => {
|
|
129
136
|
const { loading } = props
|
|
130
137
|
if (!loading) {
|
|
@@ -202,7 +209,9 @@ export default defineVxeComponent({
|
|
|
202
209
|
h('span', {
|
|
203
210
|
key: 'ct',
|
|
204
211
|
ref: refContentElem,
|
|
205
|
-
class: 'vxe-text--content'
|
|
212
|
+
class: 'vxe-text--content',
|
|
213
|
+
onClick: clickEvent,
|
|
214
|
+
onDblclick: dblclickEvent
|
|
206
215
|
}, defaultSlot ? defaultSlot({}) : XEUtils.toValueString(content))
|
|
207
216
|
)
|
|
208
217
|
if (suffixIcon) {
|
|
@@ -237,8 +246,7 @@ export default defineVxeComponent({
|
|
|
237
246
|
[`theme--${status}`]: status,
|
|
238
247
|
'is--copy': clickToCopy,
|
|
239
248
|
'is--loading': loading
|
|
240
|
-
}]
|
|
241
|
-
onClick: clickEvent
|
|
249
|
+
}]
|
|
242
250
|
}, renderContent())
|
|
243
251
|
}
|
|
244
252
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { h, ref,
|
|
1
|
+
import { h, ref, nextTick, onBeforeUnmount, onMounted, computed, reactive, watch, PropType, VNode } from 'vue'
|
|
2
2
|
import { defineVxeComponent } from '../../ui/src/comp'
|
|
3
3
|
import XEUtils from 'xe-utils'
|
|
4
4
|
import { getConfig, createEvent, useSize } from '../../ui'
|
|
5
5
|
import { getLastZIndex, nextZIndex } from '../../ui/src/utils'
|
|
6
|
-
import { getAbsolutePos, getDomNode } from '../../ui/src/dom'
|
|
6
|
+
import { getAbsolutePos, getDomNode, toCssUnit } from '../../ui/src/dom'
|
|
7
7
|
import { getSlotVNs } from '../../ui/src/vn'
|
|
8
8
|
|
|
9
|
-
import type { VxeTooltipPropTypes, VxeTooltipConstructor, VxeTooltipEmits, TooltipInternalData, TooltipReactData, TooltipMethods, TooltipPrivateRef } from '../../../types'
|
|
9
|
+
import type { VxeTooltipPropTypes, VxeTooltipConstructor, VxeTooltipEmits, TooltipInternalData, TooltipReactData, TooltipMethods, TooltipPrivateRef, VxeComponentStyleType } from '../../../types'
|
|
10
10
|
|
|
11
11
|
export default defineVxeComponent({
|
|
12
12
|
name: 'VxeTooltip',
|
|
@@ -32,6 +32,30 @@ export default defineVxeComponent({
|
|
|
32
32
|
useHTML: Boolean as PropType<VxeTooltipPropTypes.UseHTML>,
|
|
33
33
|
zIndex: [String, Number] as PropType<VxeTooltipPropTypes.ZIndex>,
|
|
34
34
|
popupClassName: [String, Function] as PropType<VxeTooltipPropTypes.PopupClassName>,
|
|
35
|
+
width: {
|
|
36
|
+
type: [String, Number] as PropType<VxeTooltipPropTypes.Width>,
|
|
37
|
+
default: () => getConfig().tooltip.Width
|
|
38
|
+
},
|
|
39
|
+
height: {
|
|
40
|
+
type: [String, Number] as PropType<VxeTooltipPropTypes.Height>,
|
|
41
|
+
default: () => getConfig().tooltip.height
|
|
42
|
+
},
|
|
43
|
+
minWidth: {
|
|
44
|
+
type: [String, Number] as PropType<VxeTooltipPropTypes.MinWidth>,
|
|
45
|
+
default: () => getConfig().tooltip.minWidth
|
|
46
|
+
},
|
|
47
|
+
minHeight: {
|
|
48
|
+
type: [String, Number] as PropType<VxeTooltipPropTypes.MinHeight>,
|
|
49
|
+
default: () => getConfig().tooltip.minHeight
|
|
50
|
+
},
|
|
51
|
+
maxWidth: {
|
|
52
|
+
type: [String, Number] as PropType<VxeTooltipPropTypes.MaxWidth>,
|
|
53
|
+
default: () => getConfig().tooltip.maxWidth
|
|
54
|
+
},
|
|
55
|
+
maxHeight: {
|
|
56
|
+
type: [String, Number] as PropType<VxeTooltipPropTypes.MaxHeight>,
|
|
57
|
+
default: () => getConfig().tooltip.maxHeight
|
|
58
|
+
},
|
|
35
59
|
isArrow: {
|
|
36
60
|
type: Boolean as PropType<VxeTooltipPropTypes.IsArrow>,
|
|
37
61
|
default: () => getConfig().tooltip.isArrow
|
|
@@ -77,7 +101,32 @@ export default defineVxeComponent({
|
|
|
77
101
|
const internalData: TooltipInternalData = {
|
|
78
102
|
}
|
|
79
103
|
|
|
80
|
-
const refElem = ref
|
|
104
|
+
const refElem = ref<HTMLDivElement>()
|
|
105
|
+
const contentWrapperfElem = ref<HTMLDivElement>()
|
|
106
|
+
|
|
107
|
+
const computeWrapperStyle = computed(() => {
|
|
108
|
+
const { width, height, minHeight, minWidth, maxHeight, maxWidth } = props
|
|
109
|
+
const stys: VxeComponentStyleType = {}
|
|
110
|
+
if (width) {
|
|
111
|
+
stys.width = toCssUnit(width)
|
|
112
|
+
}
|
|
113
|
+
if (height) {
|
|
114
|
+
stys.height = toCssUnit(height)
|
|
115
|
+
}
|
|
116
|
+
if (minWidth) {
|
|
117
|
+
stys.minWidth = toCssUnit(minWidth)
|
|
118
|
+
}
|
|
119
|
+
if (minHeight) {
|
|
120
|
+
stys.minHeight = toCssUnit(minHeight)
|
|
121
|
+
}
|
|
122
|
+
if (maxWidth) {
|
|
123
|
+
stys.maxWidth = toCssUnit(maxWidth)
|
|
124
|
+
}
|
|
125
|
+
if (maxHeight) {
|
|
126
|
+
stys.maxHeight = toCssUnit(maxHeight)
|
|
127
|
+
}
|
|
128
|
+
return stys
|
|
129
|
+
})
|
|
81
130
|
|
|
82
131
|
const refMaps: TooltipPrivateRef = {
|
|
83
132
|
refElem
|
|
@@ -100,6 +149,9 @@ export default defineVxeComponent({
|
|
|
100
149
|
const { scrollTop, scrollLeft, visibleWidth } = getDomNode()
|
|
101
150
|
const { top, left } = getAbsolutePos(tipTarget)
|
|
102
151
|
const el = refElem.value
|
|
152
|
+
if (!el) {
|
|
153
|
+
return
|
|
154
|
+
}
|
|
103
155
|
const marginSize = 6
|
|
104
156
|
const offsetHeight = el.offsetHeight
|
|
105
157
|
const offsetWidth = el.offsetWidth
|
|
@@ -276,29 +328,42 @@ export default defineVxeComponent({
|
|
|
276
328
|
}
|
|
277
329
|
}
|
|
278
330
|
|
|
331
|
+
const wheelEvent = (evnt: Event) => {
|
|
332
|
+
evnt.stopPropagation()
|
|
333
|
+
}
|
|
334
|
+
|
|
279
335
|
Object.assign($xeTooltip, tooltipMethods)
|
|
280
336
|
|
|
281
337
|
const renderContent = () => {
|
|
282
338
|
const { useHTML } = props
|
|
283
339
|
const { tipContent } = reactData
|
|
340
|
+
const wrapperStyle = computeWrapperStyle.value
|
|
284
341
|
const contentSlot = slots.content
|
|
342
|
+
const contVNs: VNode[] = []
|
|
285
343
|
if (contentSlot) {
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
if (useHTML) {
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
344
|
+
contVNs.push(
|
|
345
|
+
h('div', {
|
|
346
|
+
key: 1
|
|
347
|
+
}, getSlotVNs(contentSlot({})))
|
|
348
|
+
)
|
|
349
|
+
} else if (useHTML) {
|
|
350
|
+
contVNs.push(
|
|
351
|
+
h('div', {
|
|
352
|
+
key: 2,
|
|
353
|
+
innerHTML: tipContent
|
|
354
|
+
})
|
|
355
|
+
)
|
|
356
|
+
} else {
|
|
357
|
+
contVNs.push(h('span', {
|
|
358
|
+
key: 3
|
|
359
|
+
}, `${tipContent}`))
|
|
297
360
|
}
|
|
298
361
|
return h('div', {
|
|
299
362
|
key: 3,
|
|
300
|
-
|
|
301
|
-
|
|
363
|
+
ref: contentWrapperfElem,
|
|
364
|
+
class: 'vxe-tooltip--content',
|
|
365
|
+
style: wrapperStyle
|
|
366
|
+
}, contVNs)
|
|
302
367
|
}
|
|
303
368
|
|
|
304
369
|
const renderVN = () => {
|
|
@@ -355,6 +420,10 @@ export default defineVxeComponent({
|
|
|
355
420
|
})
|
|
356
421
|
|
|
357
422
|
onMounted(() => {
|
|
423
|
+
const contentWrapperfEl = contentWrapperfElem.value
|
|
424
|
+
if (contentWrapperfEl) {
|
|
425
|
+
contentWrapperfEl.addEventListener('wheel', wheelEvent, { passive: false })
|
|
426
|
+
}
|
|
358
427
|
nextTick(() => {
|
|
359
428
|
const { trigger, content } = props
|
|
360
429
|
const wrapperElem = refElem.value
|
|
@@ -397,6 +466,10 @@ export default defineVxeComponent({
|
|
|
397
466
|
target.onmouseleave = null
|
|
398
467
|
target.onclick = null
|
|
399
468
|
}
|
|
469
|
+
const contentWrapperfEl = contentWrapperfElem.value
|
|
470
|
+
if (contentWrapperfEl) {
|
|
471
|
+
contentWrapperfEl.removeEventListener('wheel', wheelEvent)
|
|
472
|
+
}
|
|
400
473
|
if (wrapperElem) {
|
|
401
474
|
const parentNode = wrapperElem.parentNode
|
|
402
475
|
if (parentNode) {
|
package/packages/ui/src/dom.ts
CHANGED
|
@@ -169,7 +169,7 @@ export function updatePanelPlacement (targetElem: HTMLElement | null | undefined
|
|
|
169
169
|
teleportTo?: boolean
|
|
170
170
|
marginSize?: number
|
|
171
171
|
}) {
|
|
172
|
-
const { placement, teleportTo, marginSize } = Object.assign({ teleportTo: false, marginSize:
|
|
172
|
+
const { placement, teleportTo, marginSize } = Object.assign({ teleportTo: false, marginSize: 18 }, options)
|
|
173
173
|
let panelPlacement: 'top' | 'bottom' = 'bottom'
|
|
174
174
|
let top: number | '' = ''
|
|
175
175
|
let bottom: number | '' = ''
|
|
@@ -10,13 +10,6 @@
|
|
|
10
10
|
&.is--shadow {
|
|
11
11
|
box-shadow: var(--vxe-ui-base-popup-box-shadow);
|
|
12
12
|
}
|
|
13
|
-
&.is--padding {
|
|
14
|
-
.vxe-card--body-content,
|
|
15
|
-
.vxe-card--body-left,
|
|
16
|
-
.vxe-card--body-right {
|
|
17
|
-
padding: var(--vxe-ui-card-padding);
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
13
|
&.is--border {
|
|
21
14
|
border: 1px solid var(--vxe-ui-input-border-color);
|
|
22
15
|
.vxe-card--header {
|
|
@@ -35,10 +28,6 @@
|
|
|
35
28
|
.vxe-card--header {
|
|
36
29
|
flex-shrink: 0;
|
|
37
30
|
}
|
|
38
|
-
.vxe-card--header,
|
|
39
|
-
.vxe-card--footer {
|
|
40
|
-
padding: var(--vxe-ui-card-padding);
|
|
41
|
-
}
|
|
42
31
|
.vxe-card--body {
|
|
43
32
|
overflow: hidden;
|
|
44
33
|
flex-grow: 1;
|
|
@@ -66,3 +55,68 @@
|
|
|
66
55
|
white-space: nowrap;
|
|
67
56
|
}
|
|
68
57
|
}
|
|
58
|
+
|
|
59
|
+
.vxe-card {
|
|
60
|
+
font-size: var(--vxe-ui-font-size-default);
|
|
61
|
+
& > .vxe-card--header,
|
|
62
|
+
& > .vxe-card--footer {
|
|
63
|
+
padding: var(--vxe-ui-card-padding-default);
|
|
64
|
+
}
|
|
65
|
+
&.is--padding {
|
|
66
|
+
& > .vxe-card--body {
|
|
67
|
+
.vxe-card--body-content,
|
|
68
|
+
.vxe-card--body-left,
|
|
69
|
+
.vxe-card--body-right {
|
|
70
|
+
padding: var(--vxe-ui-card-padding-default);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
&.size--medium {
|
|
75
|
+
font-size: var(--vxe-ui-font-size-medium);
|
|
76
|
+
& > .vxe-card--header,
|
|
77
|
+
& > .vxe-card--footer {
|
|
78
|
+
padding: var(--vxe-ui-card-padding-medium);
|
|
79
|
+
}
|
|
80
|
+
&.is--padding {
|
|
81
|
+
& > .vxe-card--body {
|
|
82
|
+
.vxe-card--body-content,
|
|
83
|
+
.vxe-card--body-left,
|
|
84
|
+
.vxe-card--body-right {
|
|
85
|
+
padding: var(--vxe-ui-card-padding-medium);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
&.size--small {
|
|
91
|
+
font-size: var(--vxe-ui-font-size-small);
|
|
92
|
+
& > .vxe-card--header,
|
|
93
|
+
& > .vxe-card--footer {
|
|
94
|
+
padding: var(--vxe-ui-card-padding-small);
|
|
95
|
+
}
|
|
96
|
+
&.is--padding {
|
|
97
|
+
& > .vxe-card--body {
|
|
98
|
+
.vxe-card--body-content,
|
|
99
|
+
.vxe-card--body-left,
|
|
100
|
+
.vxe-card--body-right {
|
|
101
|
+
padding: var(--vxe-ui-card-padding-small);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
&.size--mini {
|
|
107
|
+
font-size: var(--vxe-ui-font-size-mini);
|
|
108
|
+
& > .vxe-card--header,
|
|
109
|
+
& > .vxe-card--footer {
|
|
110
|
+
padding: var(--vxe-ui-card-padding-mini);
|
|
111
|
+
}
|
|
112
|
+
&.is--padding {
|
|
113
|
+
& > .vxe-card--body {
|
|
114
|
+
.vxe-card--body-content,
|
|
115
|
+
.vxe-card--body-left,
|
|
116
|
+
.vxe-card--body-right {
|
|
117
|
+
padding: var(--vxe-ui-card-padding-mini);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
@@ -25,4 +25,17 @@
|
|
|
25
25
|
|
|
26
26
|
.vxe-list--virtual-wrapper {
|
|
27
27
|
height: 100px;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.vxe-list {
|
|
31
|
+
font-size: var(--vxe-ui-font-size-default);
|
|
32
|
+
&.size--medium {
|
|
33
|
+
font-size: var(--vxe-ui-font-size-medium);
|
|
34
|
+
}
|
|
35
|
+
&.size--small {
|
|
36
|
+
font-size: var(--vxe-ui-font-size-small);
|
|
37
|
+
}
|
|
38
|
+
&.size--mini {
|
|
39
|
+
font-size: var(--vxe-ui-font-size-mini);
|
|
40
|
+
}
|
|
28
41
|
}
|
|
@@ -13,9 +13,7 @@
|
|
|
13
13
|
min-height: 4em;
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
|
-
.vxe-menu
|
|
17
|
-
.vxe-menu--collapse-wrapper {
|
|
18
|
-
font-size: var(--vxe-ui-font-size-default);
|
|
16
|
+
.vxe-menu {
|
|
19
17
|
color: var(--vxe-ui-font-color);
|
|
20
18
|
font-family: var(--vxe-ui-font-family);
|
|
21
19
|
background-color: var(--vxe-ui-layout-background-color);
|
|
@@ -45,7 +43,6 @@
|
|
|
45
43
|
display: flex;
|
|
46
44
|
flex-direction: row;
|
|
47
45
|
align-items: center;
|
|
48
|
-
height: var(--vxe-ui-menu-item-height);
|
|
49
46
|
color: var(--vxe-ui-font-color);
|
|
50
47
|
text-decoration: none;
|
|
51
48
|
user-select: none;
|
|
@@ -96,10 +93,6 @@
|
|
|
96
93
|
}
|
|
97
94
|
}
|
|
98
95
|
|
|
99
|
-
.vxe-menu--item-level3 {
|
|
100
|
-
font-size: 13px;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
96
|
.vxe-menu--item-group {
|
|
104
97
|
display: none;
|
|
105
98
|
}
|
|
@@ -121,3 +114,37 @@
|
|
|
121
114
|
}
|
|
122
115
|
}
|
|
123
116
|
}
|
|
117
|
+
|
|
118
|
+
.vxe-menu--item-level3 {
|
|
119
|
+
font-size: 13px;
|
|
120
|
+
}
|
|
121
|
+
.vxe-menu--item-link {
|
|
122
|
+
height: var(--vxe-ui-menu-item-height-default);
|
|
123
|
+
}
|
|
124
|
+
.vxe-menu {
|
|
125
|
+
font-size: var(--vxe-ui-font-size-default);
|
|
126
|
+
&.size--medium {
|
|
127
|
+
font-size: var(--vxe-ui-font-size-medium);
|
|
128
|
+
.vxe-menu--item-link {
|
|
129
|
+
height: var(--vxe-ui-menu-item-height-medium);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
&.size--small {
|
|
133
|
+
font-size: var(--vxe-ui-font-size-small);
|
|
134
|
+
.vxe-menu--item-link {
|
|
135
|
+
height: var(--vxe-ui-menu-item-height-small);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
&.size--mini {
|
|
139
|
+
font-size: var(--vxe-ui-font-size-mini);
|
|
140
|
+
.vxe-menu--item-link {
|
|
141
|
+
height: var(--vxe-ui-menu-item-height-mini);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
&.size--small,
|
|
145
|
+
&.size--mini {
|
|
146
|
+
.vxe-menu--item-level3 {
|
|
147
|
+
font-size: 12px;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
@@ -299,4 +299,17 @@
|
|
|
299
299
|
& > .vxe-split {
|
|
300
300
|
height: 100%;
|
|
301
301
|
}
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
.vxe-split {
|
|
305
|
+
font-size: var(--vxe-ui-font-size-default);
|
|
306
|
+
&.size--medium {
|
|
307
|
+
font-size: var(--vxe-ui-font-size-medium);
|
|
308
|
+
}
|
|
309
|
+
&.size--small {
|
|
310
|
+
font-size: var(--vxe-ui-font-size-small);
|
|
311
|
+
}
|
|
312
|
+
&.size--mini {
|
|
313
|
+
font-size: var(--vxe-ui-font-size-mini);
|
|
314
|
+
}
|
|
302
315
|
}
|