Files
frontend_hmi_station/src/store/pwo.ts
2025-12-29 08:59:29 +08:00

32 lines
524 B
TypeScript

import { defineStore } from "pinia";
import { reactive } from "vue";
export interface PwoInfo {
code: string;
id: string | number;
orderType: string;
[key: string]: any;
}
export const usePwoStore = defineStore("pwo", () => {
const pwoInfo = reactive<PwoInfo>({
code: "",
id: "",
orderType: "",
});
function setInfo(info: PwoInfo) {
Object.assign(pwoInfo, info);
}
function resetInfo() {
Object.assign(pwoInfo, {});
}
return {
pwoInfo,
setInfo,
resetInfo,
};
});