vxe-pc-ui 4.16.16 → 4.16.18
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/dist/all.esm.js +46 -20
- package/dist/style.css +1 -1
- package/dist/style.min.css +1 -1
- package/es/button/src/button.js +3 -2
- package/es/button/style.css +2 -0
- package/es/button/style.min.css +1 -1
- package/es/color-picker/src/color-picker.js +4 -2
- package/es/date-picker/src/date-picker.js +3 -2
- package/es/date-range-picker/src/date-range-picker.js +3 -2
- package/es/drawer/src/drawer.js +7 -3
- package/es/icon/style.css +1 -1
- package/es/icon-picker/src/icon-picker.js +3 -2
- package/es/menu/src/menu.js +8 -4
- package/es/modal/src/modal.js +9 -5
- package/es/select/src/select.js +3 -2
- package/es/split/style.css +4 -0
- package/es/split/style.min.css +1 -1
- package/es/splitter/src/splitter.js +3 -1
- package/es/splitter/style.css +4 -0
- package/es/splitter/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 +3 -2
- package/es/tree-select/src/tree-select.js +3 -2
- package/es/ui/index.js +1 -1
- package/es/ui/src/dom.js +3 -0
- package/es/ui/src/log.js +1 -1
- package/es/vxe-button/style.css +2 -0
- package/es/vxe-button/style.min.css +1 -1
- package/es/vxe-split/style.css +4 -0
- package/es/vxe-split/style.min.css +1 -1
- package/es/vxe-splitter/style.css +4 -0
- package/es/vxe-splitter/style.min.css +1 -1
- package/lib/button/src/button.js +4 -1
- package/lib/button/src/button.min.js +1 -1
- package/lib/button/style/style.css +2 -0
- package/lib/button/style/style.min.css +1 -1
- package/lib/color-picker/src/color-picker.js +5 -1
- package/lib/color-picker/src/color-picker.min.js +1 -1
- package/lib/date-picker/src/date-picker.js +4 -1
- package/lib/date-picker/src/date-picker.min.js +1 -1
- package/lib/date-range-picker/src/date-range-picker.js +4 -1
- package/lib/date-range-picker/src/date-range-picker.min.js +1 -1
- package/lib/drawer/src/drawer.js +6 -1
- package/lib/drawer/src/drawer.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 +4 -1
- package/lib/icon-picker/src/icon-picker.min.js +1 -1
- package/lib/index.umd.js +64 -19
- package/lib/index.umd.min.js +1 -1
- package/lib/menu/src/menu.js +8 -3
- package/lib/menu/src/menu.min.js +1 -1
- package/lib/modal/src/modal.js +9 -4
- package/lib/modal/src/modal.min.js +1 -1
- package/lib/select/src/select.js +4 -1
- package/lib/select/src/select.min.js +1 -1
- package/lib/split/style/style.css +4 -0
- package/lib/split/style/style.min.css +1 -1
- package/lib/splitter/src/splitter.js +3 -1
- package/lib/splitter/src/splitter.min.js +1 -1
- package/lib/splitter/style/style.css +4 -0
- package/lib/splitter/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 +4 -1
- package/lib/table-select/src/table-select.min.js +1 -1
- package/lib/tree-select/src/tree-select.js +4 -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 +4 -0
- 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-button/style/style.css +2 -0
- package/lib/vxe-button/style/style.min.css +1 -1
- package/lib/vxe-split/style/style.css +4 -0
- package/lib/vxe-split/style/style.min.css +1 -1
- package/lib/vxe-splitter/style/style.css +4 -0
- package/lib/vxe-splitter/style/style.min.css +1 -1
- package/package.json +1 -1
- package/packages/button/src/button.ts +3 -2
- package/packages/color-picker/src/color-picker.ts +4 -2
- package/packages/date-picker/src/date-picker.ts +3 -2
- package/packages/date-range-picker/src/date-range-picker.ts +3 -2
- package/packages/drawer/src/drawer.ts +7 -3
- package/packages/icon-picker/src/icon-picker.ts +3 -2
- package/packages/menu/src/menu.ts +8 -4
- package/packages/modal/src/modal.ts +9 -5
- package/packages/select/src/select.ts +3 -2
- package/packages/splitter/src/splitter.ts +3 -1
- package/packages/table-select/src/table-select.ts +3 -2
- package/packages/tree-select/src/tree-select.ts +3 -2
- package/packages/ui/src/dom.ts +4 -0
- package/styles/components/button.scss +1 -0
- package/styles/components/splitter.scss +9 -0
- package/types/components/button.d.ts +1 -1
- package/types/components/color-picker.d.ts +1 -1
- package/types/components/date-picker.d.ts +1 -1
- package/types/components/date-range-picker.d.ts +1 -1
- package/types/components/drawer.d.ts +8 -0
- package/types/components/gantt.d.ts +8 -0
- package/types/components/icon-picker.d.ts +7 -0
- package/types/components/menu.d.ts +5 -1
- package/types/components/modal.d.ts +8 -0
- package/types/components/pulldown.d.ts +1 -1
- package/types/components/select.d.ts +1 -1
- package/types/components/table-select.d.ts +1 -1
- package/types/components/table.d.ts +17 -2
- package/types/components/tree-select.d.ts +1 -1
- /package/es/icon/{iconfont.1784622284955.ttf → iconfont.1784708567180.ttf} +0 -0
- /package/es/icon/{iconfont.1784622284955.woff → iconfont.1784708567180.woff} +0 -0
- /package/es/icon/{iconfont.1784622284955.woff2 → iconfont.1784708567180.woff2} +0 -0
- /package/es/{iconfont.1784622284955.ttf → iconfont.1784708567180.ttf} +0 -0
- /package/es/{iconfont.1784622284955.woff → iconfont.1784708567180.woff} +0 -0
- /package/es/{iconfont.1784622284955.woff2 → iconfont.1784708567180.woff2} +0 -0
- /package/lib/icon/style/{iconfont.1784622284955.ttf → iconfont.1784708567180.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1784622284955.woff → iconfont.1784708567180.woff} +0 -0
- /package/lib/icon/style/{iconfont.1784622284955.woff2 → iconfont.1784708567180.woff2} +0 -0
- /package/lib/{iconfont.1784622284955.ttf → iconfont.1784708567180.ttf} +0 -0
- /package/lib/{iconfont.1784622284955.woff → iconfont.1784708567180.woff} +0 -0
- /package/lib/{iconfont.1784622284955.woff2 → iconfont.1784708567180.woff2} +0 -0
|
@@ -2,7 +2,7 @@ import { watch, computed, provide, ref, inject, Teleport, h, nextTick, PropType,
|
|
|
2
2
|
import { defineVxeComponent } from '../../ui/src/comp'
|
|
3
3
|
import XEUtils from 'xe-utils'
|
|
4
4
|
import { VxeUI, getIcon, getConfig, getI18n, globalEvents, createEvent, useSize, renderEmptyElement } from '../../ui'
|
|
5
|
-
import { getEventTargetNode, toCssUnit, updatePanelPlacement } from '../../ui/src/dom'
|
|
5
|
+
import { getEventTargetNode, getPopupContainer, toCssUnit, updatePanelPlacement } from '../../ui/src/dom'
|
|
6
6
|
import { getLastZIndex, nextZIndex } from '../../ui/src/utils'
|
|
7
7
|
import { parseColor, updateColorAlpha, hexToHsv, rgbToHsv, rgbToHex, hexToRgb, hsvToRgb, toRgb } from './util'
|
|
8
8
|
import VxeButtonComponent from '../../button'
|
|
@@ -986,6 +986,8 @@ export default defineVxeComponent({
|
|
|
986
986
|
const isDisabled = computeIsDisabled.value
|
|
987
987
|
const btnTransfer = computeBtnTransfer.value
|
|
988
988
|
const formReadonly = computeFormReadonly.value
|
|
989
|
+
const popupOpts = computePopupOpts.value
|
|
990
|
+
const { appendTo } = popupOpts
|
|
989
991
|
|
|
990
992
|
if (formReadonly) {
|
|
991
993
|
return h('div', {
|
|
@@ -1028,7 +1030,7 @@ export default defineVxeComponent({
|
|
|
1028
1030
|
})
|
|
1029
1031
|
]),
|
|
1030
1032
|
h(Teleport, {
|
|
1031
|
-
to:
|
|
1033
|
+
to: getPopupContainer(appendTo),
|
|
1032
1034
|
disabled: btnTransfer ? !initialized : true
|
|
1033
1035
|
}, [
|
|
1034
1036
|
h('div', {
|
|
@@ -3,7 +3,7 @@ import { defineVxeComponent } from '../../ui/src/comp'
|
|
|
3
3
|
import XEUtils from 'xe-utils'
|
|
4
4
|
import { getConfig, getIcon, getI18n, commands, createEvent, globalEvents, GLOBAL_EVENT_KEYS, useSize, renderEmptyElement } from '../../ui'
|
|
5
5
|
import { getFuncText, getLastZIndex, nextZIndex, isEnableConf } from '../../ui/src/utils'
|
|
6
|
-
import { updatePanelPlacement, getEventTargetNode, hasControlKey } from '../../ui/src/dom'
|
|
6
|
+
import { updatePanelPlacement, getEventTargetNode, hasControlKey, getPopupContainer } from '../../ui/src/dom'
|
|
7
7
|
import { getSlotVNs } from '../../ui/src/vn'
|
|
8
8
|
import { parseDateObj, parseDateValue, getDateByCode, handleValueFormat, hasDateValueType, hasTimestampValueType, isAllSameChar, getChunkDefaultNum, checkDateInputFormat } from '../../date-panel/src/util'
|
|
9
9
|
import { createComponentLog } from '../../ui/src/log'
|
|
@@ -1402,6 +1402,7 @@ export default defineVxeComponent({
|
|
|
1402
1402
|
const timeOpts = computeTimeOpts.value
|
|
1403
1403
|
const dateStartDate = computeDateStartDate.value
|
|
1404
1404
|
const dateEndDate = computeDateEndDate.value
|
|
1405
|
+
const { appendTo } = popupOpts
|
|
1405
1406
|
const { position } = shortcutOpts
|
|
1406
1407
|
const headerSlot = slots.header
|
|
1407
1408
|
const footerSlot = slots.footer
|
|
@@ -1414,7 +1415,7 @@ export default defineVxeComponent({
|
|
|
1414
1415
|
const showConfirmBtn = (showConfirmButton === null ? (isTimeOrDateTimeType || multiple) : showConfirmButton)
|
|
1415
1416
|
const showClearBtn = (showClearButton === null ? (isClearable && showConfirmBtn && type !== 'time') : showClearButton)
|
|
1416
1417
|
return h(Teleport, {
|
|
1417
|
-
to:
|
|
1418
|
+
to: getPopupContainer(appendTo),
|
|
1418
1419
|
disabled: btnTransfer ? !initialized : true
|
|
1419
1420
|
}, [
|
|
1420
1421
|
h('div', {
|
|
@@ -3,7 +3,7 @@ import { defineVxeComponent } from '../../ui/src/comp'
|
|
|
3
3
|
import XEUtils from 'xe-utils'
|
|
4
4
|
import { getConfig, getIcon, getI18n, commands, globalEvents, createEvent, GLOBAL_EVENT_KEYS, useSize, renderEmptyElement } from '../../ui'
|
|
5
5
|
import { getFuncText, getLastZIndex, nextZIndex, isEnableConf } from '../../ui/src/utils'
|
|
6
|
-
import { updatePanelPlacement, getEventTargetNode } from '../../ui/src/dom'
|
|
6
|
+
import { updatePanelPlacement, getEventTargetNode, getPopupContainer } from '../../ui/src/dom'
|
|
7
7
|
import { parseDateString, parseDateObj, getRangeDateByCode, handleValueFormat, hasTimestampValueType, hasDateValueType, parseDateValue, getNextMonth, getPrevMonth, getNextYear, getPrevYear } from '../../date-panel/src/util'
|
|
8
8
|
import { getSlotVNs } from '../../ui/src/vn'
|
|
9
9
|
import { createComponentLog } from '../../ui/src/log'
|
|
@@ -1240,6 +1240,7 @@ export default defineVxeComponent({
|
|
|
1240
1240
|
const defaultDates = computeDefaultDates.value
|
|
1241
1241
|
const defaultTimes = computeDefaultTimes.value
|
|
1242
1242
|
const timeOpts = computeTimeOpts.value
|
|
1243
|
+
const { appendTo } = popupOpts
|
|
1243
1244
|
const { startLabel, endLabel } = panelLabelObj
|
|
1244
1245
|
const { position } = shortcutOpts
|
|
1245
1246
|
const headerSlot = slots.header
|
|
@@ -1255,7 +1256,7 @@ export default defineVxeComponent({
|
|
|
1255
1256
|
const showConfirmBtn = (showConfirmButton === null ? (isTimeOrDateTimeType || !autoClose) : showConfirmButton)
|
|
1256
1257
|
const showClearBtn = (showClearButton === null ? isClearable : showClearButton)
|
|
1257
1258
|
return h(Teleport, {
|
|
1258
|
-
to:
|
|
1259
|
+
to: getPopupContainer(appendTo),
|
|
1259
1260
|
disabled: btnTransfer ? !initialized : true
|
|
1260
1261
|
}, [
|
|
1261
1262
|
h('div', {
|
|
@@ -3,7 +3,7 @@ import { defineVxeComponent } from '../../ui/src/comp'
|
|
|
3
3
|
import XEUtils from 'xe-utils'
|
|
4
4
|
import { useSize, getIcon, getConfig, getI18n, globalEvents, GLOBAL_EVENT_KEYS, createEvent, renderEmptyElement } from '../../ui'
|
|
5
5
|
import { getLastZIndex, nextZIndex, getFuncText } from '../../ui/src/utils'
|
|
6
|
-
import { getDomNode, toCssUnit } from '../../ui/src/dom'
|
|
6
|
+
import { getDomNode, getPopupContainer, toCssUnit } from '../../ui/src/dom'
|
|
7
7
|
import { getSlotVNs } from '../../ui/src/vn'
|
|
8
8
|
import VxeButtonComponent from '../../button'
|
|
9
9
|
import VxeLoadingComponent from '../../loading'
|
|
@@ -106,6 +106,10 @@ export default defineVxeComponent({
|
|
|
106
106
|
type: Boolean as PropType<VxeDrawerPropTypes.Transfer>,
|
|
107
107
|
default: () => getConfig().drawer.transfer
|
|
108
108
|
},
|
|
109
|
+
appendTo: {
|
|
110
|
+
type: [String, Function] as PropType<VxeDrawerPropTypes.AppendTo>,
|
|
111
|
+
default: () => getConfig().drawer.appendTo
|
|
112
|
+
},
|
|
109
113
|
padding: {
|
|
110
114
|
type: Boolean as PropType<VxeDrawerPropTypes.Padding>,
|
|
111
115
|
default: () => getConfig().drawer.padding
|
|
@@ -566,14 +570,14 @@ export default defineVxeComponent({
|
|
|
566
570
|
}
|
|
567
571
|
|
|
568
572
|
const renderVN = () => {
|
|
569
|
-
const { slots: propSlots = {}, className, position, loading, lockScroll, padding, lockView, mask, resize, destroyOnClose } = props
|
|
573
|
+
const { slots: propSlots = {}, className, position, loading, lockScroll, padding, lockView, mask, resize, appendTo, destroyOnClose } = props
|
|
570
574
|
const { initialized, contentVisible, visible } = reactData
|
|
571
575
|
const asideSlot = slots.aside || propSlots.aside
|
|
572
576
|
const vSize = computeSize.value
|
|
573
577
|
const dragType = computeDragType.value
|
|
574
578
|
const btnTransfer = computeBtnTransfer.value
|
|
575
579
|
return h(Teleport, {
|
|
576
|
-
to:
|
|
580
|
+
to: getPopupContainer(appendTo),
|
|
577
581
|
disabled: btnTransfer ? !initialized : true
|
|
578
582
|
}, [
|
|
579
583
|
h('div', {
|
|
@@ -2,7 +2,7 @@ import { h, Teleport, PropType, ref, inject, watch, computed, provide, onBeforeU
|
|
|
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, toCssUnit, updatePanelPlacement } from '../../ui/src/dom'
|
|
5
|
+
import { getEventTargetNode, getPopupContainer, toCssUnit, 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
|
import VxeInputComponent from '../../input/src/input'
|
|
@@ -606,6 +606,7 @@ export default defineVxeComponent({
|
|
|
606
606
|
const inpPlaceholder = computeInpPlaceholder.value
|
|
607
607
|
const wrapperStyle = computeWrapperStyle.value
|
|
608
608
|
const popupOpts = computePopupOpts.value
|
|
609
|
+
const { appendTo } = popupOpts
|
|
609
610
|
const ppClassName = popupOpts.className || props.popupClassName
|
|
610
611
|
|
|
611
612
|
if (formReadonly) {
|
|
@@ -664,7 +665,7 @@ export default defineVxeComponent({
|
|
|
664
665
|
])
|
|
665
666
|
]),
|
|
666
667
|
h(Teleport, {
|
|
667
|
-
to:
|
|
668
|
+
to: getPopupContainer(appendTo),
|
|
668
669
|
disabled: btnTransfer ? !initialized : true
|
|
669
670
|
}, [
|
|
670
671
|
h('div', {
|
|
@@ -2,7 +2,7 @@ import { ref, h, reactive, Teleport, PropType, inject, resolveComponent, watch,
|
|
|
2
2
|
import { defineVxeComponent } from '../../ui/src/comp'
|
|
3
3
|
import XEUtils from 'xe-utils'
|
|
4
4
|
import { VxeUI, createEvent, permission, useSize, globalEvents, renderEmptyElement } from '../../ui'
|
|
5
|
-
import { scrollToView, toCssUnit } from '../../ui/src/dom'
|
|
5
|
+
import { getPopupContainer, scrollToView, toCssUnit } from '../../ui/src/dom'
|
|
6
6
|
import { getLastZIndex, nextZIndex, isEnableConf } from '../../ui/src/utils'
|
|
7
7
|
import { getSlotVNs } from '../../ui/src/vn'
|
|
8
8
|
import { createComponentLog } from '../../ui/src/log'
|
|
@@ -70,7 +70,11 @@ export default defineVxeComponent({
|
|
|
70
70
|
type: String as PropType<VxeMenuPropTypes.Size>,
|
|
71
71
|
default: () => getConfig().menu.size || getConfig().size
|
|
72
72
|
},
|
|
73
|
-
menuConfig: Object as PropType<VxeMenuPropTypes.MenuConfig
|
|
73
|
+
menuConfig: Object as PropType<VxeMenuPropTypes.MenuConfig>,
|
|
74
|
+
appendTo: {
|
|
75
|
+
type: [String, Function] as PropType<VxeMenuPropTypes.AppendTo>,
|
|
76
|
+
default: () => getConfig().menu.appendTo
|
|
77
|
+
}
|
|
74
78
|
},
|
|
75
79
|
emits: [
|
|
76
80
|
'update:modelValue',
|
|
@@ -672,7 +676,7 @@ export default defineVxeComponent({
|
|
|
672
676
|
}
|
|
673
677
|
|
|
674
678
|
const renderVN = () => {
|
|
675
|
-
const { loading, collapseFixed } = props
|
|
679
|
+
const { loading, collapseFixed, appendTo } = props
|
|
676
680
|
const { initialized, menuList, collapseStyle, isEnterCollapse } = reactData
|
|
677
681
|
const vSize = computeSize.value
|
|
678
682
|
const isCollapsed = computeIsCollapsed.value
|
|
@@ -711,7 +715,7 @@ export default defineVxeComponent({
|
|
|
711
715
|
}, footerSlot(stParams))
|
|
712
716
|
: renderEmptyElement($xeMenu),
|
|
713
717
|
h(Teleport, {
|
|
714
|
-
to:
|
|
718
|
+
to: getPopupContainer(appendTo),
|
|
715
719
|
disabled: !initialized
|
|
716
720
|
}, [
|
|
717
721
|
h('div', {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { h, Teleport, ref, Ref, inject, computed, reactive, provide, nextTick, watch, PropType, VNode, onMounted, onUnmounted } from 'vue'
|
|
2
2
|
import { defineVxeComponent } from '../../ui/src/comp'
|
|
3
3
|
import XEUtils from 'xe-utils'
|
|
4
|
-
import { getDomNode, getEventTargetNode, toCssUnit } from '../../ui/src/dom'
|
|
4
|
+
import { getDomNode, getEventTargetNode, getPopupContainer, toCssUnit } from '../../ui/src/dom'
|
|
5
5
|
import { getLastZIndex, nextZIndex, getSubLastZIndex, nextSubZIndex, getFuncText, handleBooleanDefaultValue } from '../../ui/src/utils'
|
|
6
6
|
import { VxeUI, getConfig, getIcon, getI18n, globalEvents, GLOBAL_EVENT_KEYS, createEvent, useSize, renderEmptyElement } from '../../ui'
|
|
7
7
|
import VxeButtonComponent from '../../button'
|
|
@@ -163,6 +163,10 @@ export default defineVxeComponent({
|
|
|
163
163
|
type: Boolean as PropType<VxeModalPropTypes.Transfer>,
|
|
164
164
|
default: () => getConfig().modal.transfer
|
|
165
165
|
},
|
|
166
|
+
appendTo: {
|
|
167
|
+
type: [String, Function] as PropType<VxeModalPropTypes.AppendTo>,
|
|
168
|
+
default: () => getConfig().modal.appendTo
|
|
169
|
+
},
|
|
166
170
|
storage: {
|
|
167
171
|
type: Boolean as PropType<VxeModalPropTypes.Storage>,
|
|
168
172
|
default: () => getConfig().modal.storage
|
|
@@ -993,7 +997,7 @@ export default defineVxeComponent({
|
|
|
993
997
|
const { visibleHeight, visibleWidth } = getDomNode()
|
|
994
998
|
const marginSize = XEUtils.toNumber(props.marginSize)
|
|
995
999
|
const targetElem = evnt.target as HTMLSpanElement
|
|
996
|
-
const type = targetElem.getAttribute('type')
|
|
1000
|
+
const type = targetElem.getAttribute('data-type')
|
|
997
1001
|
const minWidth = XEUtils.toNumber(props.minWidth)
|
|
998
1002
|
const minHeight = XEUtils.toNumber(props.minHeight)
|
|
999
1003
|
const maxWidth = visibleWidth
|
|
@@ -1377,7 +1381,7 @@ export default defineVxeComponent({
|
|
|
1377
1381
|
}
|
|
1378
1382
|
|
|
1379
1383
|
const renderVN = () => {
|
|
1380
|
-
const { slots: propSlots = {}, className, type, animat, draggable, iconStatus, position, loading, destroyOnClose, status, lockScroll, padding, lockView, mask, resize } = props
|
|
1384
|
+
const { slots: propSlots = {}, className, type, animat, draggable, iconStatus, position, loading, destroyOnClose, status, lockScroll, padding, lockView, mask, resize, appendTo } = props
|
|
1381
1385
|
const { initialized, modalTop, contentVisible, visible, zoomStatus } = reactData
|
|
1382
1386
|
const asideSlot = slots.aside || propSlots.aside
|
|
1383
1387
|
const vSize = computeSize.value
|
|
@@ -1390,7 +1394,7 @@ export default defineVxeComponent({
|
|
|
1390
1394
|
ons.onMouseout = selfMouseoutEvent
|
|
1391
1395
|
}
|
|
1392
1396
|
return h(Teleport, {
|
|
1393
|
-
to:
|
|
1397
|
+
to: getPopupContainer(appendTo),
|
|
1394
1398
|
disabled: btnTransfer ? !initialized : true
|
|
1395
1399
|
}, [
|
|
1396
1400
|
h('div', {
|
|
@@ -1454,7 +1458,7 @@ export default defineVxeComponent({
|
|
|
1454
1458
|
}, ['wl', 'wr', 'swst', 'sest', 'st', 'swlb', 'selb', 'sb'].map(type => {
|
|
1455
1459
|
return h('span', {
|
|
1456
1460
|
class: `${type}-resize`,
|
|
1457
|
-
type: type,
|
|
1461
|
+
'data-type': type,
|
|
1458
1462
|
onMousedown: dragEvent
|
|
1459
1463
|
})
|
|
1460
1464
|
}))
|
|
@@ -2,7 +2,7 @@ import { h, Teleport, PropType, ref, inject, computed, provide, onUnmounted, rea
|
|
|
2
2
|
import { defineVxeComponent } from '../../ui/src/comp'
|
|
3
3
|
import XEUtils from 'xe-utils'
|
|
4
4
|
import { VxeUI, getConfig, getIcon, getI18n, globalEvents, GLOBAL_EVENT_KEYS, createEvent, useSize, renderEmptyElement } from '../../ui'
|
|
5
|
-
import { getEventTargetNode, toCssUnit, updatePanelPlacement } from '../../ui/src/dom'
|
|
5
|
+
import { getEventTargetNode, getPopupContainer, toCssUnit, updatePanelPlacement } from '../../ui/src/dom'
|
|
6
6
|
import { getLastZIndex, nextZIndex, getFuncText, eqEmptyValue } from '../../ui/src/utils'
|
|
7
7
|
import { getSlotVNs } from '../../ui/src/vn'
|
|
8
8
|
import { createComponentLog } from '../../ui/src/log'
|
|
@@ -1621,6 +1621,7 @@ export default defineVxeComponent({
|
|
|
1621
1621
|
const inpPlaceholder = computeInpPlaceholder.value
|
|
1622
1622
|
const popupWrapperStyle = computePopupWrapperStyle.value
|
|
1623
1623
|
const popupOpts = computePopupOpts.value
|
|
1624
|
+
const { appendTo } = popupOpts
|
|
1624
1625
|
const defaultSlot = slots.default
|
|
1625
1626
|
const headerSlot = slots.header
|
|
1626
1627
|
const footerSlot = slots.footer
|
|
@@ -1680,7 +1681,7 @@ export default defineVxeComponent({
|
|
|
1680
1681
|
}
|
|
1681
1682
|
: {}),
|
|
1682
1683
|
h(Teleport, {
|
|
1683
|
-
to:
|
|
1684
|
+
to: getPopupContainer(appendTo),
|
|
1684
1685
|
disabled: btnTransfer ? !initialized : true
|
|
1685
1686
|
}, [
|
|
1686
1687
|
h('div', {
|
|
@@ -821,6 +821,7 @@ export default defineVxeComponent({
|
|
|
821
821
|
const { immediate } = resizeOpts
|
|
822
822
|
const visibleItems = computeVisibleItems.value
|
|
823
823
|
const { autoItems } = computeAutoItems.value
|
|
824
|
+
const isOnlyView = visibleItems.length <= 1
|
|
824
825
|
const itemVNs: VNode[] = []
|
|
825
826
|
itemList.forEach((prevItem, index) => {
|
|
826
827
|
const { id, name, slots, renderHeight, resizeHeight, foldHeight, renderWidth, resizeWidth, foldWidth, isExpand } = prevItem
|
|
@@ -887,7 +888,8 @@ export default defineVxeComponent({
|
|
|
887
888
|
})
|
|
888
889
|
return h('div', {
|
|
889
890
|
class: ['vxe-splitter-wrapper', {
|
|
890
|
-
'is--ah-btn': autoHideButton
|
|
891
|
+
'is--ah-btn': autoHideButton,
|
|
892
|
+
'is--only-view': isOnlyView
|
|
891
893
|
}]
|
|
892
894
|
}, itemVNs)
|
|
893
895
|
}
|
|
@@ -2,7 +2,7 @@ import { ref, h, PropType, computed, inject, watch, provide, nextTick, Teleport,
|
|
|
2
2
|
import { defineVxeComponent } from '../../ui/src/comp'
|
|
3
3
|
import XEUtils from 'xe-utils'
|
|
4
4
|
import { VxeUI, getConfig, getIcon, globalEvents, getI18n, createEvent, useSize, renderEmptyElement } from '../../ui'
|
|
5
|
-
import { getEventTargetNode, updatePanelPlacement, toCssUnit } from '../../ui/src/dom'
|
|
5
|
+
import { getEventTargetNode, updatePanelPlacement, toCssUnit, getPopupContainer } from '../../ui/src/dom'
|
|
6
6
|
import { getOnName } from '../../ui/src/vn'
|
|
7
7
|
import { getLastZIndex, nextZIndex } from '../../ui/src/utils'
|
|
8
8
|
import { createComponentLog } from '../../ui/src/log'
|
|
@@ -649,6 +649,7 @@ export default defineVxeComponent({
|
|
|
649
649
|
const selectGridOpts = computeSelectGridOpts.value
|
|
650
650
|
const rowOpts = computeRowOpts.value
|
|
651
651
|
const popupWrapperStyle = computePopupWrapperStyle.value
|
|
652
|
+
const { appendTo } = popupOpts
|
|
652
653
|
const headerSlot = slots.header
|
|
653
654
|
const footerSlot = slots.footer
|
|
654
655
|
const prefixSlot = slots.prefix
|
|
@@ -695,7 +696,7 @@ export default defineVxeComponent({
|
|
|
695
696
|
}
|
|
696
697
|
: {}),
|
|
697
698
|
h(Teleport, {
|
|
698
|
-
to:
|
|
699
|
+
to: getPopupContainer(appendTo),
|
|
699
700
|
disabled: btnTransfer ? !initialized : true
|
|
700
701
|
}, [
|
|
701
702
|
h('div', {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ref, computed, h, PropType, nextTick, inject, provide, reactive, Teleport, onMounted, onBeforeUnmount, watch, VNode } from 'vue'
|
|
2
2
|
import { defineVxeComponent } from '../../ui/src/comp'
|
|
3
3
|
import { getConfig, getI18n, getIcon, globalEvents, createEvent, useSize, renderEmptyElement } from '../../ui'
|
|
4
|
-
import { getEventTargetNode, updatePanelPlacement, toCssUnit } from '../../ui/src/dom'
|
|
4
|
+
import { getEventTargetNode, updatePanelPlacement, toCssUnit, getPopupContainer } from '../../ui/src/dom'
|
|
5
5
|
import { getLastZIndex, nextZIndex, deModelValue } from '../../ui/src/utils'
|
|
6
6
|
import { createComponentLog } from '../../ui/src/log'
|
|
7
7
|
import { getSlotVNs } from '../../ui/src/vn'
|
|
@@ -784,6 +784,7 @@ export default defineVxeComponent({
|
|
|
784
784
|
const footerSlot = slots.footer
|
|
785
785
|
const prefixSlot = slots.prefix
|
|
786
786
|
const popupOpts = computePopupOpts.value
|
|
787
|
+
const { appendTo } = popupOpts
|
|
787
788
|
const ppClassName = popupOpts.className || props.popupClassName
|
|
788
789
|
|
|
789
790
|
if (formReadonly) {
|
|
@@ -861,7 +862,7 @@ export default defineVxeComponent({
|
|
|
861
862
|
}
|
|
862
863
|
: {}),
|
|
863
864
|
h(Teleport, {
|
|
864
|
-
to:
|
|
865
|
+
to: getPopupContainer(appendTo),
|
|
865
866
|
disabled: btnTransfer ? !initialized : true
|
|
866
867
|
}, [
|
|
867
868
|
h('div', {
|
package/packages/ui/src/dom.ts
CHANGED
|
@@ -278,3 +278,7 @@ export function updatePanelPlacement (targetElem: HTMLElement | null | undefined
|
|
|
278
278
|
placement: panelPlacement
|
|
279
279
|
}
|
|
280
280
|
}
|
|
281
|
+
|
|
282
|
+
export function getPopupContainer (appendTo: string | HTMLElement | ((params: any) => string | HTMLElement) | undefined) {
|
|
283
|
+
return appendTo ? ((XEUtils.isFunction(appendTo) ? appendTo({}) : appendTo) || 'body') : 'body'
|
|
284
|
+
}
|
|
@@ -102,7 +102,7 @@ export namespace VxeButtonPropTypes {
|
|
|
102
102
|
/**
|
|
103
103
|
* 挂载到指定元素下
|
|
104
104
|
*/
|
|
105
|
-
appendTo?: string | HTMLElement | (() => string | HTMLElement)
|
|
105
|
+
appendTo?: string | HTMLElement | ((params: {}) => string | HTMLElement)
|
|
106
106
|
zIndex?: number | string
|
|
107
107
|
className?: string | ((params: { $button: VxeButtonConstructor }) => string)
|
|
108
108
|
}
|
|
@@ -72,7 +72,7 @@ export namespace VxeColorPickerPropTypes {
|
|
|
72
72
|
/**
|
|
73
73
|
* 挂载到指定元素下
|
|
74
74
|
*/
|
|
75
|
-
appendTo?: string | HTMLElement | (() => string | HTMLElement)
|
|
75
|
+
appendTo?: string | HTMLElement | ((params: {}) => string | HTMLElement)
|
|
76
76
|
width?: number | string
|
|
77
77
|
height?: number | string
|
|
78
78
|
zIndex?: number | string
|
|
@@ -124,7 +124,7 @@ export namespace VxeDatePickerPropTypes {
|
|
|
124
124
|
/**
|
|
125
125
|
* 挂载到指定元素下
|
|
126
126
|
*/
|
|
127
|
-
appendTo?: string | HTMLElement | (() => string | HTMLElement)
|
|
127
|
+
appendTo?: string | HTMLElement | ((params: {}) => string | HTMLElement)
|
|
128
128
|
width?: number | string
|
|
129
129
|
height?: number | string
|
|
130
130
|
zIndex?: number | string
|
|
@@ -107,7 +107,7 @@ export namespace VxeDateRangePickerPropTypes {
|
|
|
107
107
|
/**
|
|
108
108
|
* 挂载到指定元素下
|
|
109
109
|
*/
|
|
110
|
-
appendTo?: string | HTMLElement | (() => string | HTMLElement)
|
|
110
|
+
appendTo?: string | HTMLElement | ((params: {}) => string | HTMLElement)
|
|
111
111
|
width?: number | string
|
|
112
112
|
height?: number | string
|
|
113
113
|
zIndex?: number | string
|
|
@@ -64,6 +64,7 @@ export namespace VxeDrawerPropTypes {
|
|
|
64
64
|
export type DestroyOnClose = boolean
|
|
65
65
|
export type ShowTitleOverflow = boolean
|
|
66
66
|
export type Transfer = boolean
|
|
67
|
+
export type AppendTo = string | HTMLElement | ((params: {}) => string | HTMLElement)
|
|
67
68
|
export type Padding = boolean
|
|
68
69
|
export type BeforeHideMethod = (params: VxeDrawerDefines.DrawerVisibleParams) => Promise<any>
|
|
69
70
|
export type Slots = VxeDrawerSlots
|
|
@@ -100,7 +101,14 @@ export interface VxeDrawerProps {
|
|
|
100
101
|
zIndex?: VxeDrawerPropTypes.ZIndex
|
|
101
102
|
destroyOnClose?: VxeDrawerPropTypes.DestroyOnClose
|
|
102
103
|
showTitleOverflow?: VxeDrawerPropTypes.ShowTitleOverflow
|
|
104
|
+
/**
|
|
105
|
+
* 是否启用元素挂载
|
|
106
|
+
*/
|
|
103
107
|
transfer?: VxeDrawerPropTypes.Transfer
|
|
108
|
+
/**
|
|
109
|
+
* 挂载到指定元素下
|
|
110
|
+
*/
|
|
111
|
+
appendTo?: VxeDrawerPropTypes.AppendTo
|
|
104
112
|
padding?: VxeDrawerPropTypes.Padding
|
|
105
113
|
beforeHideMethod?: VxeDrawerPropTypes.BeforeHideMethod
|
|
106
114
|
slots?: VxeDrawerPropTypes.Slots
|
|
@@ -622,6 +622,14 @@ export interface GanttReactData<D = any> extends GridReactData<D> {
|
|
|
622
622
|
showRightView: boolean
|
|
623
623
|
taskScaleList: VxeGanttDefines.ColumnScaleObj[]
|
|
624
624
|
tableLinks: VxeGanttDefines.LinkConfObj[]
|
|
625
|
+
// 是否存在纵向滚动条
|
|
626
|
+
overflowY: boolean
|
|
627
|
+
// 是否存在横向滚动条
|
|
628
|
+
overflowX: boolean
|
|
629
|
+
// 纵向滚动条的宽度
|
|
630
|
+
scrollbarWidth: number
|
|
631
|
+
// 横向滚动条的高度
|
|
632
|
+
scrollbarHeight: number
|
|
625
633
|
|
|
626
634
|
// 存放 bar tooltip 相关信息
|
|
627
635
|
barTipStore: {
|
|
@@ -66,7 +66,14 @@ export namespace VxeIconPickerPropTypes {
|
|
|
66
66
|
* 触发方式
|
|
67
67
|
*/
|
|
68
68
|
trigger?: 'default' | 'icon' | 'manual' | '' | null
|
|
69
|
+
/**
|
|
70
|
+
* 是否启用元素挂载
|
|
71
|
+
*/
|
|
69
72
|
transfer?: boolean
|
|
73
|
+
/**
|
|
74
|
+
* 挂载到指定元素下
|
|
75
|
+
*/
|
|
76
|
+
appendTo?: string | HTMLElement | ((params: {}) => string | HTMLElement)
|
|
70
77
|
/**
|
|
71
78
|
* 每行显示出多少个图标,如果设置了 chunkWidth 则该参数无效
|
|
72
79
|
*/
|
|
@@ -39,7 +39,6 @@ export namespace VxeMenuPropTypes {
|
|
|
39
39
|
linkUrl?: string
|
|
40
40
|
linkTarget?: string
|
|
41
41
|
routerLink?: string
|
|
42
|
-
routerTarget?: string
|
|
43
42
|
}
|
|
44
43
|
|
|
45
44
|
export interface MenuOption {
|
|
@@ -85,6 +84,7 @@ export namespace VxeMenuPropTypes {
|
|
|
85
84
|
currentOption: VxeMenuPropTypes.MenuOption
|
|
86
85
|
}): boolean
|
|
87
86
|
}
|
|
87
|
+
export type AppendTo = string | HTMLElement | ((params: {}) => string | HTMLElement)
|
|
88
88
|
}
|
|
89
89
|
|
|
90
90
|
export interface VxeMenuProps {
|
|
@@ -106,6 +106,10 @@ export interface VxeMenuProps {
|
|
|
106
106
|
expandKeys?: VxeMenuPropTypes.ExpandKeys
|
|
107
107
|
options?: VxeMenuPropTypes.Options
|
|
108
108
|
menuConfig?: VxeMenuPropTypes.MenuConfig
|
|
109
|
+
/**
|
|
110
|
+
* 挂载到指定元素下
|
|
111
|
+
*/
|
|
112
|
+
appendTo?: VxeMenuPropTypes.AppendTo
|
|
109
113
|
}
|
|
110
114
|
|
|
111
115
|
export interface MenuPrivateComputed {
|
|
@@ -114,6 +114,7 @@ export namespace VxeModalPropTypes {
|
|
|
114
114
|
export type DestroyOnClose = boolean
|
|
115
115
|
export type ShowTitleOverflow = boolean
|
|
116
116
|
export type Transfer = boolean
|
|
117
|
+
export type AppendTo = string | HTMLElement | ((params: {}) => string | HTMLElement)
|
|
117
118
|
export type Storage = boolean
|
|
118
119
|
export type StorageKey = string
|
|
119
120
|
export type Animat = boolean
|
|
@@ -171,7 +172,14 @@ export interface VxeModalProps {
|
|
|
171
172
|
remember?: VxeModalPropTypes.Remember
|
|
172
173
|
destroyOnClose?: VxeModalPropTypes.DestroyOnClose
|
|
173
174
|
showTitleOverflow?: VxeModalPropTypes.ShowTitleOverflow
|
|
175
|
+
/**
|
|
176
|
+
* 是否启用元素挂载
|
|
177
|
+
*/
|
|
174
178
|
transfer?: VxeModalPropTypes.Transfer
|
|
179
|
+
/**
|
|
180
|
+
* 挂载到指定元素下
|
|
181
|
+
*/
|
|
182
|
+
appendTo?: VxeModalPropTypes.AppendTo
|
|
175
183
|
storage?: VxeModalPropTypes.Storage
|
|
176
184
|
storageKey?: VxeModalPropTypes.StorageKey
|
|
177
185
|
animat?: VxeModalPropTypes.Animat
|
|
@@ -70,7 +70,7 @@ export namespace VxePulldownPropTypes {
|
|
|
70
70
|
/**
|
|
71
71
|
* 挂载到指定元素下
|
|
72
72
|
*/
|
|
73
|
-
appendTo?: string | HTMLElement | (() => string | HTMLElement)
|
|
73
|
+
appendTo?: string | HTMLElement | ((params: {}) => string | HTMLElement)
|
|
74
74
|
width?: number | string
|
|
75
75
|
height?: number | string
|
|
76
76
|
zIndex?: number | string
|
|
@@ -166,7 +166,7 @@ export namespace VxeSelectPropTypes {
|
|
|
166
166
|
/**
|
|
167
167
|
* 挂载到指定元素下
|
|
168
168
|
*/
|
|
169
|
-
appendTo?: string | HTMLElement | (() => string | HTMLElement)
|
|
169
|
+
appendTo?: string | HTMLElement | ((params: {}) => string | HTMLElement)
|
|
170
170
|
width?: number | string
|
|
171
171
|
height?: number | string
|
|
172
172
|
zIndex?: number | string
|
|
@@ -66,7 +66,7 @@ export namespace VxeTableSelectPropTypes {
|
|
|
66
66
|
/**
|
|
67
67
|
* 挂载到指定元素下
|
|
68
68
|
*/
|
|
69
|
-
appendTo?: string | HTMLElement | (() => string | HTMLElement)
|
|
69
|
+
appendTo?: string | HTMLElement | ((params: {}) => string | HTMLElement)
|
|
70
70
|
width?: number | string
|
|
71
71
|
height?: number | string
|
|
72
72
|
zIndex?: number | string
|
|
@@ -1016,7 +1016,10 @@ export namespace VxeTablePropTypes {
|
|
|
1016
1016
|
resize?: VxeModalPropTypes.Resize
|
|
1017
1017
|
escClosable?: VxeModalPropTypes.EscClosable
|
|
1018
1018
|
maskClosable?: VxeModalPropTypes.MaskClosable
|
|
1019
|
-
|
|
1019
|
+
/**
|
|
1020
|
+
* 是否启用元素挂载
|
|
1021
|
+
*/
|
|
1022
|
+
transfer?: boolean
|
|
1020
1023
|
}
|
|
1021
1024
|
/**
|
|
1022
1025
|
* 抽屉模式配置项,用于 mode='drawer'
|
|
@@ -1031,7 +1034,10 @@ export namespace VxeTablePropTypes {
|
|
|
1031
1034
|
resize?: VxeDrawerPropTypes.Resize
|
|
1032
1035
|
escClosable?: VxeDrawerPropTypes.EscClosable
|
|
1033
1036
|
maskClosable?: VxeDrawerPropTypes.MaskClosable
|
|
1034
|
-
|
|
1037
|
+
/**
|
|
1038
|
+
* 是否启用元素挂载
|
|
1039
|
+
*/
|
|
1040
|
+
transfer?: boolean
|
|
1035
1041
|
}
|
|
1036
1042
|
/**
|
|
1037
1043
|
* 默认模式配置项
|
|
@@ -1042,6 +1048,9 @@ export namespace VxeTablePropTypes {
|
|
|
1042
1048
|
minWidth?: number | string
|
|
1043
1049
|
maxWidth?: number | string
|
|
1044
1050
|
maxHeight?: number | string
|
|
1051
|
+
/**
|
|
1052
|
+
* 是否启用元素挂载
|
|
1053
|
+
*/
|
|
1045
1054
|
transfer?: boolean
|
|
1046
1055
|
}
|
|
1047
1056
|
trigger?: 'manual' | 'hover' | 'click' | '' | null
|
|
@@ -1370,6 +1379,9 @@ export namespace VxeTablePropTypes {
|
|
|
1370
1379
|
}): boolean
|
|
1371
1380
|
className?: string
|
|
1372
1381
|
zIndex?: number
|
|
1382
|
+
/**
|
|
1383
|
+
* 是否启用元素挂载
|
|
1384
|
+
*/
|
|
1373
1385
|
transfer?: boolean
|
|
1374
1386
|
iconNone?: string
|
|
1375
1387
|
iconMatch?: string
|
|
@@ -1846,6 +1858,9 @@ export namespace VxeTablePropTypes {
|
|
|
1846
1858
|
*/
|
|
1847
1859
|
className?: string
|
|
1848
1860
|
zIndex?: number
|
|
1861
|
+
/**
|
|
1862
|
+
* 是否启用元素挂载
|
|
1863
|
+
*/
|
|
1849
1864
|
transfer?: boolean
|
|
1850
1865
|
destroyOnClose?: boolean
|
|
1851
1866
|
/**
|
|
@@ -136,7 +136,7 @@ export namespace VxeTreeSelectPropTypes {
|
|
|
136
136
|
/**
|
|
137
137
|
* 挂载到指定元素下
|
|
138
138
|
*/
|
|
139
|
-
appendTo?: string | HTMLElement | (() => string | HTMLElement)
|
|
139
|
+
appendTo?: string | HTMLElement | ((params: {}) => string | HTMLElement)
|
|
140
140
|
width?: number | string
|
|
141
141
|
height?: number | string
|
|
142
142
|
zIndex?: number | string
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|