解决 cl-popup teleport 位置异常
This commit is contained in:
@@ -1,10 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<!-- #ifdef H5 -->
|
<!-- #ifdef H5 -->
|
||||||
<teleport to="#app">
|
<teleport to="uni-app" :disabled="!enablePortal">
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
|
|
||||||
<!-- #ifdef MP -->
|
<!-- #ifdef MP -->
|
||||||
<root-portal>
|
<root-portal :enable="enablePortal">
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
<view
|
<view
|
||||||
class="cl-popup-wrapper"
|
class="cl-popup-wrapper"
|
||||||
@@ -196,6 +196,11 @@ const props = defineProps({
|
|||||||
keepAlive: {
|
keepAlive: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
|
},
|
||||||
|
// 是否启用 portal
|
||||||
|
enablePortal: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user