Skip to content

Commit 76c6ce6

Browse files
committed
feat: dialog add getDialogWrap
1 parent 97dce9d commit 76c6ce6

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

components/config-provider/index.en-US.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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
}

components/config-provider/index.zh-CN.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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
}

components/vc-dialog/Dialog.jsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff 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) {

0 commit comments

Comments
 (0)