hrms-user/src/components/TestUpgrade.vue

16 lines
343 B
Vue
Raw Normal View History

2024-01-24 16:51:53 +07:00
<!-- Child.vue -->
<script setup lang="ts">
const model = defineModel({ type: Number, required: true });
const total = defineModel("total", { type: Number, required: true });
function update() {
model.value++;
}
</script>
<template>
<div>Child model is: {{ model }}</div>
{{ total }}
<q-btn @click="update">Add +</q-btn>
</template>