admin-vben5/apps/web-antd/src/store/clean.ts
fyy 3e8ba86305
Some checks are pending
Gitea Actions Demo / Explore-Gitea-Actions (push) Waiting to run
feat: 保洁接口对接
2025-06-27 18:03:13 +08:00

25 lines
579 B
TypeScript

import { ref } from 'vue';
import { defineStore } from 'pinia';
export const useCleanStore = defineStore('clean', () => {
// 当前选中的服务地址ID
const selectedLocationId = ref<null | number | string>(null);
// 申请人是否可用
const isPersionEnabled = ref(false);
function setLocation(id: number | string) {
selectedLocationId.value = id;
isPersionEnabled.value = !!id;
console.log(selectedLocationId.value);
console.log(isPersionEnabled.value);
}
return {
selectedLocationId,
isPersionEnabled,
setLocation,
};
});