add solution
parent
a37263efff
commit
cc8c5c6711
|
|
@ -1,15 +1,17 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
const name = 'your-name'
|
import {ref} from "vue";
|
||||||
const textClass = 'text'
|
|
||||||
|
const name = ref('')
|
||||||
|
|
||||||
|
setTimeout(() => {
|
||||||
|
name.value = 'Bob'
|
||||||
|
}, 1000)
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<h1 :class="textClass">Hello {{ name }}</h1>
|
<h1>Hello {{ name }}</h1>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.text {
|
|
||||||
color: red;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue