<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>