update
This commit is contained in:
18
src/shared/store/myFlowchart.ts
Normal file
18
src/shared/store/myFlowchart.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import { defineStore } from "pinia"
|
||||
|
||||
export const useMyFlowchartStore = defineStore("myFlowchart", () => {
|
||||
const showing = ref(false)
|
||||
const mermaidCode = ref("")
|
||||
|
||||
function show(code: string) {
|
||||
mermaidCode.value = code
|
||||
showing.value = true
|
||||
}
|
||||
|
||||
function hide() {
|
||||
showing.value = false
|
||||
mermaidCode.value = ""
|
||||
}
|
||||
|
||||
return { showing, mermaidCode, show, hide }
|
||||
})
|
||||
Reference in New Issue
Block a user