import { defineStore } from 'pinia' import {ref} from "vue"; export const useScanCodeStore = defineStore('scancode', ()=>{ const type=ref(''); const code=ref([]); const clearCode=(data)=>{ type.value=''; code.value=[]; } const addCode=(data, intype)=>{ type.value = intype; code.value.push(data); } return{ code, type, clearCode, addCode}; },{ persist: true })