12 lines
386 B
TypeScript
12 lines
386 B
TypeScript
import type { Station } from '@/apis/domains';
|
|
import { defineStore } from 'pinia';
|
|
import { computed, ref } from 'vue';
|
|
|
|
export const useStationStore = defineStore('ndm-station-store', () => {
|
|
const stationList = ref<Station[]>([]);
|
|
|
|
const onlineStationList = computed(() => stationList.value.filter((station) => station.online));
|
|
|
|
return { stationList, onlineStationList };
|
|
});
|