From 5c845093da0a2b13cd4389e251b875c20ee80ba5 Mon Sep 17 00:00:00 2001 From: cookfront Date: Thu, 16 Feb 2017 15:38:32 +0800 Subject: [PATCH] dialog component --- docs/examples/dialog.md | 8 ++++---- packages/dialog/src/dialog.vue | 3 +-- packages/zanui/src/dialog.pcss | 3 +-- src/mixins/popup/index.js | 6 +++++- 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/docs/examples/dialog.md b/docs/examples/dialog.md index 7863a1488..46305c766 100644 --- a/docs/examples/dialog.md +++ b/docs/examples/dialog.md @@ -5,8 +5,8 @@ export default { methods: { handleAlertClick() { Dialog.alert({ - title: 'alert', - message: 'alert message' + title: 'alert标题', + message: '弹窗提示文字,左右始终距离边20PX,上下距离20PX,文字左对齐。弹窗提示文字,左右始终距离边20PX,上下距离20PX,文字左对齐。' }).then((action) => { console.log(action); }); @@ -14,8 +14,8 @@ export default { handleConfirmClick() { Dialog.confirm({ - title: 'confirm', - message: 'confirm message' + title: 'confirm标题', + message: '弹窗提示文字,左右始终距离边20PX,上下距离20PX,文字左对齐。弹窗提示文字,左右始终距离边20PX,上下距离20PX,文字左对齐。' }).then((action) => { console.log(action); }, (error) => { diff --git a/packages/dialog/src/dialog.vue b/packages/dialog/src/dialog.vue index f68e29ced..1d95f2d4c 100644 --- a/packages/dialog/src/dialog.vue +++ b/packages/dialog/src/dialog.vue @@ -78,9 +78,8 @@ export default { }, 200); } - PopupManager.closeModal(this._popupId); this.opened = false; - this.closing = false; + this.doAfterClose(); } } }; diff --git a/packages/zanui/src/dialog.pcss b/packages/zanui/src/dialog.pcss index 53e2d0650..f888a19e0 100644 --- a/packages/zanui/src/dialog.pcss +++ b/packages/zanui/src/dialog.pcss @@ -43,9 +43,8 @@ @descendent message { color: #999; margin: 0; - text-align: center; font-size: 14px; - line-height: 36px; + line-height: 1.5; } @descendent footer { diff --git a/src/mixins/popup/index.js b/src/mixins/popup/index.js index 103a1d44a..0fb0bd390 100644 --- a/src/mixins/popup/index.js +++ b/src/mixins/popup/index.js @@ -174,9 +174,13 @@ export default { }, 200); } - PopupManager.closeModal(this._popupId); this.opened = false; + this.doAfterClose(); + }, + + doAfterClose() { this.closing = false; + PopupManager.closeModal(this._popupId); } },