dev: test
This commit is contained in:
@ -1,10 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<img class="logo" src="/static/logo.png" />
|
<img class="logo" src="/static/logo.png" />
|
||||||
<div class="text-area">
|
<div class="flex flex-col items-center gap-4">
|
||||||
<p class="title text-red-500">
|
<p class="title text-red-500">
|
||||||
{{ title }}
|
{{ title }}
|
||||||
<span>{{ user.count }}</span>
|
|
||||||
</p>
|
</p>
|
||||||
<button @click="onClick">increment</button>
|
<button @click="onClick">increment</button>
|
||||||
</div>
|
</div>
|
||||||
@ -13,6 +12,7 @@
|
|||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useUserStore } from '@/stores/user';
|
import { useUserStore } from '@/stores/user';
|
||||||
|
import { computed } from 'vue';
|
||||||
import { ref } from 'vue'
|
import { ref } from 'vue'
|
||||||
|
|
||||||
const user = useUserStore()
|
const user = useUserStore()
|
||||||
@ -21,7 +21,7 @@ const onClick = () => {
|
|||||||
user.count++
|
user.count++
|
||||||
}
|
}
|
||||||
|
|
||||||
const title = ref('Hello')
|
const title = computed(() => `Counter: ${user.count}`)
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
Reference in New Issue
Block a user