mirror of
https://github.com/paricafe/misskey.git
synced 2024-11-26 02:56:43 -06:00
4f15b6f7c2
This reverts commit ada04c1932
.
54 lines
1.1 KiB
Vue
54 lines
1.1 KiB
Vue
<template>
|
|
<!-- eslint-disable vue/no-mutating-props -->
|
|
<XContainer :draggable="true" @remove="() => $emit('remove')">
|
|
<template #header><i class="fas fa-align-left"></i> {{ $ts._pages.blocks.text }}</template>
|
|
|
|
<section class="vckmsadr">
|
|
<textarea v-model="text"></textarea>
|
|
</section>
|
|
</XContainer>
|
|
</template>
|
|
|
|
<script lang="ts" setup>
|
|
/* eslint-disable vue/no-mutating-props */
|
|
import { watch } from 'vue';
|
|
import XContainer from '../page-editor.container.vue';
|
|
|
|
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,
|
|
});
|
|
});
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
.vckmsadr {
|
|
> 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;
|
|
box-sizing: border-box;
|
|
}
|
|
}
|
|
</style>
|