mirror of
https://github.com/keven1024/015.git
synced 2026-05-26 15:13:30 +00:00
18 lines
418 B
TypeScript
18 lines
418 B
TypeScript
import { defineStore } from 'pinia'
|
|
|
|
type renderComponent = Component | ((props: { hide: () => null }) => VNode)
|
|
|
|
type StoreProps = {
|
|
tiptapCommandsView?: any
|
|
drawer?: { render?: renderComponent; onClose: (data?: any) => void; key: string }[]
|
|
}
|
|
|
|
const useStore = defineStore<any, StoreProps>('store', () => {
|
|
return {
|
|
tiptapCommandsView: null,
|
|
drawer: [],
|
|
}
|
|
})
|
|
|
|
export default useStore
|