19 lines
300 B
Vue
19 lines
300 B
Vue
<script setup>
|
|
import { ref } from 'vue'
|
|
|
|
defineProps({ text: String })
|
|
|
|
const count = ref(0);
|
|
|
|
function increment() {
|
|
count.value++;
|
|
}
|
|
</script>
|
|
|
|
<template>
|
|
<h1>Home Automation</h1>
|
|
<h2>{{ text }} </h2>
|
|
<span> {{ count }}</span>
|
|
<button @click="increment">+</button>
|
|
</template>
|