import { defineStore } from 'pinia' import { ref } from 'vue' import type { ReturnApprovalEntity } from '@/common/apis/approval/type' export interface ApprovalDetail extends ReturnApprovalEntity { goodsName: string coverImg: string } export const useApprovalStore = defineStore('approval', () => { const currentApproval = ref(null) const setCurrentApproval = (approval: ApprovalDetail) => { currentApproval.value = approval } return { currentApproval, setCurrentApproval } }) export function useApprovalStoreOutside() { return useApprovalStore() }