2019-04-29 02:11:57 +02:00
|
|
|
<template>
|
2023-04-08 02:01:42 +02:00
|
|
|
<component
|
|
|
|
:is="'x-' + block.type"
|
|
|
|
:key="block.id"
|
|
|
|
:block="block"
|
|
|
|
:hpml="hpml"
|
|
|
|
:h="h"
|
|
|
|
/>
|
2019-04-29 02:11:57 +02:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
2023-04-08 02:01:42 +02:00
|
|
|
import { defineComponent, PropType } from "vue";
|
|
|
|
import XText from "./page.text.vue";
|
|
|
|
import XSection from "./page.section.vue";
|
|
|
|
import XImage from "./page.image.vue";
|
|
|
|
import XButton from "./page.button.vue";
|
|
|
|
import XNumberInput from "./page.number-input.vue";
|
|
|
|
import XTextInput from "./page.text-input.vue";
|
|
|
|
import XTextareaInput from "./page.textarea-input.vue";
|
|
|
|
import XSwitch from "./page.switch.vue";
|
|
|
|
import XIf from "./page.if.vue";
|
|
|
|
import XTextarea from "./page.textarea.vue";
|
|
|
|
import XPost from "./page.post.vue";
|
|
|
|
import XCounter from "./page.counter.vue";
|
|
|
|
import XRadioButton from "./page.radio-button.vue";
|
|
|
|
import XCanvas from "./page.canvas.vue";
|
|
|
|
import XNote from "./page.note.vue";
|
|
|
|
import { Hpml } from "@/scripts/hpml/evaluator";
|
|
|
|
import { Block } from "@/scripts/hpml/block";
|
2019-04-29 02:11:57 +02:00
|
|
|
|
2020-10-17 13:12:00 +02:00
|
|
|
export default defineComponent({
|
2019-04-29 02:11:57 +02:00
|
|
|
components: {
|
2023-04-08 02:01:42 +02:00
|
|
|
XText,
|
|
|
|
XSection,
|
|
|
|
XImage,
|
|
|
|
XButton,
|
|
|
|
XNumberInput,
|
|
|
|
XTextInput,
|
|
|
|
XTextareaInput,
|
|
|
|
XTextarea,
|
|
|
|
XPost,
|
|
|
|
XSwitch,
|
|
|
|
XIf,
|
|
|
|
XCounter,
|
|
|
|
XRadioButton,
|
|
|
|
XCanvas,
|
|
|
|
XNote,
|
2019-04-29 02:11:57 +02:00
|
|
|
},
|
|
|
|
props: {
|
2021-01-30 02:59:05 +01:00
|
|
|
block: {
|
|
|
|
type: Object as PropType<Block>,
|
2023-04-08 02:01:42 +02:00
|
|
|
required: true,
|
2019-04-29 02:11:57 +02:00
|
|
|
},
|
2020-04-20 14:35:27 +02:00
|
|
|
hpml: {
|
2021-01-30 02:59:05 +01:00
|
|
|
type: Object as PropType<Hpml>,
|
2023-04-08 02:01:42 +02:00
|
|
|
required: true,
|
2019-04-29 02:11:57 +02:00
|
|
|
},
|
|
|
|
h: {
|
2021-01-30 02:59:05 +01:00
|
|
|
type: Number,
|
2023-04-08 02:01:42 +02:00
|
|
|
required: true,
|
|
|
|
},
|
2019-04-29 02:11:57 +02:00
|
|
|
},
|
|
|
|
});
|
|
|
|
</script>
|