add solution
parent
a37263efff
commit
9195535aad
|
|
@ -1,11 +1,20 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
|
import {ref} from "vue";
|
||||||
|
|
||||||
const name = 'your-name'
|
const name = 'your-name'
|
||||||
const textClass = 'text'
|
const textClass = 'text'
|
||||||
|
const counter = ref(0)
|
||||||
|
|
||||||
|
function incrementCounter() {
|
||||||
|
counter.value++
|
||||||
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<h1 :class="textClass">Hello {{ name }}</h1>
|
<h1 :class="textClass">Hello {{ name }}</h1>
|
||||||
|
<button @click="incrementCounter">click me for cookies</button>
|
||||||
|
You have {{ counter }} cookies
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue