feat: pinia
This commit is contained in:
@ -2,13 +2,25 @@
|
||||
<div class="content">
|
||||
<img class="logo" src="/static/logo.png" />
|
||||
<div class="text-area">
|
||||
<p class="title text-red-500">{{ title }}</p>
|
||||
<p class="title text-red-500">
|
||||
{{ title }}
|
||||
<span>{{ user.count }}</span>
|
||||
</p>
|
||||
<button @click="onClick">increment</button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { useUserStore } from '@/stores/user';
|
||||
import { ref } from 'vue'
|
||||
|
||||
const user = useUserStore()
|
||||
|
||||
const onClick = () => {
|
||||
user.count++
|
||||
}
|
||||
|
||||
const title = ref('Hello')
|
||||
</script>
|
||||
|
||||
|
Reference in New Issue
Block a user