admin-vben5/apps/web-antd/src/store/clean.ts

25 lines
579 B
TypeScript
Raw Normal View History

2025-06-27 18:03:13 +08:00
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,
};
});