File tree Expand file tree Collapse file tree 3 files changed +8
-4
lines changed Expand file tree Collapse file tree 3 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -12,8 +12,8 @@ This component provides a configuration to all Vue components underneath itself
1212 export default {
1313 methods: {
1414 getPopupContainer (el , dialogContext ) {
15- if (dialogContext) {
16- return dialogContext .$refs . wrap ;
15+ if (dialogContext) {
16+ return dialogContext .getDialogWrap () ;
1717 } else {
1818 return document .body ;
1919 }
Original file line number Diff line number Diff line change @@ -12,8 +12,8 @@ ConfigProvider 使用 Vue 的 [provide / inject](https://vuejs.org/v2/api/#provi
1212 export default {
1313 methods: {
1414 getPopupContainer (el , dialogContext ) {
15- if (dialogContext) {
16- return dialogContext .$refs . wrap ;
15+ if (dialogContext) {
16+ return dialogContext .getDialogWrap () ;
1717 } else {
1818 return document .body ;
1919 }
Original file line number Diff line number Diff line change @@ -112,6 +112,10 @@ export default {
112112 clearTimeout ( this . timeoutId ) ;
113113 } ,
114114 methods : {
115+ // 对外暴露的 api 不要更改名称或删除
116+ getDialogWrap ( ) {
117+ return this . $refs . wrap ;
118+ } ,
115119 updatedCallback ( visible ) {
116120 const mousePosition = this . mousePosition ;
117121 if ( this . visible ) {
You can’t perform that action at this time.
0 commit comments