<template>
    <button @click="testFn">全局事件测试</button>
</template>

<script lang="ts" setup>
import bus from 'utils/bus'

onBeforeMount(() => {
    console.log('onBeforeMount')
})
onMounted(() => {
    console.log('onMounted')
})

onBeforeUnmount(() => {
    console.log('onBeforeUnmount')
})
onUnmounted(() => {
    console.log('onUnmounted')
})
let a = computed(() => {
    return 'aaa'
})

console.log(a)

const testFn = () => {
    console.log('测试')
    bus.emit('sendMsg', '666')
}
</script>

<style scoped></style>
