优化拦截器
优化错误捕获 优化全局状态管理 配置全局公用类型
This commit is contained in:
28
src/store/pwo.ts
Normal file
28
src/store/pwo.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
import { defineStore } from "pinia";
|
||||
import { ref, reactive } from "vue";
|
||||
import { message } from "ant-design-vue";
|
||||
|
||||
export const usePwoStore = defineStore("pwo", () => {
|
||||
const code = ref('');
|
||||
const currentJob = ref({});
|
||||
|
||||
function setCode(traceOrderCode: string) {
|
||||
code.value = traceOrderCode;
|
||||
}
|
||||
|
||||
function setCurrentJob(job: any) {
|
||||
currentJob.value = job;
|
||||
}
|
||||
|
||||
function getCurrentJob() {
|
||||
return currentJob.value;
|
||||
}
|
||||
|
||||
return {
|
||||
code,
|
||||
currentJob,
|
||||
setCode,
|
||||
setCurrentJob,
|
||||
getCurrentJob,
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user