Some checks are pending
Gitea Actions Demo / Explore-Gitea-Actions (push) Waiting to run
25 lines
579 B
TypeScript
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,
|
|
};
|
|
});
|