Skip to content

Commit

Permalink
feat(dialog): 新增dialog组件
Browse files Browse the repository at this point in the history
参考element的dialog,完成了设想的所有功能,页面间弹窗关闭的过渡效果还可以再优化
  • Loading branch information
linwens committed Dec 18, 2019
1 parent 4248e55 commit 9e63edd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/dialog/src/dialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ export default {
closed: false
}
},
watch: {
visible (val) {
if (val) {
Expand All @@ -171,6 +172,7 @@ export default {
}
}
},
methods: {
doCancel () {
if (typeof this.cancel === 'function') {
Expand Down Expand Up @@ -216,6 +218,7 @@ export default {
this.$emit('closed')
}
},
destroyed () {
if (this.$el && this.$el.parentNode) {
if (!this.appendToBody) { // 如果是插到body里的,页面切换的时候不销毁
Expand Down

0 comments on commit 9e63edd

Please sign in to comment.