mirror of https://github.com/doccano/doccano.git
pythonannotation-tooldatasetsactive-learningtext-annotationdatasetnatural-language-processingdata-labelingmachine-learning
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
544 B
38 lines
544 B
<template>
|
|
<v-image
|
|
:config="{
|
|
image: image
|
|
}"
|
|
/>
|
|
</template>
|
|
|
|
<script lang="ts">
|
|
import Vue from 'vue'
|
|
|
|
export default Vue.extend({
|
|
props: {
|
|
imageUrl: {
|
|
type: String,
|
|
required: true
|
|
}
|
|
},
|
|
|
|
data() {
|
|
return {
|
|
image: new Image()
|
|
}
|
|
},
|
|
|
|
watch: {
|
|
imageUrl: {
|
|
handler() {
|
|
this.image.src = this.imageUrl
|
|
this.image.onload = () => {
|
|
this.$emit('loaded', this.image.width, this.image.height)
|
|
}
|
|
},
|
|
immediate: true
|
|
}
|
|
}
|
|
})
|
|
</script>
|