Skip to content

Commit

Permalink
fix: createOnlyDialog等方法没有返回执行结果,导致异步执行错误(#507
Browse files Browse the repository at this point in the history
  • Loading branch information
kongjing committed May 18, 2023
1 parent eefe4a8 commit 3e41bd3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/vantui/src/dialog/create-only-dialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export function createOnlyDialog(Dialog) {
const name = actionNames[i]
if (name && Dialog[name])
Dialog_[name] = function (props) {
Dialog[name]({
return Dialog[name]({
...props,
selector: `#${id}`,
})
Expand Down
2 changes: 1 addition & 1 deletion packages/vantui/src/notify/create-only-notify.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export function createOnlyNotify(Notify) {
const name = actionNames[i]
if (name && Notify_[name]) {
Notify_[name] = function (props) {
Notify[name]({
return Notify[name]({
...props,
selector: `#${id}`,
})
Expand Down
2 changes: 1 addition & 1 deletion packages/vantui/src/toast/create-only-toast.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export function createOnlyToast(Toast) {
selector: `#${id}`,
}
}
Toast[actName](params)
return Toast[actName](params)
}
}
}
Expand Down

0 comments on commit 3e41bd3

Please sign in to comment.