This commit is contained in:
杨航
2025-09-12 09:29:40 +08:00
parent 444244506e
commit 2bc746068c
5 changed files with 20 additions and 3 deletions
+8 -1
View File
@@ -5,7 +5,8 @@ export const useStorageStore = defineStore('storageStore',{
state:()=>({
imgObjStr: '{}',
videoObjStr: '{}',
audioObjStr: '{}'
audioObjStr: '{}',
touchBtnZIndex: 1
}),
getters:{
imgObj(state){
@@ -16,9 +17,15 @@ export const useStorageStore = defineStore('storageStore',{
},
audioObj(state){
return JSON.parse(state.audioObjStr)
},
getTouchBtnZIndex(state){
return state.touchBtnZIndex
}
},
actions:{
setTouchBtnZIndex(index = 1){
this.touchBtnZIndex = index
},
setStorage(type, id, url) {
if(type === 'image'){
let _obj = JSON.parse(this.imgObjStr)