import { defineStore } from 'pinia' import { useIndexedDBStore } from './indexedDB' export const useMsgStore = defineStore('msg', { state: () => ({ msgUuid: '', messages: [], pageInfoList: [] }), actions: { addMsg(msg: any) { const { useStore } = useIndexedDBStore() useStore(this.msgUuid).add(msg) this.messages.push(msg) }, addMsg1(msg: any) { this.messages.push(msg) }, msgToDB(msg: any) { const { useStore } = useIndexedDBStore() useStore(this.msgUuid).add(msg) } } })