import {defineStore} from "pinia"; import {CHECK_STORE_KEY} from "@/stores/constant"; import type {CheckData} from "@/api/check/interface"; export const useCheckStore = defineStore("check", { id: CHECK_STORE_KEY, state: () => ({ devices: Array(), planId: String(""), }), getters: {}, actions: { addDevices(device: CheckData.Device[]) { this.devices.push(...device); }, clearDevices() { this.devices = []; }, setPlanId(planId: string) { this.planId = planId } } });