update solution
parent
8748a9d7b0
commit
d6997def9e
|
|
@ -1,24 +1,26 @@
|
|||
<script setup>
|
||||
import {ref} from "vue";
|
||||
import { ref } from "vue";
|
||||
|
||||
const name = 'your-name'
|
||||
const textClass = 'text'
|
||||
const counter = ref(0)
|
||||
|
||||
function incrementCounter() {
|
||||
counter.value++
|
||||
}
|
||||
|
||||
const name = ref('')
|
||||
|
||||
setTimeout(() => {
|
||||
name.value = 'Bob'
|
||||
}, 1000)
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<h1 :class="textClass">Hello {{ name }}</h1>
|
||||
|
||||
<h1>Hello {{ name }}</h1>
|
||||
<button @click="incrementCounter">click me for cookies</button>
|
||||
You have {{ counter }} cookies
|
||||
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.text {
|
||||
color: red;
|
||||
}
|
||||
</style>
|
||||
<style scoped></style>
|
||||
|
|
|
|||
Loading…
Reference in New Issue