修改部分依赖
This commit is contained in:
parent
b8e2717741
commit
762e1369b0
|
@ -4,7 +4,7 @@ $defineProps<{
|
|||
topic: string
|
||||
description?: string
|
||||
href: string
|
||||
imgClass: string
|
||||
imgClass?: string
|
||||
}>()
|
||||
</script>
|
||||
|
||||
|
|
|
@ -1,16 +0,0 @@
|
|||
export function useCount() {
|
||||
const count = useState('count', () => Math.round(Math.random() * 20))
|
||||
|
||||
function inc() {
|
||||
count.value += 1
|
||||
}
|
||||
function dec() {
|
||||
count.value -= 1
|
||||
}
|
||||
|
||||
return {
|
||||
count,
|
||||
inc,
|
||||
dec,
|
||||
}
|
||||
}
|
|
@ -1,34 +0,0 @@
|
|||
import { acceptHMRUpdate, defineStore } from 'pinia'
|
||||
|
||||
export const useUserStore = defineStore('user', () => {
|
||||
/**
|
||||
* Current named of the user.
|
||||
*/
|
||||
const savedName = ref('')
|
||||
const previousNames = ref(new Set<string>())
|
||||
|
||||
const usedNames = computed(() => Array.from(previousNames.value))
|
||||
const otherNames = computed(() => usedNames.value.filter(name => name !== savedName.value))
|
||||
|
||||
/**
|
||||
* Changes the current name of the user and saves the one that was used
|
||||
* before.
|
||||
*
|
||||
* @param name - new name to set
|
||||
*/
|
||||
function setNewName(name: string) {
|
||||
if (savedName.value)
|
||||
previousNames.value.add(savedName.value)
|
||||
|
||||
savedName.value = name
|
||||
}
|
||||
|
||||
return {
|
||||
setNewName,
|
||||
otherNames,
|
||||
savedName,
|
||||
}
|
||||
})
|
||||
|
||||
if (import.meta.hot)
|
||||
import.meta.hot.accept(acceptHMRUpdate(useUserStore, import.meta.hot))
|
|
@ -10,16 +10,10 @@ export default defineNuxtConfig({
|
|||
'@vueuse/nuxt',
|
||||
'@anu-vue/nuxt',
|
||||
'@unocss/nuxt',
|
||||
'@pinia/nuxt',
|
||||
'@nuxtjs/i18n',
|
||||
// '@nuxtjs/strapi',
|
||||
'@vue-macros/nuxt',
|
||||
'@nuxt/content',
|
||||
'@nuxtjs/color-mode',
|
||||
// '@vite-pwa/nuxt',
|
||||
// '@aceforth/nuxt-optimized-images',
|
||||
// '@vueuse/components',
|
||||
// '@nuxt/image',
|
||||
'@nuxt/devtools',
|
||||
],
|
||||
|
||||
|
|
|
@ -28,13 +28,11 @@
|
|||
"@nuxt/content": "^2.6.0",
|
||||
"@nuxtjs/color-mode": "^3.4.0",
|
||||
"@nuxtjs/i18n": "8.3.1",
|
||||
"@pinia/nuxt": "^0.5.1",
|
||||
"@unocss/nuxt": "0.60.3",
|
||||
"@vue-macros/nuxt": "^1.9.33",
|
||||
"@vueuse/nuxt": "^9.13.0",
|
||||
"nuxt": "^3.11.2",
|
||||
"pinia": "^2.1.7",
|
||||
"typescript": "^4.9.5",
|
||||
"typescript": "^5.4.5",
|
||||
"unocss-preset-extra": "^0.5.3",
|
||||
"unocss-preset-scrollbar": "^0.3.1",
|
||||
"unocss-preset-scrollbar-hide": "^1.0.1",
|
||||
|
|
Loading…
Reference in New Issue