2019-05-02 10:55:59 +02:00
|
|
|
<template>
|
|
|
|
<x-container @remove="() => $emit('remove')" :draggable="true">
|
2020-01-29 20:37:25 +01:00
|
|
|
<template #header><fa :icon="faBolt"/> {{ $t('_pages.blocks.counter') }}</template>
|
2019-05-02 10:55:59 +02:00
|
|
|
|
|
|
|
<section style="padding: 0 16px 0 16px;">
|
2020-01-29 20:37:25 +01:00
|
|
|
<mk-input v-model="value.name"><template #prefix><fa :icon="faMagic"/></template><span>{{ $t('_pages.blocks._counter.name') }}</span></mk-input>
|
|
|
|
<mk-input v-model="value.text"><span>{{ $t('_pages.blocks._counter.text') }}</span></mk-input>
|
|
|
|
<mk-input v-model="value.inc" type="number"><span>{{ $t('_pages.blocks._counter.inc') }}</span></mk-input>
|
2019-05-02 10:55:59 +02:00
|
|
|
</section>
|
|
|
|
</x-container>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
|
|
import Vue from 'vue';
|
|
|
|
import { faBolt, faMagic } from '@fortawesome/free-solid-svg-icons';
|
2020-01-29 20:37:25 +01:00
|
|
|
import i18n from '../../../i18n';
|
2019-05-02 10:55:59 +02:00
|
|
|
import XContainer from '../page-editor.container.vue';
|
2020-01-29 20:37:25 +01:00
|
|
|
import MkInput from '../../../components/ui/input.vue';
|
2019-05-02 10:55:59 +02:00
|
|
|
|
|
|
|
export default Vue.extend({
|
2020-01-29 20:37:25 +01:00
|
|
|
i18n,
|
2019-05-02 10:55:59 +02:00
|
|
|
|
|
|
|
components: {
|
2020-01-29 20:37:25 +01:00
|
|
|
XContainer, MkInput
|
2019-05-02 10:55:59 +02:00
|
|
|
},
|
|
|
|
|
|
|
|
props: {
|
|
|
|
value: {
|
|
|
|
required: true
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
faBolt, faMagic
|
|
|
|
};
|
|
|
|
},
|
|
|
|
|
|
|
|
created() {
|
|
|
|
if (this.value.name == null) Vue.set(this.value, 'name', '');
|
|
|
|
},
|
|
|
|
});
|
|
|
|
</script>
|