mirror of
https://github.com/youzan/vant.git
synced 2025-10-21 11:17:41 +00:00
fix(Dialog): show not trigger close event when hidden (#5267)
This commit is contained in:
@@ -56,6 +56,11 @@ export default createComponent({
|
|||||||
handleAction(action) {
|
handleAction(action) {
|
||||||
this.$emit(action);
|
this.$emit(action);
|
||||||
|
|
||||||
|
// show not trigger close event when hidden
|
||||||
|
if (!this.value) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (this.beforeClose) {
|
if (this.beforeClose) {
|
||||||
this.loading[action] = true;
|
this.loading[action] = true;
|
||||||
this.beforeClose(action, state => {
|
this.beforeClose(action, state => {
|
||||||
|
Reference in New Issue
Block a user