From 20a943b193ca1ac5a479803204a065839ec4bb61 Mon Sep 17 00:00:00 2001 From: syuilo Date: Wed, 14 Nov 2018 20:17:12 +0900 Subject: [PATCH] :art: --- src/client/app/common/views/components/alert.vue | 10 +++++++--- .../app/common/views/components/ui/button.vue | 14 +++++++++++++- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/src/client/app/common/views/components/alert.vue b/src/client/app/common/views/components/alert.vue index 37e0f2e3d..bb76ac45e 100644 --- a/src/client/app/common/views/components/alert.vue +++ b/src/client/app/common/views/components/alert.vue @@ -6,7 +6,7 @@
- OK + OK Cancel @@ -169,9 +169,10 @@ export default Vue.extend({ display block margin 0 auto - > .header - margin 16px 0 + > header + margin 16px 0 8px 0 font-weight bold + font-size 20px & + .body margin-top 8px @@ -179,4 +180,7 @@ export default Vue.extend({ > .body margin 16px 0 + > .buttons + margin-top 16px + diff --git a/src/client/app/common/views/components/ui/button.vue b/src/client/app/common/views/components/ui/button.vue index ee8366e89..d7d65ad87 100644 --- a/src/client/app/common/views/components/ui/button.vue +++ b/src/client/app/common/views/components/ui/button.vue @@ -38,12 +38,24 @@ export default Vue.extend({ type: Boolean, required: false, default: false - } + }, + autofocus: { + type: Boolean, + required: false, + default: false + }, }, data() { return { styl: 'fill' }; + }, + mounted() { + if (this.autofocus) { + this.$nextTick(() => { + this.$el.focus(); + }); + } } });