Files
pqs-9100_client/frontend/src/stores/modules/check.ts

24 lines
503 B
TypeScript
Raw Normal View History

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<CheckData.Device>()
}),
getters: {},
actions: {
addDevices(device: CheckData.Device[]) {
this.devices.push(...device);
},
clearDevices() {
this.devices = [];
}
}
});