Include complete API and frontend sources for unified deployment
This commit is contained in:
1 parent
627b0ae60e
commit
d8fcae32b0
93 files changed
+53270
-3
No files matched your search
@@ -0,0 +1,40 @@
|
||||
<template>
|
||||
<dialog ref="dialog" class="score-dialog form-dialog" aria-labelledby="form-dialog-title" @cancel.prevent="close">
|
||||
<form @submit.prevent="$emit('save')">
|
||||
<div class="dialog-header">
|
||||
<h2 id="form-dialog-title">{{ title }}</h2>
|
||||
<button class="icon-button" type="button" aria-label="Закрыть" :disabled="busy" @click="close">
|
||||
<AppIcon name="close" />
|
||||
</button>
|
||||
</div>
|
||||
<div class="dialog-body"><slot /></div>
|
||||
<div class="dialog-footer dialog-footer-actions">
|
||||
<button class="button" type="button" :disabled="busy" @click="close">Отмена</button
|
||||
><button class="button button-primary" :class="{ 'button-danger': danger }" type="submit" :disabled="busy">
|
||||
{{ busy ? 'Сохраняем…' : submitLabel }}
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</dialog>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
title: { type: String, required: true },
|
||||
busy: Boolean,
|
||||
danger: Boolean,
|
||||
submitLabel: { type: String, default: 'Сохранить' },
|
||||
},
|
||||
mounted() {
|
||||
this.$refs.dialog.showModal()
|
||||
},
|
||||
beforeDestroy() {
|
||||
this.$refs.dialog.close()
|
||||
},
|
||||
methods: {
|
||||
close() {
|
||||
if (!this.busy) this.$emit('close')
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
Reference in new issue
Block a user