mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-23 22:53:08 +02:00
🎨
This commit is contained in:
parent
552df8737d
commit
20a943b193
2 changed files with 20 additions and 4 deletions
|
@ -6,7 +6,7 @@
|
||||||
<header v-if="title" v-html="title"></header>
|
<header v-if="title" v-html="title"></header>
|
||||||
<div class="body" v-if="text" v-html="text"></div>
|
<div class="body" v-if="text" v-html="text"></div>
|
||||||
<ui-horizon-group no-grow class="buttons">
|
<ui-horizon-group no-grow class="buttons">
|
||||||
<ui-button @click="ok" primary>OK</ui-button>
|
<ui-button @click="ok" primary autofocus>OK</ui-button>
|
||||||
<ui-button @click="cancel" v-if="showCancelButton">Cancel</ui-button>
|
<ui-button @click="cancel" v-if="showCancelButton">Cancel</ui-button>
|
||||||
</ui-horizon-group>
|
</ui-horizon-group>
|
||||||
</div>
|
</div>
|
||||||
|
@ -169,9 +169,10 @@ export default Vue.extend({
|
||||||
display block
|
display block
|
||||||
margin 0 auto
|
margin 0 auto
|
||||||
|
|
||||||
> .header
|
> header
|
||||||
margin 16px 0
|
margin 16px 0 8px 0
|
||||||
font-weight bold
|
font-weight bold
|
||||||
|
font-size 20px
|
||||||
|
|
||||||
& + .body
|
& + .body
|
||||||
margin-top 8px
|
margin-top 8px
|
||||||
|
@ -179,4 +180,7 @@ export default Vue.extend({
|
||||||
> .body
|
> .body
|
||||||
margin 16px 0
|
margin 16px 0
|
||||||
|
|
||||||
|
> .buttons
|
||||||
|
margin-top 16px
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -38,12 +38,24 @@ export default Vue.extend({
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
required: false,
|
required: false,
|
||||||
default: false
|
default: false
|
||||||
}
|
},
|
||||||
|
autofocus: {
|
||||||
|
type: Boolean,
|
||||||
|
required: false,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
styl: 'fill'
|
styl: 'fill'
|
||||||
};
|
};
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
if (this.autofocus) {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$el.focus();
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in a new issue