2019-04-28 19:11:57 -05:00
|
|
|
<template>
|
|
|
|
<div class="lzyxtsnt">
|
2020-02-16 07:46:51 -06:00
|
|
|
<img v-if="image" :src="image.url"/>
|
2019-04-28 19:11:57 -05:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
2021-01-29 19:59:05 -06:00
|
|
|
import { defineComponent, PropType } from 'vue';
|
2021-03-23 03:30:14 -05:00
|
|
|
import * as os from '@client/os';
|
|
|
|
import { ImageBlock } from '@client/scripts/hpml/block';
|
|
|
|
import { Hpml } from '@client/scripts/hpml/evaluator';
|
2019-04-28 19:11:57 -05:00
|
|
|
|
2020-10-17 06:12:00 -05:00
|
|
|
export default defineComponent({
|
2019-04-28 19:11:57 -05:00
|
|
|
props: {
|
2021-01-29 19:59:05 -06:00
|
|
|
block: {
|
|
|
|
type: Object as PropType<ImageBlock>,
|
2019-04-28 19:11:57 -05:00
|
|
|
required: true
|
|
|
|
},
|
2021-01-29 19:59:05 -06:00
|
|
|
hpml: {
|
|
|
|
type: Object as PropType<Hpml>,
|
2019-04-28 19:11:57 -05:00
|
|
|
required: true
|
2021-01-29 19:59:05 -06:00
|
|
|
}
|
2019-04-28 19:11:57 -05:00
|
|
|
},
|
2021-01-29 19:59:05 -06:00
|
|
|
setup(props, ctx) {
|
|
|
|
const image = props.hpml.page.attachedFiles.find(x => x.id === props.block.fileId);
|
|
|
|
|
2019-04-28 19:11:57 -05:00
|
|
|
return {
|
2021-01-29 19:59:05 -06:00
|
|
|
image
|
2019-04-28 19:11:57 -05:00
|
|
|
};
|
|
|
|
}
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
2020-01-29 13:37:25 -06:00
|
|
|
<style lang="scss" scoped>
|
|
|
|
.lzyxtsnt {
|
|
|
|
> img {
|
|
|
|
max-width: 100%;
|
|
|
|
}
|
|
|
|
}
|
2019-04-28 19:11:57 -05:00
|
|
|
</style>
|