vxe-pc-ui 4.11.44 → 4.11.45
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/button/src/button.js +18 -6
- package/es/date-picker/src/date-picker.js +17 -5
- package/es/date-range-picker/src/date-range-picker.js +17 -5
- package/es/icon/style.css +1 -1
- package/es/icon-picker/src/icon-picker.js +36 -74
- package/es/pulldown/src/pulldown.js +26 -6
- package/es/select/src/select.js +21 -7
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table-select/src/table-select.js +17 -7
- package/es/tree-select/src/tree-select.js +21 -7
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/button/src/button.js +18 -9
- package/lib/button/src/button.min.js +1 -1
- package/lib/date-picker/src/date-picker.js +19 -7
- package/lib/date-picker/src/date-picker.min.js +1 -1
- package/lib/date-range-picker/src/date-range-picker.js +19 -7
- 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/icon-picker/src/icon-picker.js +39 -80
- package/lib/icon-picker/src/icon-picker.min.js +1 -1
- package/lib/index.umd.js +185 -146
- package/lib/index.umd.min.js +1 -1
- package/lib/pulldown/src/pulldown.js +26 -9
- package/lib/pulldown/src/pulldown.min.js +1 -1
- package/lib/select/src/select.js +22 -10
- package/lib/select/src/select.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table-select/src/table-select.js +18 -12
- package/lib/table-select/src/table-select.min.js +1 -1
- package/lib/tree-select/src/tree-select.js +22 -10
- 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/log.js +1 -1
- package/lib/ui/src/log.min.js +1 -1
- package/package.json +1 -1
- package/packages/button/src/button.ts +19 -6
- package/packages/date-picker/src/date-picker.ts +18 -5
- package/packages/date-range-picker/src/date-range-picker.ts +18 -5
- package/packages/icon-picker/src/icon-picker.ts +37 -71
- package/packages/pulldown/src/pulldown.ts +27 -6
- package/packages/select/src/select.ts +21 -7
- package/packages/table-select/src/table-select.ts +17 -7
- package/packages/tree-select/src/tree-select.ts +21 -7
- package/types/components/button.d.ts +18 -0
- package/types/components/date-picker.d.ts +8 -0
- package/types/components/date-range-picker.d.ts +8 -0
- package/types/components/icon-picker.d.ts +24 -0
- package/types/components/pulldown.d.ts +28 -0
- package/types/components/select.d.ts +26 -0
- package/types/components/table-select.d.ts +16 -1
- package/types/components/tree-select.d.ts +20 -2
- /package/es/icon/{iconfont.1768284745337.ttf → iconfont.1768381374840.ttf} +0 -0
- /package/es/icon/{iconfont.1768284745337.woff → iconfont.1768381374840.woff} +0 -0
- /package/es/icon/{iconfont.1768284745337.woff2 → iconfont.1768381374840.woff2} +0 -0
- /package/es/{iconfont.1768284745337.ttf → iconfont.1768381374840.ttf} +0 -0
- /package/es/{iconfont.1768284745337.woff → iconfont.1768381374840.woff} +0 -0
- /package/es/{iconfont.1768284745337.woff2 → iconfont.1768381374840.woff2} +0 -0
- /package/lib/icon/style/{iconfont.1768284745337.ttf → iconfont.1768381374840.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1768284745337.woff → iconfont.1768381374840.woff} +0 -0
- /package/lib/icon/style/{iconfont.1768284745337.woff2 → iconfont.1768381374840.woff2} +0 -0
- /package/lib/{iconfont.1768284745337.ttf → iconfont.1768381374840.ttf} +0 -0
- /package/lib/{iconfont.1768284745337.woff → iconfont.1768381374840.woff} +0 -0
- /package/lib/{iconfont.1768284745337.woff2 → iconfont.1768381374840.woff2} +0 -0
|
@@ -117,6 +117,7 @@ export default defineVxeComponent({
|
|
|
117
117
|
default: null
|
|
118
118
|
},
|
|
119
119
|
|
|
120
|
+
popupConfig: Object as PropType<VxeDateRangePickerPropTypes.PopupConfig>,
|
|
120
121
|
shortcutConfig: Object as PropType<VxeDateRangePickerPropTypes.ShortcutConfig>
|
|
121
122
|
},
|
|
122
123
|
emits: [
|
|
@@ -195,6 +196,10 @@ export default defineVxeComponent({
|
|
|
195
196
|
|
|
196
197
|
const computeBtnTransfer = computed(() => {
|
|
197
198
|
const { transfer } = props
|
|
199
|
+
const popupOpts = computePopupOpts.value
|
|
200
|
+
if (XEUtils.isBoolean(popupOpts.transfer)) {
|
|
201
|
+
return popupOpts.transfer
|
|
202
|
+
}
|
|
198
203
|
if (transfer === null) {
|
|
199
204
|
const globalTransfer = getConfig().dateRangePicker.transfer
|
|
200
205
|
if (XEUtils.isBoolean(globalTransfer)) {
|
|
@@ -292,6 +297,10 @@ export default defineVxeComponent({
|
|
|
292
297
|
return immediate
|
|
293
298
|
})
|
|
294
299
|
|
|
300
|
+
const computePopupOpts = computed(() => {
|
|
301
|
+
return Object.assign({}, getConfig().dateRangePicker.popupConfig, props.popupConfig)
|
|
302
|
+
})
|
|
303
|
+
|
|
295
304
|
const computeShortcutOpts = computed(() => {
|
|
296
305
|
return Object.assign({}, getConfig().dateRangePicker.shortcutConfig, props.shortcutConfig)
|
|
297
306
|
})
|
|
@@ -718,9 +727,10 @@ export default defineVxeComponent({
|
|
|
718
727
|
|
|
719
728
|
// 弹出面板
|
|
720
729
|
const updateZindex = () => {
|
|
721
|
-
const
|
|
722
|
-
|
|
723
|
-
|
|
730
|
+
const popupOpts = computePopupOpts.value
|
|
731
|
+
const customZIndex = popupOpts.zIndex || props.zIndex
|
|
732
|
+
if (customZIndex) {
|
|
733
|
+
reactData.panelIndex = XEUtils.toNumber(customZIndex)
|
|
724
734
|
} else if (reactData.panelIndex < getLastZIndex()) {
|
|
725
735
|
reactData.panelIndex = nextZIndex()
|
|
726
736
|
}
|
|
@@ -732,9 +742,10 @@ export default defineVxeComponent({
|
|
|
732
742
|
const targetElem = refInputTarget.value
|
|
733
743
|
const panelElem = refInputPanel.value
|
|
734
744
|
const btnTransfer = computeBtnTransfer.value
|
|
745
|
+
const popupOpts = computePopupOpts.value
|
|
735
746
|
const handleStyle = () => {
|
|
736
747
|
const ppObj = updatePanelPlacement(targetElem, panelElem, {
|
|
737
|
-
placement,
|
|
748
|
+
placement: popupOpts.placement || placement,
|
|
738
749
|
teleportTo: btnTransfer
|
|
739
750
|
})
|
|
740
751
|
const panelStyle: { [key: string]: string | number } = Object.assign(ppObj.style, {
|
|
@@ -917,6 +928,7 @@ export default defineVxeComponent({
|
|
|
917
928
|
const isDateTimeType = computeIsDateTimeType.value
|
|
918
929
|
const defaultDates = computeDefaultDates.value
|
|
919
930
|
const defaultTimes = computeDefaultTimes.value
|
|
931
|
+
const popupOpts = computePopupOpts.value
|
|
920
932
|
const { startLabel, endLabel } = panelLabelObj
|
|
921
933
|
const { position } = shortcutOpts
|
|
922
934
|
const headerSlot = slots.header
|
|
@@ -925,6 +937,7 @@ export default defineVxeComponent({
|
|
|
925
937
|
const bottomSlot = slots.bottom
|
|
926
938
|
const leftSlot = slots.left
|
|
927
939
|
const rightSlot = slots.right
|
|
940
|
+
const ppClassName = popupOpts.className
|
|
928
941
|
const [sdDate, edDate] = defaultDates
|
|
929
942
|
const [sdTime, edTime] = defaultTimes
|
|
930
943
|
const hasShortcutBtn = shortcutList.length > 0
|
|
@@ -936,7 +949,7 @@ export default defineVxeComponent({
|
|
|
936
949
|
}, [
|
|
937
950
|
h('div', {
|
|
938
951
|
ref: refInputPanel,
|
|
939
|
-
class: ['vxe-table--ignore-clear vxe-date-range-picker--panel', `type--${type}`, {
|
|
952
|
+
class: ['vxe-table--ignore-clear vxe-date-range-picker--panel', `type--${type}`, ppClassName ? (XEUtils.isFunction(ppClassName) ? ppClassName({ $dateRangePicker: $xeDateRangePicker }) : ppClassName) : '', {
|
|
940
953
|
[`size--${vSize}`]: vSize,
|
|
941
954
|
'is--transfer': btnTransfer,
|
|
942
955
|
'ani--leave': isAniVisible,
|
|
@@ -2,7 +2,7 @@ import { h, Teleport, PropType, ref, inject, watch, computed, provide, onUnmount
|
|
|
2
2
|
import { defineVxeComponent } from '../../ui/src/comp'
|
|
3
3
|
import XEUtils from 'xe-utils'
|
|
4
4
|
import { getConfig, getIcon, getI18n, globalEvents, createEvent, renderer, useSize, GLOBAL_EVENT_KEYS, renderEmptyElement } from '../../ui'
|
|
5
|
-
import { getEventTargetNode,
|
|
5
|
+
import { getEventTargetNode, updatePanelPlacement } from '../../ui/src/dom'
|
|
6
6
|
import { getLastZIndex, nextZIndex, getFuncText } from '../../ui/src/utils'
|
|
7
7
|
import { getSlotVNs } from '../../ui/src/vn'
|
|
8
8
|
|
|
@@ -20,6 +20,10 @@ export default defineVxeComponent({
|
|
|
20
20
|
default: () => getConfig().iconPicker.size || getConfig().size
|
|
21
21
|
},
|
|
22
22
|
className: [String, Function] as PropType<VxeIconPickerPropTypes.ClassName>,
|
|
23
|
+
/**
|
|
24
|
+
* 已废弃,请使用 popupConfig.className
|
|
25
|
+
* @deprecated
|
|
26
|
+
*/
|
|
23
27
|
popupClassName: [String, Function] as PropType<VxeIconPickerPropTypes.PopupClassName>,
|
|
24
28
|
showIconTitle: {
|
|
25
29
|
type: Boolean as PropType<VxeIconPickerPropTypes.ShowIconTitle>,
|
|
@@ -35,6 +39,7 @@ export default defineVxeComponent({
|
|
|
35
39
|
},
|
|
36
40
|
icons: Array as PropType<VxeIconPickerPropTypes.Icons>,
|
|
37
41
|
placement: String as PropType<VxeIconPickerPropTypes.Placement>,
|
|
42
|
+
popupConfig: Object as PropType<VxeIconPickerPropTypes.PopupConfig>,
|
|
38
43
|
transfer: {
|
|
39
44
|
type: Boolean as PropType<VxeIconPickerPropTypes.Transfer>,
|
|
40
45
|
default: null
|
|
@@ -116,6 +121,10 @@ export default defineVxeComponent({
|
|
|
116
121
|
|
|
117
122
|
const computeBtnTransfer = computed(() => {
|
|
118
123
|
const { transfer } = props
|
|
124
|
+
const popupOpts = computePopupOpts.value
|
|
125
|
+
if (XEUtils.isBoolean(popupOpts.transfer)) {
|
|
126
|
+
return popupOpts.transfer
|
|
127
|
+
}
|
|
119
128
|
if (transfer === null) {
|
|
120
129
|
const globalTransfer = getConfig().iconPicker.transfer
|
|
121
130
|
if (XEUtils.isBoolean(globalTransfer)) {
|
|
@@ -160,6 +169,10 @@ export default defineVxeComponent({
|
|
|
160
169
|
})
|
|
161
170
|
})
|
|
162
171
|
|
|
172
|
+
const computePopupOpts = computed(() => {
|
|
173
|
+
return Object.assign({}, getConfig().iconPicker.popupConfig, props.popupConfig)
|
|
174
|
+
})
|
|
175
|
+
|
|
163
176
|
const computeIconGroupList = computed(() => {
|
|
164
177
|
const iconList = computeIconList.value
|
|
165
178
|
return XEUtils.chunk(iconList, 4)
|
|
@@ -178,74 +191,25 @@ export default defineVxeComponent({
|
|
|
178
191
|
}
|
|
179
192
|
|
|
180
193
|
const updatePlacement = () => {
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
let top = boundingTop + targetHeight
|
|
201
|
-
if (placement === 'top') {
|
|
202
|
-
panelPlacement = 'top'
|
|
203
|
-
top = boundingTop - panelHeight
|
|
204
|
-
} else if (!placement) {
|
|
205
|
-
// 如果下面不够放,则向上
|
|
206
|
-
if (top + panelHeight + marginSize > visibleHeight) {
|
|
207
|
-
panelPlacement = 'top'
|
|
208
|
-
top = boundingTop - panelHeight
|
|
209
|
-
}
|
|
210
|
-
// 如果上面不够放,则向下(优先)
|
|
211
|
-
if (top < marginSize) {
|
|
212
|
-
panelPlacement = 'bottom'
|
|
213
|
-
top = boundingTop + targetHeight
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
// 如果溢出右边
|
|
217
|
-
if (left + panelWidth + marginSize > visibleWidth) {
|
|
218
|
-
left -= left + panelWidth + marginSize - visibleWidth
|
|
219
|
-
}
|
|
220
|
-
// 如果溢出左边
|
|
221
|
-
if (left < marginSize) {
|
|
222
|
-
left = marginSize
|
|
223
|
-
}
|
|
224
|
-
Object.assign(panelStyle, {
|
|
225
|
-
left: `${left}px`,
|
|
226
|
-
top: `${top}px`,
|
|
227
|
-
minWidth: `${targetWidth}px`
|
|
228
|
-
})
|
|
229
|
-
} else {
|
|
230
|
-
if (placement === 'top') {
|
|
231
|
-
panelPlacement = 'top'
|
|
232
|
-
panelStyle.bottom = `${targetHeight}px`
|
|
233
|
-
} else if (!placement) {
|
|
234
|
-
// 如果下面不够放,则向上
|
|
235
|
-
if (boundingTop + targetHeight + panelHeight > visibleHeight) {
|
|
236
|
-
// 如果上面不够放,则向下(优先)
|
|
237
|
-
if (boundingTop - targetHeight - panelHeight > marginSize) {
|
|
238
|
-
panelPlacement = 'top'
|
|
239
|
-
panelStyle.bottom = `${targetHeight}px`
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
|
-
reactData.panelStyle = panelStyle
|
|
245
|
-
reactData.panelPlacement = panelPlacement
|
|
246
|
-
return nextTick()
|
|
247
|
-
}
|
|
248
|
-
})
|
|
194
|
+
const { placement } = props
|
|
195
|
+
const { panelIndex } = reactData
|
|
196
|
+
const targetElem = refElem.value
|
|
197
|
+
const panelElem = refOptionPanel.value
|
|
198
|
+
const btnTransfer = computeBtnTransfer.value
|
|
199
|
+
const popupOpts = computePopupOpts.value
|
|
200
|
+
const handleStyle = () => {
|
|
201
|
+
const ppObj = updatePanelPlacement(targetElem, panelElem, {
|
|
202
|
+
placement: popupOpts.placement || placement,
|
|
203
|
+
teleportTo: btnTransfer
|
|
204
|
+
})
|
|
205
|
+
const panelStyle: { [key: string]: string | number } = Object.assign(ppObj.style, {
|
|
206
|
+
zIndex: panelIndex
|
|
207
|
+
})
|
|
208
|
+
reactData.panelStyle = panelStyle
|
|
209
|
+
reactData.panelPlacement = ppObj.placement
|
|
210
|
+
}
|
|
211
|
+
handleStyle()
|
|
212
|
+
return nextTick().then(handleStyle)
|
|
249
213
|
}
|
|
250
214
|
|
|
251
215
|
const showOptionPanel = () => {
|
|
@@ -535,13 +499,15 @@ export default defineVxeComponent({
|
|
|
535
499
|
}
|
|
536
500
|
|
|
537
501
|
const renderVN = () => {
|
|
538
|
-
const { className,
|
|
502
|
+
const { className, clearable } = props
|
|
539
503
|
const { initialized, isActivated, isAniVisible, visiblePanel, selectIcon } = reactData
|
|
540
504
|
const vSize = computeSize.value
|
|
541
505
|
const isDisabled = computeIsDisabled.value
|
|
542
506
|
const btnTransfer = computeBtnTransfer.value
|
|
543
507
|
const formReadonly = computeFormReadonly.value
|
|
544
508
|
const inpPlaceholder = computeInpPlaceholder.value
|
|
509
|
+
const popupOpts = computePopupOpts.value
|
|
510
|
+
const ppClassName = popupOpts.className || props.popupClassName
|
|
545
511
|
|
|
546
512
|
if (formReadonly) {
|
|
547
513
|
return h('div', {
|
|
@@ -604,7 +570,7 @@ export default defineVxeComponent({
|
|
|
604
570
|
}, [
|
|
605
571
|
h('div', {
|
|
606
572
|
ref: refOptionPanel,
|
|
607
|
-
class: ['vxe-table--ignore-clear vxe-ico-picker--panel',
|
|
573
|
+
class: ['vxe-table--ignore-clear vxe-ico-picker--panel', ppClassName ? (XEUtils.isFunction(ppClassName) ? ppClassName({ $iconPicker: $xeIconPicker }) : ppClassName) : '', {
|
|
608
574
|
[`size--${vSize}`]: vSize,
|
|
609
575
|
'is--transfer': btnTransfer,
|
|
610
576
|
'ani--leave': isAniVisible,
|
|
@@ -18,6 +18,10 @@ export default defineVxeComponent({
|
|
|
18
18
|
type: String as PropType<VxePulldownPropTypes.Trigger>,
|
|
19
19
|
default: getConfig().pulldown.trigger
|
|
20
20
|
},
|
|
21
|
+
/**
|
|
22
|
+
* 已废弃,请使用 popupConfig.zIndex
|
|
23
|
+
* @deprecated
|
|
24
|
+
*/
|
|
21
25
|
zIndex: Number as PropType<VxePulldownPropTypes.ZIndex>,
|
|
22
26
|
size: {
|
|
23
27
|
type: String as PropType<VxePulldownPropTypes.Size>,
|
|
@@ -28,8 +32,13 @@ export default defineVxeComponent({
|
|
|
28
32
|
type: [String, Function] as PropType<VxePulldownPropTypes.ClassName>,
|
|
29
33
|
default: getConfig().pulldown.className
|
|
30
34
|
},
|
|
35
|
+
/**
|
|
36
|
+
* 已废弃,请使用 popupConfig.className
|
|
37
|
+
* @deprecated
|
|
38
|
+
*/
|
|
31
39
|
popupClassName: [String, Function] as PropType<VxePulldownPropTypes.PopupClassName>,
|
|
32
40
|
showPopupShadow: Boolean as PropType<VxePulldownPropTypes.ShowPopupShadow>,
|
|
41
|
+
popupConfig: Object as PropType<VxePulldownPropTypes.PopupConfig>,
|
|
33
42
|
destroyOnClose: {
|
|
34
43
|
type: Boolean as PropType<VxePulldownPropTypes.DestroyOnClose>,
|
|
35
44
|
default: getConfig().pulldown.destroyOnClose
|
|
@@ -79,6 +88,10 @@ export default defineVxeComponent({
|
|
|
79
88
|
|
|
80
89
|
const computeBtnTransfer = computed(() => {
|
|
81
90
|
const { transfer } = props
|
|
91
|
+
const popupOpts = computePopupOpts.value
|
|
92
|
+
if (XEUtils.isBoolean(popupOpts.transfer)) {
|
|
93
|
+
return popupOpts.transfer
|
|
94
|
+
}
|
|
82
95
|
if (transfer === null) {
|
|
83
96
|
const globalTransfer = getConfig().pulldown.transfer
|
|
84
97
|
if (XEUtils.isBoolean(globalTransfer)) {
|
|
@@ -91,6 +104,10 @@ export default defineVxeComponent({
|
|
|
91
104
|
return transfer
|
|
92
105
|
})
|
|
93
106
|
|
|
107
|
+
const computePopupOpts = computed(() => {
|
|
108
|
+
return Object.assign({}, getConfig().pulldown.popupConfig, props.popupConfig)
|
|
109
|
+
})
|
|
110
|
+
|
|
94
111
|
const refMaps: PulldownPrivateRef = {
|
|
95
112
|
refElem
|
|
96
113
|
}
|
|
@@ -107,9 +124,10 @@ export default defineVxeComponent({
|
|
|
107
124
|
let pulldownMethods = {} as PulldownMethods
|
|
108
125
|
|
|
109
126
|
const updateZindex = () => {
|
|
110
|
-
const
|
|
111
|
-
|
|
112
|
-
|
|
127
|
+
const popupOpts = computePopupOpts.value
|
|
128
|
+
const customZIndex = popupOpts.zIndex || props.zIndex
|
|
129
|
+
if (customZIndex) {
|
|
130
|
+
reactData.panelIndex = XEUtils.toNumber(customZIndex)
|
|
113
131
|
} else if (reactData.panelIndex < getLastZIndex()) {
|
|
114
132
|
reactData.panelIndex = nextZIndex()
|
|
115
133
|
}
|
|
@@ -128,9 +146,10 @@ export default defineVxeComponent({
|
|
|
128
146
|
const targetElem = refPulldownContent.value
|
|
129
147
|
const panelElem = refPulldownPanel.value
|
|
130
148
|
const btnTransfer = computeBtnTransfer.value
|
|
149
|
+
const popupOpts = computePopupOpts.value
|
|
131
150
|
const handleStyle = () => {
|
|
132
151
|
const ppObj = updatePanelPlacement(targetElem, panelElem, {
|
|
133
|
-
placement,
|
|
152
|
+
placement: popupOpts.placement || placement,
|
|
134
153
|
teleportTo: btnTransfer
|
|
135
154
|
})
|
|
136
155
|
const panelStyle: { [key: string]: string | number } = Object.assign(ppObj.style, {
|
|
@@ -338,14 +357,16 @@ export default defineVxeComponent({
|
|
|
338
357
|
}
|
|
339
358
|
|
|
340
359
|
const renderVN = () => {
|
|
341
|
-
const { className, options,
|
|
360
|
+
const { className, options, showPopupShadow, destroyOnClose, disabled } = props
|
|
342
361
|
const { initialized, isActivated, isAniVisible, visiblePanel, panelStyle, panelPlacement } = reactData
|
|
343
362
|
const btnTransfer = computeBtnTransfer.value
|
|
344
363
|
const vSize = computeSize.value
|
|
364
|
+
const popupOpts = computePopupOpts.value
|
|
345
365
|
const defaultSlot = slots.default
|
|
346
366
|
const headerSlot = slots.header
|
|
347
367
|
const footerSlot = slots.footer
|
|
348
368
|
const dropdownSlot = slots.dropdown
|
|
369
|
+
const ppClassName = popupOpts.className || props.popupClassName
|
|
349
370
|
|
|
350
371
|
return h('div', {
|
|
351
372
|
ref: refElem,
|
|
@@ -367,7 +388,7 @@ export default defineVxeComponent({
|
|
|
367
388
|
}, [
|
|
368
389
|
h('div', {
|
|
369
390
|
ref: refPulldownPanel,
|
|
370
|
-
class: ['vxe-table--ignore-clear vxe-pulldown--panel',
|
|
391
|
+
class: ['vxe-table--ignore-clear vxe-pulldown--panel', ppClassName ? (XEUtils.isFunction(ppClassName) ? ppClassName({ $pulldown: $xePulldown }) : ppClassName) : '', {
|
|
371
392
|
[`size--${vSize}`]: vSize,
|
|
372
393
|
'is--transfer': btnTransfer,
|
|
373
394
|
'ani--leave': isAniVisible,
|
|
@@ -80,11 +80,19 @@ export default defineVxeComponent({
|
|
|
80
80
|
optionGroupProps: Object as PropType<VxeSelectPropTypes.OptionGroupProps>,
|
|
81
81
|
optionConfig: Object as PropType<VxeSelectPropTypes.OptionConfig>,
|
|
82
82
|
className: [String, Function] as PropType<VxeSelectPropTypes.ClassName>,
|
|
83
|
+
/**
|
|
84
|
+
* 已废弃,请使用 popupConfig.className
|
|
85
|
+
* @deprecated
|
|
86
|
+
*/
|
|
83
87
|
popupClassName: [String, Function] as PropType<VxeSelectPropTypes.PopupClassName>,
|
|
84
88
|
max: {
|
|
85
89
|
type: [String, Number] as PropType<VxeSelectPropTypes.Max>,
|
|
86
90
|
default: null
|
|
87
91
|
},
|
|
92
|
+
/**
|
|
93
|
+
* 已废弃,请使用 popupConfig.zIndex
|
|
94
|
+
* @deprecated
|
|
95
|
+
*/
|
|
88
96
|
zIndex: Number as PropType<VxeSelectPropTypes.ZIndex>,
|
|
89
97
|
size: {
|
|
90
98
|
type: String as PropType<VxeSelectPropTypes.Size>,
|
|
@@ -232,6 +240,10 @@ export default defineVxeComponent({
|
|
|
232
240
|
|
|
233
241
|
const computeBtnTransfer = computed(() => {
|
|
234
242
|
const { transfer } = props
|
|
243
|
+
const popupOpts = computePopupOpts.value
|
|
244
|
+
if (XEUtils.isBoolean(popupOpts.transfer)) {
|
|
245
|
+
return popupOpts.transfer
|
|
246
|
+
}
|
|
235
247
|
if (transfer === null) {
|
|
236
248
|
const globalTransfer = getConfig().select.transfer
|
|
237
249
|
if (XEUtils.isBoolean(globalTransfer)) {
|
|
@@ -293,7 +305,7 @@ export default defineVxeComponent({
|
|
|
293
305
|
})
|
|
294
306
|
|
|
295
307
|
const computePopupOpts = computed(() => {
|
|
296
|
-
return Object.assign({}, getConfig().
|
|
308
|
+
return Object.assign({}, getConfig().select.popupConfig, props.popupConfig)
|
|
297
309
|
})
|
|
298
310
|
|
|
299
311
|
const computeVirtualYOpts = computed(() => {
|
|
@@ -527,9 +539,10 @@ export default defineVxeComponent({
|
|
|
527
539
|
}
|
|
528
540
|
|
|
529
541
|
const updateZIndex = () => {
|
|
530
|
-
const
|
|
531
|
-
|
|
532
|
-
|
|
542
|
+
const popupOpts = computePopupOpts.value
|
|
543
|
+
const customZIndex = popupOpts.zIndex || props.zIndex
|
|
544
|
+
if (customZIndex) {
|
|
545
|
+
reactData.panelIndex = XEUtils.toNumber(customZIndex)
|
|
533
546
|
} else if (reactData.panelIndex < getLastZIndex()) {
|
|
534
547
|
reactData.panelIndex = nextZIndex()
|
|
535
548
|
}
|
|
@@ -541,9 +554,10 @@ export default defineVxeComponent({
|
|
|
541
554
|
const targetElem = refElem.value
|
|
542
555
|
const panelElem = refOptionPanel.value
|
|
543
556
|
const btnTransfer = computeBtnTransfer.value
|
|
557
|
+
const popupOpts = computePopupOpts.value
|
|
544
558
|
const handleStyle = () => {
|
|
545
559
|
const ppObj = updatePanelPlacement(targetElem, panelElem, {
|
|
546
|
-
placement,
|
|
560
|
+
placement: popupOpts.placement || placement,
|
|
547
561
|
teleportTo: btnTransfer
|
|
548
562
|
})
|
|
549
563
|
const panelStyle: { [key: string]: string | number } = Object.assign(ppObj.style, {
|
|
@@ -1441,11 +1455,11 @@ export default defineVxeComponent({
|
|
|
1441
1455
|
const inpPlaceholder = computeInpPlaceholder.value
|
|
1442
1456
|
const popupWrapperStyle = computePopupWrapperStyle.value
|
|
1443
1457
|
const popupOpts = computePopupOpts.value
|
|
1444
|
-
const popupClassName = popupOpts.className || props.popupClassName
|
|
1445
1458
|
const defaultSlot = slots.default
|
|
1446
1459
|
const headerSlot = slots.header
|
|
1447
1460
|
const footerSlot = slots.footer
|
|
1448
1461
|
const prefixSlot = slots.prefix
|
|
1462
|
+
const ppClassName = popupOpts.className || props.popupClassName
|
|
1449
1463
|
if (formReadonly) {
|
|
1450
1464
|
return h('div', {
|
|
1451
1465
|
ref: refElem,
|
|
@@ -1505,7 +1519,7 @@ export default defineVxeComponent({
|
|
|
1505
1519
|
}, [
|
|
1506
1520
|
h('div', {
|
|
1507
1521
|
ref: refOptionPanel,
|
|
1508
|
-
class: ['vxe-table--ignore-clear vxe-select--panel',
|
|
1522
|
+
class: ['vxe-table--ignore-clear vxe-select--panel', ppClassName ? (XEUtils.isFunction(ppClassName) ? ppClassName({ $select: $xeSelect }) : ppClassName) : '', {
|
|
1509
1523
|
[`size--${vSize}`]: vSize,
|
|
1510
1524
|
'is--transfer': btnTransfer,
|
|
1511
1525
|
'ani--leave': !loading && isAniVisible,
|
|
@@ -50,6 +50,10 @@ export default defineVxeComponent({
|
|
|
50
50
|
options: Array as PropType<VxeTableSelectPropTypes.Options>,
|
|
51
51
|
optionProps: Object as PropType<VxeTableSelectPropTypes.OptionProps>,
|
|
52
52
|
lazyOptions: Array as PropType<VxeTableSelectPropTypes.LazyOptions>,
|
|
53
|
+
/**
|
|
54
|
+
* 已废弃,请使用 popupConfig.zIndex
|
|
55
|
+
* @deprecated
|
|
56
|
+
*/
|
|
53
57
|
zIndex: Number as PropType<VxeTableSelectPropTypes.ZIndex>,
|
|
54
58
|
size: {
|
|
55
59
|
type: String as PropType<VxeTableSelectPropTypes.Size>,
|
|
@@ -139,8 +143,12 @@ export default defineVxeComponent({
|
|
|
139
143
|
|
|
140
144
|
const computeBtnTransfer = computed(() => {
|
|
141
145
|
const { transfer } = props
|
|
146
|
+
const popupOpts = computePopupOpts.value
|
|
147
|
+
if (XEUtils.isBoolean(popupOpts.transfer)) {
|
|
148
|
+
return popupOpts.transfer
|
|
149
|
+
}
|
|
142
150
|
if (transfer === null) {
|
|
143
|
-
const globalTransfer = getConfig().
|
|
151
|
+
const globalTransfer = getConfig().tableSelect.transfer
|
|
144
152
|
if (XEUtils.isBoolean(globalTransfer)) {
|
|
145
153
|
return globalTransfer
|
|
146
154
|
}
|
|
@@ -407,9 +415,10 @@ export default defineVxeComponent({
|
|
|
407
415
|
}
|
|
408
416
|
|
|
409
417
|
const updateZindex = () => {
|
|
410
|
-
const
|
|
411
|
-
|
|
412
|
-
|
|
418
|
+
const popupOpts = computePopupOpts.value
|
|
419
|
+
const customZIndex = popupOpts.zIndex || props.zIndex
|
|
420
|
+
if (customZIndex) {
|
|
421
|
+
reactData.panelIndex = XEUtils.toNumber(customZIndex)
|
|
413
422
|
} else if (reactData.panelIndex < getLastZIndex()) {
|
|
414
423
|
reactData.panelIndex = nextZIndex()
|
|
415
424
|
}
|
|
@@ -421,9 +430,10 @@ export default defineVxeComponent({
|
|
|
421
430
|
const targetElem = refElem.value
|
|
422
431
|
const panelElem = refOptionPanel.value
|
|
423
432
|
const btnTransfer = computeBtnTransfer.value
|
|
433
|
+
const popupOpts = computePopupOpts.value
|
|
424
434
|
const handleStyle = () => {
|
|
425
435
|
const ppObj = updatePanelPlacement(targetElem, panelElem, {
|
|
426
|
-
placement,
|
|
436
|
+
placement: popupOpts.placement || placement,
|
|
427
437
|
teleportTo: btnTransfer
|
|
428
438
|
})
|
|
429
439
|
const panelStyle: { [key: string]: string | number } = Object.assign(ppObj.style, {
|
|
@@ -620,13 +630,13 @@ export default defineVxeComponent({
|
|
|
620
630
|
const btnTransfer = computeBtnTransfer.value
|
|
621
631
|
const formReadonly = computeFormReadonly.value
|
|
622
632
|
const popupOpts = computePopupOpts.value
|
|
623
|
-
const { className: popupClassName } = popupOpts
|
|
624
633
|
const selectGridOpts = computeSelectGridOpts.value
|
|
625
634
|
const rowOpts = computeRowOpts.value
|
|
626
635
|
const popupWrapperStyle = computePopupWrapperStyle.value
|
|
627
636
|
const headerSlot = slots.header
|
|
628
637
|
const footerSlot = slots.footer
|
|
629
638
|
const prefixSlot = slots.prefix
|
|
639
|
+
const ppClassName = popupOpts.className
|
|
630
640
|
|
|
631
641
|
if (formReadonly) {
|
|
632
642
|
return h('div', {
|
|
@@ -674,7 +684,7 @@ export default defineVxeComponent({
|
|
|
674
684
|
}, [
|
|
675
685
|
h('div', {
|
|
676
686
|
ref: refOptionPanel,
|
|
677
|
-
class: ['vxe-table--ignore-clear vxe-table-select--panel',
|
|
687
|
+
class: ['vxe-table--ignore-clear vxe-table-select--panel', ppClassName ? (XEUtils.isFunction(ppClassName) ? ppClassName({ $tableSelect: $xeTableSelect }) : ppClassName) : '', {
|
|
678
688
|
[`size--${vSize}`]: vSize,
|
|
679
689
|
'is--transfer': btnTransfer,
|
|
680
690
|
'ani--leave': !loading && isAniVisible,
|
|
@@ -48,12 +48,20 @@ export default defineVxeComponent({
|
|
|
48
48
|
filterConfig: Object as PropType<VxeTreeSelectPropTypes.FilterConfig>,
|
|
49
49
|
multiple: Boolean as PropType<VxeTreeSelectPropTypes.Multiple>,
|
|
50
50
|
className: [String, Function] as PropType<VxeTreeSelectPropTypes.ClassName>,
|
|
51
|
+
/**
|
|
52
|
+
* 已废弃,请使用 popupConfig.className
|
|
53
|
+
* @deprecated
|
|
54
|
+
*/
|
|
51
55
|
popupClassName: [String, Function] as PropType<VxeTreeSelectPropTypes.PopupClassName>,
|
|
52
56
|
prefixIcon: String as PropType<VxeTreeSelectPropTypes.PrefixIcon>,
|
|
53
57
|
placement: String as PropType<VxeTreeSelectPropTypes.Placement>,
|
|
54
58
|
lazyOptions: Array as PropType<VxeTreeSelectPropTypes.LazyOptions>,
|
|
55
59
|
options: Array as PropType<VxeTreeSelectPropTypes.Options>,
|
|
56
60
|
optionProps: Object as PropType<VxeTreeSelectPropTypes.OptionProps>,
|
|
61
|
+
/**
|
|
62
|
+
* 已废弃,请使用 popupConfig.zIndex
|
|
63
|
+
* @deprecated
|
|
64
|
+
*/
|
|
57
65
|
zIndex: Number as PropType<VxeTreeSelectPropTypes.ZIndex>,
|
|
58
66
|
size: {
|
|
59
67
|
type: String as PropType<VxeTreeSelectPropTypes.Size>,
|
|
@@ -169,8 +177,12 @@ export default defineVxeComponent({
|
|
|
169
177
|
|
|
170
178
|
const computeBtnTransfer = computed(() => {
|
|
171
179
|
const { transfer } = props
|
|
180
|
+
const popupOpts = computePopupOpts.value
|
|
181
|
+
if (XEUtils.isBoolean(popupOpts.transfer)) {
|
|
182
|
+
return popupOpts.transfer
|
|
183
|
+
}
|
|
172
184
|
if (transfer === null) {
|
|
173
|
-
const globalTransfer = getConfig().
|
|
185
|
+
const globalTransfer = getConfig().treeSelect.transfer
|
|
174
186
|
if (XEUtils.isBoolean(globalTransfer)) {
|
|
175
187
|
return globalTransfer
|
|
176
188
|
}
|
|
@@ -386,9 +398,10 @@ export default defineVxeComponent({
|
|
|
386
398
|
}
|
|
387
399
|
|
|
388
400
|
const updateZindex = () => {
|
|
389
|
-
const
|
|
390
|
-
|
|
391
|
-
|
|
401
|
+
const popupOpts = computePopupOpts.value
|
|
402
|
+
const customZIndex = popupOpts.zIndex || props.zIndex
|
|
403
|
+
if (customZIndex) {
|
|
404
|
+
reactData.panelIndex = XEUtils.toNumber(customZIndex)
|
|
392
405
|
} else if (reactData.panelIndex < getLastZIndex()) {
|
|
393
406
|
reactData.panelIndex = nextZIndex()
|
|
394
407
|
}
|
|
@@ -400,9 +413,10 @@ export default defineVxeComponent({
|
|
|
400
413
|
const targetElem = refElem.value
|
|
401
414
|
const panelElem = refOptionPanel.value
|
|
402
415
|
const btnTransfer = computeBtnTransfer.value
|
|
416
|
+
const popupOpts = computePopupOpts.value
|
|
403
417
|
const handleStyle = () => {
|
|
404
418
|
const ppObj = updatePanelPlacement(targetElem, panelElem, {
|
|
405
|
-
placement,
|
|
419
|
+
placement: popupOpts.placement || placement,
|
|
406
420
|
teleportTo: btnTransfer
|
|
407
421
|
})
|
|
408
422
|
const panelStyle: { [key: string]: string | number } = Object.assign(ppObj.style, {
|
|
@@ -680,7 +694,7 @@ export default defineVxeComponent({
|
|
|
680
694
|
const footerSlot = slots.footer
|
|
681
695
|
const prefixSlot = slots.prefix
|
|
682
696
|
const popupOpts = computePopupOpts.value
|
|
683
|
-
const
|
|
697
|
+
const ppClassName = popupOpts.className || props.popupClassName
|
|
684
698
|
|
|
685
699
|
if (formReadonly) {
|
|
686
700
|
return h('div', {
|
|
@@ -762,7 +776,7 @@ export default defineVxeComponent({
|
|
|
762
776
|
}, [
|
|
763
777
|
h('div', {
|
|
764
778
|
ref: refOptionPanel,
|
|
765
|
-
class: ['vxe-table--ignore-clear vxe-tree-select--panel',
|
|
779
|
+
class: ['vxe-table--ignore-clear vxe-tree-select--panel', ppClassName ? (XEUtils.isFunction(ppClassName) ? ppClassName({ $treeSelect: $xeTreeSelect }) : ppClassName) : '', {
|
|
766
780
|
[`size--${vSize}`]: vSize,
|
|
767
781
|
'is--transfer': btnTransfer,
|
|
768
782
|
'ani--leave': !loading && isAniVisible,
|
|
@@ -26,10 +26,18 @@ export interface VxeButtonPrivateRef extends ButtonPrivateRef { }
|
|
|
26
26
|
|
|
27
27
|
export namespace VxeButtonPropTypes {
|
|
28
28
|
export type Size = VxeComponentSizeType
|
|
29
|
+
/**
|
|
30
|
+
* 已废弃,请使用 PopupConfig.zIndex
|
|
31
|
+
* @deprecated
|
|
32
|
+
*/
|
|
29
33
|
export type ZIndex = number
|
|
30
34
|
export type Type = string
|
|
31
35
|
export type Mode = null | '' | 'button' | 'text'
|
|
32
36
|
export type ClassName = string | ((params: { $button: VxeButtonConstructor }) => string)
|
|
37
|
+
/**
|
|
38
|
+
* 已废弃,请使用 PopupConfig.className
|
|
39
|
+
* @deprecated
|
|
40
|
+
*/
|
|
33
41
|
export type PopupClassName = string | ((params: { $button: VxeButtonConstructor }) => string)
|
|
34
42
|
export type Name = string | number
|
|
35
43
|
export type RouterLink = {
|
|
@@ -82,6 +90,15 @@ export namespace VxeButtonPropTypes {
|
|
|
82
90
|
|
|
83
91
|
export type ShowDropdownIcon = boolean
|
|
84
92
|
export type DestroyOnClose = boolean
|
|
93
|
+
export interface PopupConfig {
|
|
94
|
+
/**
|
|
95
|
+
* 设置弹出面板方向
|
|
96
|
+
*/
|
|
97
|
+
placement?: 'top' | 'bottom' | '' | null
|
|
98
|
+
transfer?: boolean
|
|
99
|
+
zIndex?: number | string
|
|
100
|
+
className?: string | ((params: { $button: VxeButtonConstructor }) => string)
|
|
101
|
+
}
|
|
85
102
|
export type Transfer = boolean
|
|
86
103
|
}
|
|
87
104
|
|
|
@@ -171,6 +188,7 @@ export interface VxeButtonProps {
|
|
|
171
188
|
* 是否将弹框容器插入于 body 内
|
|
172
189
|
*/
|
|
173
190
|
transfer?: VxeButtonPropTypes.Transfer
|
|
191
|
+
popupConfig?: VxeButtonPropTypes.PopupConfig
|
|
174
192
|
}
|
|
175
193
|
|
|
176
194
|
export interface ButtonPrivateComputed {
|
|
@@ -34,6 +34,10 @@ export namespace VxeDatePickerPropTypes {
|
|
|
34
34
|
export type Name = string
|
|
35
35
|
export type Type = VxeDatePanelPropTypes.Type
|
|
36
36
|
export type Clearable = boolean
|
|
37
|
+
/**
|
|
38
|
+
* 已废弃,请使用 PopupConfig.zIndex
|
|
39
|
+
* @deprecated
|
|
40
|
+
*/
|
|
37
41
|
export type ZIndex = number
|
|
38
42
|
export type Readonly = boolean
|
|
39
43
|
export type Disabled = boolean
|
|
@@ -74,6 +78,10 @@ export namespace VxeDatePickerPropTypes {
|
|
|
74
78
|
*/
|
|
75
79
|
trigger?: 'default' | 'icon' | 'manual' | '' | null
|
|
76
80
|
transfer?: boolean
|
|
81
|
+
width?: number | string
|
|
82
|
+
height?: number | string
|
|
83
|
+
zIndex?: number | string
|
|
84
|
+
className?: string | ((params: { $datePicker: VxeDatePickerConstructor }) => string)
|
|
77
85
|
}
|
|
78
86
|
export interface ShortcutConfig {
|
|
79
87
|
enabled?: boolean
|
|
@@ -36,6 +36,10 @@ export namespace VxeDateRangePickerPropTypes {
|
|
|
36
36
|
export type Name = string
|
|
37
37
|
export type Type = VxeDatePanelPropTypes.Type
|
|
38
38
|
export type Clearable = boolean
|
|
39
|
+
/**
|
|
40
|
+
* 已废弃,请使用 PopupConfig.zIndex
|
|
41
|
+
* @deprecated
|
|
42
|
+
*/
|
|
39
43
|
export type ZIndex = number
|
|
40
44
|
export type Readonly = boolean
|
|
41
45
|
export type Disabled = boolean
|
|
@@ -78,6 +82,10 @@ export namespace VxeDateRangePickerPropTypes {
|
|
|
78
82
|
*/
|
|
79
83
|
trigger?: 'default' | 'icon' | 'manual' | '' | null
|
|
80
84
|
transfer?: boolean
|
|
85
|
+
width?: number | string
|
|
86
|
+
height?: number | string
|
|
87
|
+
zIndex?: number | string
|
|
88
|
+
className?: string | ((params: { $dateRangePicker: VxeDateRangePickerConstructor }) => string)
|
|
81
89
|
}
|
|
82
90
|
export interface ShortcutConfig {
|
|
83
91
|
enabled?: boolean
|