100a131913
* pages refactoring * pages: fix if block * fix code format * remove passing of the page parameter * remove comment * fix indent * replace with unref * fix conditions of isVarBlock() * Update src/client/scripts/hpml/block.ts use includes() instead of find() Co-authored-by: syuilo <Syuilotan@yahoo.co.jp> Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
39 lines
724 B
Vue
39 lines
724 B
Vue
<template>
|
|
<MkTextarea :value="text" readonly></MkTextarea>
|
|
</template>
|
|
|
|
<script lang="ts">
|
|
import { TextBlock } from '@/scripts/hpml/block';
|
|
import { Hpml } from '@/scripts/hpml/evaluator';
|
|
import { defineComponent, PropType } from 'vue';
|
|
import MkTextarea from '../ui/textarea.vue';
|
|
|
|
export default defineComponent({
|
|
components: {
|
|
MkTextarea
|
|
},
|
|
props: {
|
|
block: {
|
|
type: Object as PropType<TextBlock>,
|
|
required: true
|
|
},
|
|
hpml: {
|
|
type: Object as PropType<Hpml>,
|
|
required: true
|
|
}
|
|
},
|
|
data() {
|
|
return {
|
|
text: this.hpml.interpolate(this.block.text),
|
|
};
|
|
},
|
|
watch: {
|
|
'hpml.vars': {
|
|
handler() {
|
|
this.text = this.hpml.interpolate(this.block.text);
|
|
},
|
|
deep: true
|
|
}
|
|
}
|
|
});
|
|
</script>
|