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

21 lines
323 B
Vue
Raw Normal View History

2023-11-24 20:29:05 +08:00
<script setup lang="ts">
2023-11-29 02:38:01 +08:00
import { ref } from 'vue/vapor'
2023-11-24 20:29:05 +08:00
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>