<script setup>
import { ref } from 'vue'
const count = ref(0)
</script>
<template>
<p>Count: {{ count }}</p>
<button @click="count++">+</button>
<button @click="count--">−</button>
</template>Vue 2 微应用
Count
0
<script setup>
import { ref } from 'vue'
const count = ref(0)
</script>
<template>
<p>Count: {{ count }}</p>
<button @click="count++">+</button>
<button @click="count--">−</button>
</template>