yumechi-no-kuni/src/client/components/page/page.textarea.vue
2020-10-18 12:55:26 +09:00

35 lines
540 B
Vue

<template>
<MkTextarea :value="text" readonly></MkTextarea>
</template>
<script lang="ts">
import { defineComponent } from 'vue';
import MkTextarea from '../ui/textarea.vue';
export default defineComponent({
components: {
MkTextarea
},
props: {
value: {
required: true
},
hpml: {
required: true
}
},
data() {
return {
text: this.hpml.interpolate(this.value.text),
};
},
watch: {
'hpml.vars': {
handler() {
this.text = this.hpml.interpolate(this.value.text);
},
deep: true
}
}
});
</script>