fix(message): getContainer prop doesn't work (#6942)
parent
2c4d4650da
commit
2f7f0e6928
|
@ -1,5 +1,13 @@
|
||||||
import PropTypes from './vue-types';
|
import PropTypes from './vue-types';
|
||||||
import { defineComponent, nextTick, onBeforeMount, onUpdated, Teleport, watch } from 'vue';
|
import {
|
||||||
|
defineComponent,
|
||||||
|
nextTick,
|
||||||
|
onBeforeMount,
|
||||||
|
onMounted,
|
||||||
|
onUpdated,
|
||||||
|
Teleport,
|
||||||
|
watch,
|
||||||
|
} from 'vue';
|
||||||
import { useInjectPortal } from '../vc-trigger/context';
|
import { useInjectPortal } from '../vc-trigger/context';
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
|
@ -17,6 +25,8 @@ export default defineComponent({
|
||||||
const { shouldRender } = useInjectPortal();
|
const { shouldRender } = useInjectPortal();
|
||||||
onBeforeMount(() => {
|
onBeforeMount(() => {
|
||||||
isSSR = false;
|
isSSR = false;
|
||||||
|
});
|
||||||
|
onMounted(() => {
|
||||||
if (shouldRender.value) {
|
if (shouldRender.value) {
|
||||||
container = props.getContainer();
|
container = props.getContainer();
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,7 +24,7 @@ export default (name: string, props: Record<any, any>) => {
|
||||||
() => props.getTargetContainer ?? configProvider.getTargetContainer?.value,
|
() => props.getTargetContainer ?? configProvider.getTargetContainer?.value,
|
||||||
);
|
);
|
||||||
const getPopupContainer = computed(
|
const getPopupContainer = computed(
|
||||||
() => props.getPopupContainer ?? configProvider.getPopupContainer?.value,
|
() => props.getContainer ?? props.getPopupContainer ?? configProvider.getPopupContainer?.value,
|
||||||
);
|
);
|
||||||
|
|
||||||
const dropdownMatchSelectWidth = computed<boolean | number>(
|
const dropdownMatchSelectWidth = computed<boolean | number>(
|
||||||
|
|
Loading…
Reference in New Issue