状态管理

This commit is contained in:
2025-11-11 20:34:58 +08:00
parent c20dd5955a
commit c752bfd3c2
11 changed files with 179 additions and 80 deletions
+16
View File
@@ -0,0 +1,16 @@
<script setup>
import { useUserStore } from '@/stores/user'
const user = useUserStore()
function t(){
user.login();
}
</script>
<template>
test
<button @click="t">222</button>
{{ user.isLoggedIn }}
</template>