feat: 粒子背景+动起来了

This commit is contained in:
ex_zhangwenlei@exiot.cmcc
2024-01-07 00:05:55 +08:00
parent ae2f21daaf
commit 18c5429b58
25 changed files with 1073 additions and 2798 deletions

View File

@@ -0,0 +1,36 @@
<script setup lang='ts'>
import {ref,onMounted} from 'vue'
import localforage from 'localforage'
const props=defineProps({
imgItem: {
type:Object,
default:()=>({})
},
})
const imageDbStore = localforage.createInstance({
name: 'imgStore'
})
const imgUrl=ref('')
const getImageStoreItem=async (item:any)=>{
const key=item.id;
const image=await imageDbStore.getItem(key)
return image
}
onMounted(async ()=>{
const image=await getImageStoreItem(props.imgItem)
imgUrl.value=image
})
</script>
<template>
<img :src="imgUrl" Alt="Image"/>
</template>
<style lang='scss' scoped>
</style>