gohttpdUi/src/pages/index/views/example-demo/example-page/example-add.vue

31 lines
564 B
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template>
<info-write @success="success" />
</template>
<script lang="ts">
import { defineComponent } from 'vue'
import InfoWrite from './components/InfoWrite.vue'
import vueBus from '@/vue-bus'
export default defineComponent({
// name: 'ExampleAdd',
components: {
InfoWrite
},
setup() {
// 成功之后的回调
function success(type: string) {
// 由于使用的是页面跳转所以只能通过vueBus去进行通信
vueBus.$emit('success', type)
}
return {
success
}
}
})
</script>
<style>
</style>