Skip to content

Commit 5be2c0d

Browse files
committed
Update HelloVue rendering with dynamic HTML content
Replaced static content with a dynamic variable and added raw HTML rendering using `v-html`. This improves flexibility and allows for more dynamic content updates.
1 parent bdcba18 commit 5be2c0d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/components/HelloVue.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
<script setup>
22
console.info("Hello Vue");
3+
4+
const hello = "<h1>Hello Vue</h1>"
35
</script>
46

57
<template>
6-
<h1 class="hello">Hello Vue</h1>
8+
<h1 class="hello">{{hello}}</h1>
9+
10+
<div v-html="hello"></div>
711
</template>
812

913
<style scoped>

0 commit comments

Comments
 (0)