vxe-pc-ui 4.9.19 → 4.9.21
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/README.en.md +2 -1
- package/README.ja-JP.md +2 -1
- package/README.md +2 -1
- package/README.zh-TW.md +2 -1
- package/es/button/src/button.js +6 -1
- 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/date-picker/src/date-picker.js +6 -1
- package/es/date-range-picker/src/date-range-picker.js +6 -1
- package/es/icon/style.css +1 -1
- package/es/image/src/group.js +7 -2
- package/es/image/src/image.js +3 -1
- package/es/image/src/preview.js +1 -0
- package/es/image/src/util.js +2 -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/pulldown/src/pulldown.js +10 -2
- package/es/select/src/select.js +6 -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/table-select/src/table-select.js +7 -2
- 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/tree-select/src/tree-select.js +6 -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/lib/button/src/button.js +7 -1
- package/lib/button/src/button.min.js +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/date-picker/src/date-picker.js +7 -1
- package/lib/date-picker/src/date-picker.min.js +1 -1
- package/lib/date-range-picker/src/date-range-picker.js +7 -1
- package/lib/date-range-picker/src/date-range-picker.min.js +1 -1
- package/lib/icon/style/style.css +1 -1
- package/lib/icon/style/style.min.css +1 -1
- package/lib/image/src/group.js +4 -1
- package/lib/image/src/group.min.js +1 -1
- package/lib/image/src/image.js +4 -1
- package/lib/image/src/image.min.js +1 -1
- package/lib/image/src/preview.js +1 -0
- package/lib/image/src/preview.min.js +1 -1
- package/lib/image/src/util.js +3 -1
- package/lib/image/src/util.min.js +1 -1
- package/lib/index.umd.js +103 -18
- 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/pulldown/src/pulldown.js +8 -2
- package/lib/pulldown/src/pulldown.min.js +1 -1
- package/lib/select/src/select.js +7 -1
- package/lib/select/src/select.min.js +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/table-select/src/table-select.js +8 -2
- package/lib/table-select/src/table-select.min.js +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/tree-select/src/tree-select.js +7 -1
- package/lib/tree-select/src/tree-select.min.js +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/package.json +1 -1
- package/packages/button/src/button.ts +5 -1
- package/packages/card/src/card.ts +10 -1
- package/packages/date-picker/src/date-picker.ts +5 -1
- package/packages/date-range-picker/src/date-range-picker.ts +5 -1
- package/packages/image/src/group.ts +7 -2
- package/packages/image/src/image.ts +3 -1
- package/packages/image/src/preview.ts +1 -0
- package/packages/image/src/util.ts +2 -1
- package/packages/pulldown/src/pulldown.ts +9 -2
- package/packages/select/src/select.ts +5 -1
- package/packages/split/src/split.ts +14 -3
- package/packages/table-select/src/table-select.ts +6 -2
- package/packages/tabs/src/tabs.ts +11 -1
- package/packages/tree-select/src/tree-select.ts +5 -1
- 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/theme/base.scss +9 -3
- package/types/components/button.d.ts +2 -0
- package/types/components/card.d.ts +3 -1
- package/types/components/date-picker.d.ts +2 -0
- package/types/components/date-range-picker.d.ts +2 -0
- package/types/components/image-group.d.ts +2 -0
- package/types/components/image-preview.d.ts +2 -0
- package/types/components/image.d.ts +2 -0
- package/types/components/pulldown.d.ts +2 -0
- package/types/components/select.d.ts +2 -0
- package/types/components/split.d.ts +3 -1
- package/types/components/table-select.d.ts +2 -0
- package/types/components/tabs.d.ts +3 -1
- package/types/components/tree-select.d.ts +2 -0
- /package/es/icon/{iconfont.1757242939473.ttf → iconfont.1757392046071.ttf} +0 -0
- /package/es/icon/{iconfont.1757242939473.woff → iconfont.1757392046071.woff} +0 -0
- /package/es/icon/{iconfont.1757242939473.woff2 → iconfont.1757392046071.woff2} +0 -0
- /package/es/{iconfont.1757242939473.ttf → iconfont.1757392046071.ttf} +0 -0
- /package/es/{iconfont.1757242939473.woff → iconfont.1757392046071.woff} +0 -0
- /package/es/{iconfont.1757242939473.woff2 → iconfont.1757392046071.woff2} +0 -0
- /package/lib/icon/style/{iconfont.1757242939473.ttf → iconfont.1757392046071.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1757242939473.woff → iconfont.1757392046071.woff} +0 -0
- /package/lib/icon/style/{iconfont.1757242939473.woff2 → iconfont.1757392046071.woff2} +0 -0
- /package/lib/{iconfont.1757242939473.ttf → iconfont.1757392046071.ttf} +0 -0
- /package/lib/{iconfont.1757242939473.woff → iconfont.1757392046071.woff} +0 -0
- /package/lib/{iconfont.1757242939473.woff2 → iconfont.1757392046071.woff2} +0 -0
|
@@ -48,6 +48,7 @@ export default defineVxeComponent({
|
|
|
48
48
|
},
|
|
49
49
|
form: String as PropType<VxeDateRangePickerPropTypes.Form>,
|
|
50
50
|
className: String as PropType<VxeDateRangePickerPropTypes.ClassName>,
|
|
51
|
+
zIndex: Number as PropType<VxeDateRangePickerPropTypes.ZIndex>,
|
|
51
52
|
size: {
|
|
52
53
|
type: String as PropType<VxeDateRangePickerPropTypes.Size>,
|
|
53
54
|
default: () => getConfig().dateRangePicker.size || getConfig().size
|
|
@@ -668,7 +669,10 @@ export default defineVxeComponent({
|
|
|
668
669
|
|
|
669
670
|
// 弹出面板
|
|
670
671
|
const updateZindex = () => {
|
|
671
|
-
|
|
672
|
+
const { zIndex } = props
|
|
673
|
+
if (zIndex) {
|
|
674
|
+
reactData.panelIndex = zIndex
|
|
675
|
+
} else if (reactData.panelIndex < getLastZIndex()) {
|
|
672
676
|
reactData.panelIndex = nextZIndex()
|
|
673
677
|
}
|
|
674
678
|
}
|
|
@@ -16,7 +16,11 @@ export default defineVxeComponent({
|
|
|
16
16
|
default: () => getConfig().imageGroup.showPreview
|
|
17
17
|
},
|
|
18
18
|
imageStyle: Object as PropType<VxeImageGroupPropTypes.ImageStyle>,
|
|
19
|
-
|
|
19
|
+
zIndex: Number as PropType<VxeImageGroupPropTypes.ZIndex>,
|
|
20
|
+
size: {
|
|
21
|
+
type: String as PropType<VxeImageGroupPropTypes.Size>,
|
|
22
|
+
default: () => getConfig().imageGroup.size || getConfig().size
|
|
23
|
+
},
|
|
20
24
|
toolbarConfig: Object as PropType<VxeImageGroupPropTypes.ToolbarConfig>,
|
|
21
25
|
showPrintButton: {
|
|
22
26
|
type: Boolean as PropType<VxeImageGroupPropTypes.ShowPrintButton>,
|
|
@@ -87,7 +91,7 @@ export default defineVxeComponent({
|
|
|
87
91
|
|
|
88
92
|
const imageGroupPrivateMethods: ImageGroupPrivateMethods = {
|
|
89
93
|
handleClickImgEvent (evnt, params) {
|
|
90
|
-
const { showPreview, toolbarConfig, showPrintButton, showDownloadButton } = props
|
|
94
|
+
const { showPreview, toolbarConfig, showPrintButton, showDownloadButton, zIndex } = props
|
|
91
95
|
const { url } = params
|
|
92
96
|
const imgList = computeImgList.value
|
|
93
97
|
if (showPreview && url) {
|
|
@@ -97,6 +101,7 @@ export default defineVxeComponent({
|
|
|
97
101
|
toolbarConfig,
|
|
98
102
|
showPrintButton,
|
|
99
103
|
showDownloadButton,
|
|
104
|
+
zIndex,
|
|
100
105
|
events: {
|
|
101
106
|
change (eventParams) {
|
|
102
107
|
$xeImageGroup.dispatchEvent('change', eventParams, eventParams.$event)
|
|
@@ -17,6 +17,7 @@ export default defineVxeComponent({
|
|
|
17
17
|
width: [String, Number] as PropType<VxeImagePropTypes.Width>,
|
|
18
18
|
height: [String, Number] as PropType<VxeImagePropTypes.Height>,
|
|
19
19
|
circle: Boolean as PropType<VxeImagePropTypes.Circle>,
|
|
20
|
+
zIndex: Number as PropType<VxeImagePropTypes.ZIndex>,
|
|
20
21
|
maskClosable: {
|
|
21
22
|
type: Boolean as PropType<VxeImagePropTypes.MaskClosable>,
|
|
22
23
|
default: () => getConfig().image.maskClosable
|
|
@@ -136,7 +137,7 @@ export default defineVxeComponent({
|
|
|
136
137
|
}
|
|
137
138
|
|
|
138
139
|
const clickEvent = (evnt: MouseEvent) => {
|
|
139
|
-
const { showPreview, toolbarConfig, showPrintButton, showDownloadButton, maskClosable } = props
|
|
140
|
+
const { showPreview, toolbarConfig, showPrintButton, showDownloadButton, maskClosable, zIndex } = props
|
|
140
141
|
const imgList = computeImgList.value
|
|
141
142
|
const imgUrl = computeImgUrl.value
|
|
142
143
|
if ($xeImageGroup) {
|
|
@@ -149,6 +150,7 @@ export default defineVxeComponent({
|
|
|
149
150
|
showPrintButton,
|
|
150
151
|
showDownloadButton,
|
|
151
152
|
maskClosable,
|
|
153
|
+
zIndex,
|
|
152
154
|
events: {
|
|
153
155
|
change (eventParams) {
|
|
154
156
|
$xeImage.dispatchEvent('change', eventParams, eventParams.$event)
|
|
@@ -31,6 +31,7 @@ export default defineVxeComponent({
|
|
|
31
31
|
type: Boolean as PropType<VxeImagePreviewPropTypes.ShowDownloadButton>,
|
|
32
32
|
default: () => getConfig().imagePreview.showDownloadButton
|
|
33
33
|
},
|
|
34
|
+
zIndex: Number as PropType<VxeImagePreviewPropTypes.ZIndex>,
|
|
34
35
|
toolbarConfig: Object as PropType<VxeImagePreviewPropTypes.ToolbarConfig>,
|
|
35
36
|
beforeDownloadMethod: Function as PropType<VxeImagePreviewPropTypes.BeforeDownloadMethod>,
|
|
36
37
|
downloadMethod: Function as PropType<VxeImagePreviewPropTypes.DownloadMethod>
|
|
@@ -10,7 +10,7 @@ export const openPreviewImage: VxeImageDefines.PreviewImageFunction = (options)
|
|
|
10
10
|
const opts = Object.assign({
|
|
11
11
|
escClosable: true
|
|
12
12
|
}, options)
|
|
13
|
-
const { urlList, activeIndex } = opts
|
|
13
|
+
const { urlList, activeIndex, zIndex } = opts
|
|
14
14
|
const { rotate, change } = opts.events || {}
|
|
15
15
|
const modalId = XEUtils.uniqueId('image-preview')
|
|
16
16
|
VxeUI.modal.open({
|
|
@@ -22,6 +22,7 @@ export const openPreviewImage: VxeImageDefines.PreviewImageFunction = (options)
|
|
|
22
22
|
showFooter: false,
|
|
23
23
|
padding: false,
|
|
24
24
|
escClosable: opts.escClosable,
|
|
25
|
+
zIndex,
|
|
25
26
|
className: 'vxe-image-preview-popup-wrapper',
|
|
26
27
|
slots: {
|
|
27
28
|
default () {
|
|
@@ -18,7 +18,11 @@ export default defineVxeComponent({
|
|
|
18
18
|
type: String as PropType<VxePulldownPropTypes.Trigger>,
|
|
19
19
|
default: getConfig().pulldown.trigger
|
|
20
20
|
},
|
|
21
|
-
|
|
21
|
+
zIndex: Number as PropType<VxePulldownPropTypes.ZIndex>,
|
|
22
|
+
size: {
|
|
23
|
+
type: String as PropType<VxePulldownPropTypes.Size>,
|
|
24
|
+
default: () => getConfig().pulldown.size || getConfig().size
|
|
25
|
+
},
|
|
22
26
|
options: Array as PropType<VxePulldownPropTypes.Options>,
|
|
23
27
|
className: {
|
|
24
28
|
type: [String, Function] as PropType<VxePulldownPropTypes.ClassName>,
|
|
@@ -103,7 +107,10 @@ export default defineVxeComponent({
|
|
|
103
107
|
let pulldownMethods = {} as PulldownMethods
|
|
104
108
|
|
|
105
109
|
const updateZindex = () => {
|
|
106
|
-
|
|
110
|
+
const { zIndex } = props
|
|
111
|
+
if (zIndex) {
|
|
112
|
+
reactData.panelIndex = zIndex
|
|
113
|
+
} else if (reactData.panelIndex < getLastZIndex()) {
|
|
107
114
|
reactData.panelIndex = nextZIndex()
|
|
108
115
|
}
|
|
109
116
|
}
|
|
@@ -82,6 +82,7 @@ export default defineVxeComponent({
|
|
|
82
82
|
type: [String, Number] as PropType<VxeSelectPropTypes.Max>,
|
|
83
83
|
default: null
|
|
84
84
|
},
|
|
85
|
+
zIndex: Number as PropType<VxeSelectPropTypes.ZIndex>,
|
|
85
86
|
size: {
|
|
86
87
|
type: String as PropType<VxeSelectPropTypes.Size>,
|
|
87
88
|
default: () => getConfig().select.size || getConfig().size
|
|
@@ -439,7 +440,10 @@ export default defineVxeComponent({
|
|
|
439
440
|
}
|
|
440
441
|
|
|
441
442
|
const updateZIndex = () => {
|
|
442
|
-
|
|
443
|
+
const { zIndex } = props
|
|
444
|
+
if (zIndex) {
|
|
445
|
+
reactData.panelIndex = zIndex
|
|
446
|
+
} else if (reactData.panelIndex < getLastZIndex()) {
|
|
443
447
|
reactData.panelIndex = nextZIndex()
|
|
444
448
|
}
|
|
445
449
|
}
|
|
@@ -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', {
|
|
@@ -41,9 +41,10 @@ export default defineVxeComponent({
|
|
|
41
41
|
columns: Array as PropType<VxeTableSelectPropTypes.Columns>,
|
|
42
42
|
options: Array as PropType<VxeTableSelectPropTypes.Options>,
|
|
43
43
|
optionProps: Object as PropType<VxeTableSelectPropTypes.OptionProps>,
|
|
44
|
+
zIndex: Number as PropType<VxeTableSelectPropTypes.ZIndex>,
|
|
44
45
|
size: {
|
|
45
46
|
type: String as PropType<VxeTableSelectPropTypes.Size>,
|
|
46
|
-
default: () => getConfig().
|
|
47
|
+
default: () => getConfig().tableSelect.size || getConfig().size
|
|
47
48
|
},
|
|
48
49
|
popupConfig: Object as PropType<VxeTableSelectPropTypes.PopupConfig>,
|
|
49
50
|
gridConfig: Object as PropType<VxeTableSelectPropTypes.GridConfig>,
|
|
@@ -349,7 +350,10 @@ export default defineVxeComponent({
|
|
|
349
350
|
}
|
|
350
351
|
|
|
351
352
|
const updateZindex = () => {
|
|
352
|
-
|
|
353
|
+
const { zIndex } = props
|
|
354
|
+
if (zIndex) {
|
|
355
|
+
reactData.panelIndex = zIndex
|
|
356
|
+
} else if (reactData.panelIndex < getLastZIndex()) {
|
|
353
357
|
reactData.panelIndex = nextZIndex()
|
|
354
358
|
}
|
|
355
359
|
}
|
|
@@ -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
|
}],
|
|
@@ -52,6 +52,7 @@ export default defineVxeComponent({
|
|
|
52
52
|
placement: String as PropType<VxeTreeSelectPropTypes.Placement>,
|
|
53
53
|
options: Array as PropType<VxeTreeSelectPropTypes.Options>,
|
|
54
54
|
optionProps: Object as PropType<VxeTreeSelectPropTypes.OptionProps>,
|
|
55
|
+
zIndex: Number as PropType<VxeTreeSelectPropTypes.ZIndex>,
|
|
55
56
|
size: {
|
|
56
57
|
type: String as PropType<VxeTreeSelectPropTypes.Size>,
|
|
57
58
|
default: () => getConfig().treeSelect.size || getConfig().size
|
|
@@ -356,7 +357,10 @@ export default defineVxeComponent({
|
|
|
356
357
|
}
|
|
357
358
|
|
|
358
359
|
const updateZindex = () => {
|
|
359
|
-
|
|
360
|
+
const { zIndex } = props
|
|
361
|
+
if (zIndex) {
|
|
362
|
+
reactData.panelIndex = zIndex
|
|
363
|
+
} else if (reactData.panelIndex < getLastZIndex()) {
|
|
360
364
|
reactData.panelIndex = nextZIndex()
|
|
361
365
|
}
|
|
362
366
|
}
|
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
|
}
|
|
@@ -590,7 +590,6 @@ $scrollbarOffsetSize: 20px;
|
|
|
590
590
|
}
|
|
591
591
|
&.pos--top,
|
|
592
592
|
&.pos--bottom {
|
|
593
|
-
height: var(--vxe-ui-tabs-header-height-default);
|
|
594
593
|
.vxe-tabs-header--item-wrapper {
|
|
595
594
|
flex-direction: row;
|
|
596
595
|
width: 100%;
|
|
@@ -684,21 +683,6 @@ $scrollbarOffsetSize: 20px;
|
|
|
684
683
|
}
|
|
685
684
|
}
|
|
686
685
|
|
|
687
|
-
.vxe-tabs {
|
|
688
|
-
.vxe-tabs-header--item-inner {
|
|
689
|
-
height: var(--vxe-ui-tabs-header-height-default);
|
|
690
|
-
}
|
|
691
|
-
.vxe-tabs-header--active-line {
|
|
692
|
-
&.type--card {
|
|
693
|
-
height: var(--vxe-ui-tabs-header-height-default);
|
|
694
|
-
}
|
|
695
|
-
&.type--border-card {
|
|
696
|
-
height: calc(var(--vxe-ui-tabs-header-height-default) + 1px);
|
|
697
|
-
line-height: calc(var(--vxe-ui-tabs-header-height-default) + 1px);
|
|
698
|
-
}
|
|
699
|
-
}
|
|
700
|
-
}
|
|
701
|
-
|
|
702
686
|
.vxe-tabs--default,
|
|
703
687
|
.vxe-tabs--card,
|
|
704
688
|
.vxe-tabs--border-card,
|
|
@@ -712,9 +696,44 @@ $scrollbarOffsetSize: 20px;
|
|
|
712
696
|
border-bottom: 2px solid transparent;
|
|
713
697
|
}
|
|
714
698
|
}
|
|
715
|
-
|
|
716
|
-
|
|
699
|
+
|
|
700
|
+
@mixin getTabsSizeStyle ($fontSize, $headHeight) {
|
|
701
|
+
font-size: $fontSize;
|
|
717
702
|
.vxe-tabs-header--item-inner {
|
|
718
|
-
height:
|
|
703
|
+
height: $headHeight;
|
|
704
|
+
}
|
|
705
|
+
.vxe-tabs-header--active-line {
|
|
706
|
+
&.type--card {
|
|
707
|
+
height: $headHeight;
|
|
708
|
+
}
|
|
709
|
+
&.type--border-card {
|
|
710
|
+
height: calc($headHeight + 1px);
|
|
711
|
+
line-height: calc($headHeight + 1px);
|
|
712
|
+
}
|
|
713
|
+
}
|
|
714
|
+
.vxe-tabs-header--wrapper {
|
|
715
|
+
&.pos--top,
|
|
716
|
+
&.pos--bottom {
|
|
717
|
+
height: $headHeight;
|
|
718
|
+
}
|
|
719
|
+
}
|
|
720
|
+
.vxe-tabs--card,
|
|
721
|
+
.vxe-tabs--round-card {
|
|
722
|
+
.vxe-tabs-header--item-inner {
|
|
723
|
+
height: calc($headHeight - 1px);
|
|
724
|
+
}
|
|
725
|
+
}
|
|
726
|
+
}
|
|
727
|
+
|
|
728
|
+
.vxe-tabs {
|
|
729
|
+
@include getTabsSizeStyle(var(--vxe-ui-font-size-default), var(--vxe-ui-tabs-header-height-default));
|
|
730
|
+
&.size--medium {
|
|
731
|
+
@include getTabsSizeStyle(var(--vxe-ui-font-size-medium), var(--vxe-ui-tabs-header-height-medium));
|
|
732
|
+
}
|
|
733
|
+
&.size--small {
|
|
734
|
+
@include getTabsSizeStyle(var(--vxe-ui-font-size-small), var(--vxe-ui-tabs-header-height-small));
|
|
735
|
+
}
|
|
736
|
+
&.size--mini {
|
|
737
|
+
@include getTabsSizeStyle(var(--vxe-ui-font-size-mini), var(--vxe-ui-tabs-header-height-mini));
|
|
719
738
|
}
|
|
720
739
|
}
|
package/styles/theme/base.scss
CHANGED
|
@@ -30,7 +30,10 @@
|
|
|
30
30
|
--vxe-ui-layout-aside-collapse-width: 60px;
|
|
31
31
|
|
|
32
32
|
/*menu*/
|
|
33
|
-
--vxe-ui-menu-item-height: 44px;
|
|
33
|
+
--vxe-ui-menu-item-height-default: 44px;
|
|
34
|
+
--vxe-ui-menu-item-height-medium: 40px;
|
|
35
|
+
--vxe-ui-menu-item-height-small: 36px;
|
|
36
|
+
--vxe-ui-menu-item-height-mini: 32px;
|
|
34
37
|
--vxe-ui-menu-icon-width: 1.5em;
|
|
35
38
|
|
|
36
39
|
/*button*/
|
|
@@ -160,7 +163,10 @@
|
|
|
160
163
|
--vxe-ui-upload-image-wh-mini: 72px;
|
|
161
164
|
|
|
162
165
|
/*card*/
|
|
163
|
-
--vxe-ui-card-padding: 12px;
|
|
166
|
+
--vxe-ui-card-padding-default: 12px;
|
|
167
|
+
--vxe-ui-card-padding-medium: 10px;
|
|
168
|
+
--vxe-ui-card-padding-small: 8px;
|
|
169
|
+
--vxe-ui-card-padding-mini: 6px;
|
|
164
170
|
|
|
165
171
|
/*tree*/
|
|
166
172
|
--vxe-ui-tree-node-height: 2em;
|
|
@@ -181,7 +187,7 @@
|
|
|
181
187
|
--vxe-ui-calendar-notice-selected-background-color: var(--vxe-ui-calendar-selected-color);
|
|
182
188
|
|
|
183
189
|
/*split*/
|
|
184
|
-
--vxe-ui-split-handle-bar-horizontal-width:
|
|
190
|
+
--vxe-ui-split-handle-bar-horizontal-width: 0.68em;
|
|
185
191
|
--vxe-ui-split-handle-bar-horizontal-height: 6.8em;
|
|
186
192
|
--vxe-ui-split-handle-bar-vertical-width: var(--vxe-ui-split-handle-bar-horizontal-height);
|
|
187
193
|
--vxe-ui-split-handle-bar-vertical-height: var(--vxe-ui-split-handle-bar-horizontal-width);
|
|
@@ -26,6 +26,7 @@ export interface VxeButtonPrivateRef extends ButtonPrivateRef { }
|
|
|
26
26
|
|
|
27
27
|
export namespace VxeButtonPropTypes {
|
|
28
28
|
export type Size = VxeComponentSizeType
|
|
29
|
+
export type ZIndex = number
|
|
29
30
|
export type Type = string
|
|
30
31
|
export type Mode = null | '' | 'button' | 'text'
|
|
31
32
|
export type ClassName = string | ((params: { $button: VxeButtonConstructor }) => string)
|
|
@@ -84,6 +85,7 @@ export namespace VxeButtonPropTypes {
|
|
|
84
85
|
|
|
85
86
|
export interface VxeButtonProps {
|
|
86
87
|
size?: VxeButtonPropTypes.Size
|
|
88
|
+
zIndex?: VxeButtonPropTypes.ZIndex
|
|
87
89
|
/**
|
|
88
90
|
* 按钮类型
|
|
89
91
|
*/
|