refactor: page.textarea.vue to use composition api #26

Manually merged
Johann150 merged 3 commits from :refactor/page.textarea.vue into main 2022-07-25 05:52:34 +00:00
Showing only changes of commit d32228a347 - Show all commits

View file

@ -13,11 +13,12 @@ const props = defineProps<{
hpml: Hpml;
}>();
let text = $ref(props.hpml.interpolate(props.block.text));
let text = $ref('');
watch(props.hpml.vars, () => {
text = props.hpml.interpolate(props.block.text);
text = props.hpml.interpolate(props.block.text) as string;
}, {
deep: true,
immediate: true,
});
</script>