From bb14895fd8249247be0d89fe053b62be2dfdeabf Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 2 Dec 2018 15:26:56 +0900 Subject: [Client] Resolve #2225 --- src/client/app/common/views/components/alert.vue | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) (limited to 'src/client/app/common') diff --git a/src/client/app/common/views/components/alert.vue b/src/client/app/common/views/components/alert.vue index d48defe8a7..abbdb8536e 100644 --- a/src/client/app/common/views/components/alert.vue +++ b/src/client/app/common/views/components/alert.vue @@ -2,9 +2,12 @@
-
+
+ + + OK Cancel @@ -33,6 +36,9 @@ export default Vue.extend({ type: String, required: false }, + select: { + required: false + }, showCancelButton: { type: Boolean, default: false @@ -43,6 +49,12 @@ export default Vue.extend({ } }, + data() { + return { + selectedValue: null + }; + }, + computed: { icon(): any { switch (this.type) { @@ -83,7 +95,8 @@ export default Vue.extend({ methods: { ok() { - this.$emit('ok'); + const result = this.select ? this.selectedValue : true; + this.$emit('ok', result); this.close(); }, @@ -180,8 +193,11 @@ export default Vue.extend({ display block margin 0 auto + & + header + margin-top 16px + > header - margin 16px 0 8px 0 + margin 0 0 8px 0 font-weight bold font-size 20px -- cgit v1.2.3-freya