首次提交

This commit is contained in:
2023-06-04 20:01:58 +08:00
parent 00c64c53bb
commit 587f078d21
560 changed files with 106725 additions and 0 deletions

View File

@@ -0,0 +1,48 @@
import { defineStore } from "pinia"
const useIframeStore = defineStore("iframe", {
state: () => ({
iframes: [],
name: null,
show: true
}),
getters: {
currentIframe(state) {
return { ...state }
}
},
actions: {
addIframe(component) {
if (!this.iframes.includes(component)) {
this.iframes.push(component)
}
},
removeIframe(component) {
const idx = this.iframes.indexOf(component)
if (idx !== -1) {
this.iframes.splice(idx, 1)
}
},
display() {
this.show = true
},
hidden() {
this.show = false
},
setName(name) {
this.name = name
},
clearIframe() {
this.iframes = []
}
}
})
export default useIframeStore