修改部分依赖
This commit is contained in:
parent
b8e2717741
commit
762e1369b0
|
@ -4,7 +4,7 @@ $defineProps<{
|
||||||
topic: string
|
topic: string
|
||||||
description?: string
|
description?: string
|
||||||
href: string
|
href: string
|
||||||
imgClass: string
|
imgClass?: string
|
||||||
}>()
|
}>()
|
||||||
</script>
|
</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))
|
|
|
@ -9,17 +9,11 @@ export default defineNuxtConfig({
|
||||||
modules: [
|
modules: [
|
||||||
'@vueuse/nuxt',
|
'@vueuse/nuxt',
|
||||||
'@anu-vue/nuxt',
|
'@anu-vue/nuxt',
|
||||||
'@unocss/nuxt',
|
'@unocss/nuxt',
|
||||||
'@pinia/nuxt',
|
'@nuxtjs/i18n',
|
||||||
'@nuxtjs/i18n',
|
|
||||||
// '@nuxtjs/strapi',
|
|
||||||
'@vue-macros/nuxt',
|
'@vue-macros/nuxt',
|
||||||
'@nuxt/content',
|
'@nuxt/content',
|
||||||
'@nuxtjs/color-mode',
|
'@nuxtjs/color-mode',
|
||||||
// '@vite-pwa/nuxt',
|
|
||||||
// '@aceforth/nuxt-optimized-images',
|
|
||||||
// '@vueuse/components',
|
|
||||||
// '@nuxt/image',
|
|
||||||
'@nuxt/devtools',
|
'@nuxt/devtools',
|
||||||
],
|
],
|
||||||
|
|
||||||
|
|
|
@ -27,14 +27,12 @@
|
||||||
"@iconify-json/twemoji": "^1.1.11",
|
"@iconify-json/twemoji": "^1.1.11",
|
||||||
"@nuxt/content": "^2.6.0",
|
"@nuxt/content": "^2.6.0",
|
||||||
"@nuxtjs/color-mode": "^3.4.0",
|
"@nuxtjs/color-mode": "^3.4.0",
|
||||||
"@nuxtjs/i18n": "8.3.1",
|
"@nuxtjs/i18n": "8.3.1",
|
||||||
"@pinia/nuxt": "^0.5.1",
|
|
||||||
"@unocss/nuxt": "0.60.3",
|
"@unocss/nuxt": "0.60.3",
|
||||||
"@vue-macros/nuxt": "^1.9.33",
|
"@vue-macros/nuxt": "^1.9.33",
|
||||||
"@vueuse/nuxt": "^9.13.0",
|
"@vueuse/nuxt": "^9.13.0",
|
||||||
"nuxt": "^3.11.2",
|
"nuxt": "^3.11.2",
|
||||||
"pinia": "^2.1.7",
|
"typescript": "^5.4.5",
|
||||||
"typescript": "^4.9.5",
|
|
||||||
"unocss-preset-extra": "^0.5.3",
|
"unocss-preset-extra": "^0.5.3",
|
||||||
"unocss-preset-scrollbar": "^0.3.1",
|
"unocss-preset-scrollbar": "^0.3.1",
|
||||||
"unocss-preset-scrollbar-hide": "^1.0.1",
|
"unocss-preset-scrollbar-hide": "^1.0.1",
|
||||||
|
|
Loading…
Reference in New Issue