mirror of
https://gitee.com/ant-design-vue/ant-design-vue.git
synced 2024-11-29 18:48:32 +08:00
fix(message): getContainer prop doesn't work (#6942)
This commit is contained in:
parent
2c4d4650da
commit
2f7f0e6928
@ -1,5 +1,13 @@
|
||||
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';
|
||||
|
||||
export default defineComponent({
|
||||
@ -17,6 +25,8 @@ export default defineComponent({
|
||||
const { shouldRender } = useInjectPortal();
|
||||
onBeforeMount(() => {
|
||||
isSSR = false;
|
||||
});
|
||||
onMounted(() => {
|
||||
if (shouldRender.value) {
|
||||
container = props.getContainer();
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ export default (name: string, props: Record<any, any>) => {
|
||||
() => props.getTargetContainer ?? configProvider.getTargetContainer?.value,
|
||||
);
|
||||
const getPopupContainer = computed(
|
||||
() => props.getPopupContainer ?? configProvider.getPopupContainer?.value,
|
||||
() => props.getContainer ?? props.getPopupContainer ?? configProvider.getPopupContainer?.value,
|
||||
);
|
||||
|
||||
const dropdownMatchSelectWidth = computed<boolean | number>(
|
||||
|
Loading…
Reference in New Issue
Block a user