test
This commit is contained in:
@@ -1,5 +1,16 @@
|
||||
<template>
|
||||
<h1 class="flex gap-y-4 items-center justify-center flex items-center justify-center min-h-screen">
|
||||
<h1 class="flex flex-col gap-y-4 items-center justify-center flex items-center justify-center min-h-screen">
|
||||
<img src="/logo.svg">
|
||||
<div class="absolute top-4 right-4">
|
||||
<button class="block p-4 bg-black text-slate-400" @click="store.addData()">add to 🍍</button>
|
||||
<pre>
|
||||
{{ store.getDatas }}
|
||||
</pre>
|
||||
</div>
|
||||
</h1>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { useTestStore } from '@/store/testStore'
|
||||
const store = useTestStore()
|
||||
</script>
|
||||
|
||||
18
app/store/testStore.ts
Normal file
18
app/store/testStore.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import { defineStore } from 'pinia'
|
||||
|
||||
export const useTestStore = defineStore('test', {
|
||||
state: () => ({
|
||||
datas: Array(),
|
||||
}),
|
||||
|
||||
actions: {
|
||||
async addData() {
|
||||
this.datas.push('item')
|
||||
}
|
||||
},
|
||||
|
||||
getters: {
|
||||
// Obtenir tous les compilations
|
||||
getDatas: (state) => state.datas
|
||||
}
|
||||
})
|
||||
@@ -2,5 +2,8 @@
|
||||
export default defineNuxtConfig({
|
||||
compatibilityDate: '2025-07-15',
|
||||
devtools: { enabled: true },
|
||||
modules: ['@nuxt/eslint', '@nuxtjs/tailwindcss']
|
||||
modules: ['@nuxt/eslint', '@nuxtjs/tailwindcss', '@pinia/nuxt'],
|
||||
pinia: {
|
||||
storesDirs: ['./stores/**'],
|
||||
},
|
||||
})
|
||||
@@ -12,8 +12,10 @@
|
||||
"dependencies": {
|
||||
"@nuxt/eslint": "1.9.0",
|
||||
"@nuxtjs/tailwindcss": "6.14.0",
|
||||
"@pinia/nuxt": "0.11.2",
|
||||
"eslint": "^9.33.0",
|
||||
"nuxt": "^4.0.3",
|
||||
"pinia": "^3.0.3",
|
||||
"vue": "^3.5.18",
|
||||
"vue-router": "^4.5.1"
|
||||
},
|
||||
|
||||
41
pnpm-lock.yaml
generated
41
pnpm-lock.yaml
generated
@@ -14,12 +14,18 @@ importers:
|
||||
'@nuxtjs/tailwindcss':
|
||||
specifier: 6.14.0
|
||||
version: 6.14.0(magicast@0.3.5)
|
||||
'@pinia/nuxt':
|
||||
specifier: 0.11.2
|
||||
version: 0.11.2(magicast@0.3.5)(pinia@3.0.3(typescript@5.9.2)(vue@3.5.18(typescript@5.9.2)))
|
||||
eslint:
|
||||
specifier: ^9.33.0
|
||||
version: 9.33.0(jiti@2.5.1)
|
||||
nuxt:
|
||||
specifier: ^4.0.3
|
||||
version: 4.0.3(@netlify/blobs@9.1.2)(@parcel/watcher@2.5.1)(@types/node@24.3.0)(@vue/compiler-sfc@3.5.18)(db0@0.3.2)(eslint@9.33.0(jiti@2.5.1))(ioredis@5.7.0)(magicast@0.3.5)(optionator@0.9.4)(rollup@4.46.3)(terser@5.43.1)(typescript@5.9.2)(vite@7.1.2(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1)(yaml@2.8.1))(yaml@2.8.1)
|
||||
pinia:
|
||||
specifier: ^3.0.3
|
||||
version: 3.0.3(typescript@5.9.2)(vue@3.5.18(typescript@5.9.2))
|
||||
vue:
|
||||
specifier: ^3.5.18
|
||||
version: 3.5.18(typescript@5.9.2)
|
||||
@@ -1139,6 +1145,11 @@ packages:
|
||||
resolution: {integrity: sha512-dfUnCxiN9H4ap84DvD2ubjw+3vUNpstxa0TneY/Paat8a3R4uQZDLSvWjmznAY/DoahqTHl9V46HF/Zs3F29pg==}
|
||||
engines: {node: '>= 10.0.0'}
|
||||
|
||||
'@pinia/nuxt@0.11.2':
|
||||
resolution: {integrity: sha512-CgvSWpbktxxWBV7ModhAcsExsQZqpPq6vMYEe9DexmmY6959ev8ukL4iFhr/qov2Nb9cQAWd7niFDnaWkN+FHg==}
|
||||
peerDependencies:
|
||||
pinia: ^3.0.3
|
||||
|
||||
'@pkgjs/parseargs@0.11.0':
|
||||
resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==}
|
||||
engines: {node: '>=14'}
|
||||
@@ -1605,6 +1616,9 @@ packages:
|
||||
'@vue/devtools-api@6.6.4':
|
||||
resolution: {integrity: sha512-sGhTPMuXqZ1rVOk32RylztWkfXTRhuS7vgAKv0zjqk8gbsHkJ7xfFf+jbySxt7tWObEJwyKaHMikV/WGDiQm8g==}
|
||||
|
||||
'@vue/devtools-api@7.7.7':
|
||||
resolution: {integrity: sha512-lwOnNBH2e7x1fIIbVT7yF5D+YWhqELm55/4ZKf45R9T8r9dE2AIOy8HKjfqzGsoTHFbWbr337O4E0A0QADnjBg==}
|
||||
|
||||
'@vue/devtools-core@7.7.7':
|
||||
resolution: {integrity: sha512-9z9TLbfC+AjAi1PQyWX+OErjIaJmdFlbDHcD+cAMYKY6Bh5VlsAtCeGyRMrXwIlMEQPukvnWt3gZBLwTAIMKzQ==}
|
||||
peerDependencies:
|
||||
@@ -3683,6 +3697,15 @@ packages:
|
||||
resolution: {integrity: sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==}
|
||||
engines: {node: '>=0.10.0'}
|
||||
|
||||
pinia@3.0.3:
|
||||
resolution: {integrity: sha512-ttXO/InUULUXkMHpTdp9Fj4hLpD/2AoJdmAbAeW2yu1iy1k+pkFekQXw5VpC0/5p51IOR/jDaDRfRWRnMMsGOA==}
|
||||
peerDependencies:
|
||||
typescript: '>=4.4.4'
|
||||
vue: ^2.7.0 || ^3.5.11
|
||||
peerDependenciesMeta:
|
||||
typescript:
|
||||
optional: true
|
||||
|
||||
pirates@4.0.7:
|
||||
resolution: {integrity: sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA==}
|
||||
engines: {node: '>= 6'}
|
||||
@@ -6099,6 +6122,13 @@ snapshots:
|
||||
'@parcel/watcher-win32-ia32': 2.5.1
|
||||
'@parcel/watcher-win32-x64': 2.5.1
|
||||
|
||||
'@pinia/nuxt@0.11.2(magicast@0.3.5)(pinia@3.0.3(typescript@5.9.2)(vue@3.5.18(typescript@5.9.2)))':
|
||||
dependencies:
|
||||
'@nuxt/kit': 3.18.1(magicast@0.3.5)
|
||||
pinia: 3.0.3(typescript@5.9.2)(vue@3.5.18(typescript@5.9.2))
|
||||
transitivePeerDependencies:
|
||||
- magicast
|
||||
|
||||
'@pkgjs/parseargs@0.11.0':
|
||||
optional: true
|
||||
|
||||
@@ -6564,6 +6594,10 @@ snapshots:
|
||||
|
||||
'@vue/devtools-api@6.6.4': {}
|
||||
|
||||
'@vue/devtools-api@7.7.7':
|
||||
dependencies:
|
||||
'@vue/devtools-kit': 7.7.7
|
||||
|
||||
'@vue/devtools-core@7.7.7(vite@7.1.2(@types/node@24.3.0)(jiti@2.5.1)(terser@5.43.1)(yaml@2.8.1))(vue@3.5.18(typescript@5.9.2))':
|
||||
dependencies:
|
||||
'@vue/devtools-kit': 7.7.7
|
||||
@@ -8914,6 +8948,13 @@ snapshots:
|
||||
|
||||
pify@2.3.0: {}
|
||||
|
||||
pinia@3.0.3(typescript@5.9.2)(vue@3.5.18(typescript@5.9.2)):
|
||||
dependencies:
|
||||
'@vue/devtools-api': 7.7.7
|
||||
vue: 3.5.18(typescript@5.9.2)
|
||||
optionalDependencies:
|
||||
typescript: 5.9.2
|
||||
|
||||
pirates@4.0.7: {}
|
||||
|
||||
pkg-types@1.3.1:
|
||||
|
||||
Reference in New Issue
Block a user