vue3-core/playground/src/App-root.vue

21 lines
317 B
Vue
Raw Normal View History

2023-11-24 20:29:05 +08:00
<script setup lang="ts">
import { ref } from 'vue'
const count = ref(1)
const handleClick = () => {
count.value++
}
// @ts-expect-error
globalThis.count = count
// @ts-expect-error
globalThis.handleClick = handleClick
</script>
<template>
<button @click="handleClick">
{{ count }}
</button>
</template>