Resolve #6276
This commit is contained in:
@@ -2,8 +2,10 @@
|
||||
<x-container @remove="() => $emit('remove')" :draggable="true">
|
||||
<template #header><fa :icon="faPaperPlane"/> {{ $t('_pages.blocks.post') }}</template>
|
||||
|
||||
<section style="padding: 0 16px 16px 16px;">
|
||||
<section style="padding: 16px;">
|
||||
<mk-textarea v-model="value.text">{{ $t('_pages.blocks._post.text') }}</mk-textarea>
|
||||
<mk-switch v-model="value.attachCanvasImage"><span>{{ $t('_pages.blocks._post.attachCanvasImage') }}</span></mk-switch>
|
||||
<mk-input v-if="value.attachCanvasImage" v-model="value.canvasId"><span>{{ $t('_pages.blocks._post.canvasId') }}</span></mk-input>
|
||||
</section>
|
||||
</x-container>
|
||||
</template>
|
||||
@@ -14,12 +16,14 @@ import { faPaperPlane } from '@fortawesome/free-regular-svg-icons';
|
||||
import i18n from '../../../i18n';
|
||||
import XContainer from '../page-editor.container.vue';
|
||||
import MkTextarea from '../../../components/ui/textarea.vue';
|
||||
import MkInput from '../../../components/ui/input.vue';
|
||||
import MkSwitch from '../../../components/ui/switch.vue';
|
||||
|
||||
export default Vue.extend({
|
||||
i18n,
|
||||
|
||||
components: {
|
||||
XContainer, MkTextarea
|
||||
XContainer, MkTextarea, MkInput, MkSwitch
|
||||
},
|
||||
|
||||
props: {
|
||||
@@ -36,6 +40,8 @@ export default Vue.extend({
|
||||
|
||||
created() {
|
||||
if (this.value.text == null) Vue.set(this.value, 'text', '');
|
||||
if (this.value.attachCanvasImage == null) Vue.set(this.value, 'attachCanvasImage', false);
|
||||
if (this.value.canvasId == null) Vue.set(this.value, 'canvasId', '');
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
Reference in New Issue
Block a user