refactor: 移除用户存储及相关演示用户逻辑
This commit is contained in:
@@ -1,26 +0,0 @@
|
||||
import { computed, ref } from 'vue'
|
||||
import { defineStore } from 'pinia'
|
||||
|
||||
export const useUserStore = defineStore('user', () => {
|
||||
const id = ref('')
|
||||
const displayName = ref('')
|
||||
const role = ref('')
|
||||
const locale = ref('zh-CN')
|
||||
|
||||
const isLoggedIn = computed(() => Boolean(id.value))
|
||||
|
||||
function loadDemoUser() {
|
||||
id.value = 'demo-user'
|
||||
displayName.value = 'Arctic Demo User'
|
||||
role.value = 'Viewer'
|
||||
}
|
||||
|
||||
return {
|
||||
id,
|
||||
displayName,
|
||||
role,
|
||||
locale,
|
||||
isLoggedIn,
|
||||
loadDemoUser,
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user