add solution
parent
a37263efff
commit
cc8c5c6711
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Reference in New Issue