提交 27350b1e 编写于 作者: D DebugIsFalse

Merge branch 'main' of gitcode.com:git_bot/ai-fe

......@@ -48,7 +48,7 @@
</div>
</template>
<script setup>
const { $setInfo } = useUserStore()
const { $signOut } = useUserStore()
const { $isSignIn, $info } = storeToRefs(useUserStore())
const { $lang, $langOptions } = useI18nStore()
const colorMode = useColorMode()
......@@ -75,7 +75,10 @@ const items = [
[
{
label: '退出登录',
icon: 'i-heroicons-power'
icon: 'i-heroicons-power',
click: () => {
$signOut()
}
}
]
]
......
......@@ -14,5 +14,10 @@ export const useUserStore = defineStore('user', () => {
const $isSignIn = computed(() => !!token.value)
return { $info, $isSignIn }
function $signOut () {
token.value = null
userInfo.value = null
}
return { $info, $isSignIn, $signOut }
})
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册