32 lines
784 B
Vue
32 lines
784 B
Vue
<template>
|
|
<h1 class="text-3xl font-bold underline">
|
|
Login Page Gooooo
|
|
</h1>
|
|
<router-link to="/about">Go to About</router-link>
|
|
</template>
|
|
|
|
<script setup>
|
|
import { useCounterStore } from '@/stores/counter'
|
|
import { computed, ref } from 'vue'
|
|
|
|
// access the `store` variable anywhere in the component ✨
|
|
const storeCounter = useCounterStore()
|
|
|
|
let count = ref(0)
|
|
|
|
console.log(storeCounter.count) // 0
|
|
|
|
storeCounter.increment()
|
|
console.log(storeCounter.count) // 1
|
|
|
|
count = computed(() => storeCounter.doubleCount)
|
|
console.log(count.value) // 2
|
|
console.log(storeCounter.count) // 1
|
|
|
|
storeCounter.changeCount(19)
|
|
console.log(storeCounter.count) // 10
|
|
|
|
storeCounter.count = computed(() => storeCounter.doubleCount)
|
|
console.log(storeCounter.count) // 20 */
|
|
|
|
</script> |