Skip to content

Commit 1c23dde

Browse files
managing reactive data and handling events
1 parent bb0efb3 commit 1c23dde

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

templates/basic/app.vue

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
<script setup lang="ts">
2-
const msg = 'Hello World! This is the basic template.'
2+
import { ref } from 'vue';
3+
const msg = ref('Hello World! This is the basic template.');
4+
const changeMessage = () => {
5+
msg.value = 'This is Basic Nuxt Template';
6+
};
37
</script>
48

59
<template>
610
<div>{{ msg }}</div>
11+
<button @click="changeMessage">Click Me</button>
712
</template>

0 commit comments

Comments
 (0)