2020-04-15 15:39:21 +00:00
|
|
|
<template>
|
2020-04-18 09:33:45 +00:00
|
|
|
<div class="ysrxegms">
|
|
|
|
<canvas ref="canvas" :width="value.width" :height="value.height"/>
|
2020-04-15 15:39:21 +00:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
|
|
import Vue from 'vue';
|
|
|
|
|
|
|
|
export default Vue.extend({
|
|
|
|
props: {
|
|
|
|
value: {
|
|
|
|
required: true
|
|
|
|
},
|
2020-04-20 12:35:27 +00:00
|
|
|
hpml: {
|
2020-04-15 15:39:21 +00:00
|
|
|
required: true
|
|
|
|
}
|
|
|
|
},
|
|
|
|
mounted() {
|
2020-04-20 12:35:27 +00:00
|
|
|
this.hpml.registerCanvas(this.value.name, this.$refs.canvas);
|
2020-04-15 15:39:21 +00:00
|
|
|
}
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
.ysrxegms {
|
2020-04-18 09:33:45 +00:00
|
|
|
display: inline-block;
|
|
|
|
vertical-align: bottom;
|
2020-04-19 07:15:24 +00:00
|
|
|
overflow: auto;
|
|
|
|
max-width: 100%;
|
2020-04-18 09:33:45 +00:00
|
|
|
|
|
|
|
> canvas {
|
|
|
|
display: block;
|
|
|
|
}
|
2020-04-15 15:39:21 +00:00
|
|
|
}
|
|
|
|
</style>
|