feat:后台设置页面

This commit is contained in:
Lan
2024-11-23 16:39:42 +08:00
parent bb79c66ced
commit 9693f3d329
15 changed files with 2313 additions and 121 deletions
+11
View File
@@ -0,0 +1,11 @@
import { defineStore } from 'pinia'
import { ref } from 'vue'
export const useAdminData = defineStore('adminData', () => {
const adminPassword = ref(localStorage.getItem('adminPassword') || '')
function updateAdminPwd(pwd: string) {
adminPassword.value = pwd
localStorage.setItem('token', pwd)
}
return { adminPassword, updateAdminPwd }
})
-12
View File
@@ -1,12 +0,0 @@
import { ref, computed } from 'vue'
import { defineStore } from 'pinia'
export const useCounterStore = defineStore('counter', () => {
const count = ref(0)
const doubleCount = computed(() => count.value * 2)
function increment() {
count.value++
}
return { count, doubleCount, increment }
})