2020-01-29 20:37:25 +01:00
|
|
|
<template>
|
|
|
|
<x-container @remove="() => $emit('remove')" :draggable="true">
|
|
|
|
<template #header><fa :icon="faBolt"/> {{ $t('_pages.blocks.switch') }}</template>
|
|
|
|
|
|
|
|
<section class="kjuadyyj">
|
2020-07-24 18:56:52 +02:00
|
|
|
<mk-input v-model="value.name"><template #prefix><fa :icon="faMagic"/></template><span>{{ $t('_pages.blocks._switch.name') }}</span></mk-input>
|
|
|
|
<mk-input v-model="value.text"><span>{{ $t('_pages.blocks._switch.text') }}</span></mk-input>
|
|
|
|
<mk-switch v-model="value.default"><span>{{ $t('_pages.blocks._switch.default') }}</span></mk-switch>
|
2020-01-29 20:37:25 +01:00
|
|
|
</section>
|
|
|
|
</x-container>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
|
|
import Vue from 'vue';
|
|
|
|
import { faBolt, faMagic } from '@fortawesome/free-solid-svg-icons';
|
|
|
|
import XContainer from '../page-editor.container.vue';
|
|
|
|
import MkSwitch from '../../../components/ui/switch.vue';
|
|
|
|
import MkInput from '../../../components/ui/input.vue';
|
|
|
|
|
|
|
|
export default Vue.extend({
|
|
|
|
components: {
|
|
|
|
XContainer, MkSwitch, MkInput
|
|
|
|
},
|
|
|
|
|
|
|
|
props: {
|
|
|
|
value: {
|
|
|
|
required: true
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
faBolt, faMagic
|
|
|
|
};
|
|
|
|
},
|
|
|
|
|
|
|
|
created() {
|
|
|
|
if (this.value.name == null) Vue.set(this.value, 'name', '');
|
|
|
|
},
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
.kjuadyyj {
|
|
|
|
padding: 0 16px 16px 16px;
|
|
|
|
}
|
|
|
|
</style>
|