From d7987d1e0a1c2c27ecb73a6b30bc343f0a71a070 Mon Sep 17 00:00:00 2001 From: yison Date: Wed, 20 Mar 2019 20:21:36 +0800 Subject: [PATCH] feat: Add Prop `autoClose` to Modal --- src/components/modal/modal.vue | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/components/modal/modal.vue b/src/components/modal/modal.vue index 3c62366d..4eb42241 100644 --- a/src/components/modal/modal.vue +++ b/src/components/modal/modal.vue @@ -122,6 +122,10 @@ type: Number, default: 1000 }, + autoClose: { + type: Boolean, + default: true + } }, data () { return { @@ -252,7 +256,9 @@ if (this.loading) { this.buttonLoading = true; } else { - this.visible = false; + if (this.autoClose) { + this.visible = false; + } this.$emit('input', false); } this.$emit('on-ok');