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.
 
 
 
 
 
 

30 lines
497 B

<template>
<image :src="src"></image>
</template>
<script setup>
import { onMounted, ref, defineProps } from 'vue';
import store from '@/store'
import { getFileBase64 } from '@/api/file'
const props = defineProps({
filepath: {
type: String
}
});
const src = ref('');
console.log('filepath', props.filepath)
onMounted(() => {
getFileBase64(props.filepath).then(data => {
src.value = data;
})
})
</script>
<style scoped>
image {
background-color: #eee;
}
</style>