2019-04-29 09:11:57 +09:00
|
|
|
<template>
|
2021-11-18 23:32:43 +09:00
|
|
|
<!-- eslint-disable vue/no-mutating-props -->
|
2021-11-19 19:36:12 +09:00
|
|
|
<XContainer :draggable="true" @remove="() => $emit('remove')">
|
2023-04-01 14:01:57 +09:00
|
|
|
<template #header><i class="ti ti-align-left"></i> {{ i18n.ts._pages.blocks.text }}</template>
|
2019-04-29 09:11:57 +09:00
|
|
|
|
2020-04-13 03:23:23 +09:00
|
|
|
<section class="vckmsadr">
|
2022-12-24 11:57:06 +09:00
|
|
|
<textarea v-model="text"></textarea>
|
2019-04-29 09:11:57 +09:00
|
|
|
</section>
|
2020-10-17 20:12:00 +09:00
|
|
|
</XContainer>
|
2019-04-29 09:11:57 +09:00
|
|
|
</template>
|
|
|
|
|
2022-06-18 11:39:04 +02:00
|
|
|
<script lang="ts" setup>
|
2021-11-18 23:32:43 +09:00
|
|
|
/* eslint-disable vue/no-mutating-props */
|
2022-12-24 11:57:06 +09:00
|
|
|
import { watch } from 'vue';
|
2019-04-30 06:40:02 +09:00
|
|
|
import XContainer from '../page-editor.container.vue';
|
2023-04-01 14:01:57 +09:00
|
|
|
import { i18n } from '@/i18n';
|
2019-04-29 09:11:57 +09:00
|
|
|
|
2022-12-24 11:57:06 +09:00
|
|
|
const props = defineProps<{
|
|
|
|
modelValue: any
|
|
|
|
}>();
|
|
|
|
|
|
|
|
const emit = defineEmits<{
|
|
|
|
(ev: 'update:modelValue', value: any): void;
|
|
|
|
}>();
|
|
|
|
|
|
|
|
const text = $ref(props.modelValue.text ?? '');
|
|
|
|
|
|
|
|
watch($$(text), () => {
|
|
|
|
emit('update:modelValue', {
|
|
|
|
...props.modelValue,
|
|
|
|
text,
|
|
|
|
});
|
2019-04-29 09:11:57 +09:00
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
2022-12-27 18:29:39 +09:00
|
|
|
<style lang="scss" scoped>
|
2020-04-13 03:23:23 +09:00
|
|
|
.vckmsadr {
|
2020-01-30 04:37:25 +09:00
|
|
|
> textarea {
|
|
|
|
display: block;
|
|
|
|
-webkit-appearance: none;
|
|
|
|
-moz-appearance: none;
|
|
|
|
appearance: none;
|
|
|
|
width: 100%;
|
|
|
|
min-width: 100%;
|
|
|
|
min-height: 150px;
|
|
|
|
border: none;
|
|
|
|
box-shadow: none;
|
|
|
|
padding: 16px;
|
|
|
|
background: transparent;
|
|
|
|
color: var(--fg);
|
|
|
|
font-size: 14px;
|
2020-04-13 03:23:23 +09:00
|
|
|
box-sizing: border-box;
|
2020-01-30 04:37:25 +09:00
|
|
|
}
|
|
|
|
}
|
2019-04-29 09:11:57 +09:00
|
|
|
</style>
|