feat: dialog add getDialogWrap
parent
97dce9db99
commit
76c6ce6f3d
|
@ -12,8 +12,8 @@ This component provides a configuration to all Vue components underneath itself
|
|||
export default {
|
||||
methods: {
|
||||
getPopupContainer(el, dialogContext) {
|
||||
if(dialogContext) {
|
||||
return dialogContext.$refs.wrap;
|
||||
if (dialogContext) {
|
||||
return dialogContext.getDialogWrap();
|
||||
} else {
|
||||
return document.body;
|
||||
}
|
||||
|
|
|
@ -12,8 +12,8 @@ ConfigProvider 使用 Vue 的 [provide / inject](https://vuejs.org/v2/api/#provi
|
|||
export default {
|
||||
methods: {
|
||||
getPopupContainer(el, dialogContext) {
|
||||
if(dialogContext) {
|
||||
return dialogContext.$refs.wrap;
|
||||
if (dialogContext) {
|
||||
return dialogContext.getDialogWrap();
|
||||
} else {
|
||||
return document.body;
|
||||
}
|
||||
|
|
|
@ -112,6 +112,10 @@ export default {
|
|||
clearTimeout(this.timeoutId);
|
||||
},
|
||||
methods: {
|
||||
// 对外暴露的 api 不要更改名称或删除
|
||||
getDialogWrap() {
|
||||
return this.$refs.wrap;
|
||||
},
|
||||
updatedCallback(visible) {
|
||||
const mousePosition = this.mousePosition;
|
||||
if (this.visible) {
|
||||
|
|
Loading…
Reference in New Issue