cache into map

This commit is contained in:
2023-06-20 20:46:14 +02:00
parent a6e75006e6
commit 7d38564107
10 changed files with 216 additions and 344 deletions
+2 -2
View File
@@ -52,8 +52,8 @@ export default defineComponent({
},
computed: {
servers (): { [key: string]: Ref<Server> } {
const data = this.store.getServerList({})?.value.data
if (!data) return unref(this.store.fetchServers({})).data
const data = this.store.getList('servers')?.value.data
if (!data) return unref(this.store.fetch('servers')).data
return data
},
serverList (): (Ref<Server> & { name: string })[] {