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 {
|
export default {
|
||||||
methods: {
|
methods: {
|
||||||
getPopupContainer(el, dialogContext) {
|
getPopupContainer(el, dialogContext) {
|
||||||
if(dialogContext) {
|
if (dialogContext) {
|
||||||
return dialogContext.$refs.wrap;
|
return dialogContext.getDialogWrap();
|
||||||
} else {
|
} else {
|
||||||
return document.body;
|
return document.body;
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,8 +12,8 @@ ConfigProvider 使用 Vue 的 [provide / inject](https://vuejs.org/v2/api/#provi
|
||||||
export default {
|
export default {
|
||||||
methods: {
|
methods: {
|
||||||
getPopupContainer(el, dialogContext) {
|
getPopupContainer(el, dialogContext) {
|
||||||
if(dialogContext) {
|
if (dialogContext) {
|
||||||
return dialogContext.$refs.wrap;
|
return dialogContext.getDialogWrap();
|
||||||
} else {
|
} else {
|
||||||
return document.body;
|
return document.body;
|
||||||
}
|
}
|
||||||
|
|
|
@ -112,6 +112,10 @@ export default {
|
||||||
clearTimeout(this.timeoutId);
|
clearTimeout(this.timeoutId);
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 对外暴露的 api 不要更改名称或删除
|
||||||
|
getDialogWrap() {
|
||||||
|
return this.$refs.wrap;
|
||||||
|
},
|
||||||
updatedCallback(visible) {
|
updatedCallback(visible) {
|
||||||
const mousePosition = this.mousePosition;
|
const mousePosition = this.mousePosition;
|
||||||
if (this.visible) {
|
if (this.visible) {
|
||||||
|
|
Loading…
Reference in New Issue