add solution

2_hello_name
valerio 2025-01-27 18:07:02 +01:00
parent a37263efff
commit cc8c5c6711
1 changed files with 8 additions and 6 deletions

View File

@ -1,15 +1,17 @@
<script setup>
const name = 'your-name'
const textClass = 'text'
import {ref} from "vue";
const name = ref('')
setTimeout(() => {
name.value = 'Bob'
}, 1000)
</script>
<template>
<h1 :class="textClass">Hello {{ name }}</h1>
<h1>Hello {{ name }}</h1>
</template>
<style scoped>
.text {
color: red;
}
</style>