Sun Apr 30 13:58:00 UTC 2023 inscode

上级 9f474671
...@@ -10,9 +10,7 @@ ...@@ -10,9 +10,7 @@
:id="item.id" :price="item.goods_price" :count="item.goods_count" @good_check_change="updateGoodState"></Goods> :id="item.id" :price="item.goods_price" :count="item.goods_count" @good_check_change="updateGoodState"></Goods>
<Footer :full_checked="allChecked" :amount="amt" @changAllGoodsState="changeState"></Footer> <Footer :full_checked="allChecked" :amount="amt" @changAllGoodsState="changeState"></Footer>
<div>
eventBus
</div>
</div> </div>
</template> </template>
...@@ -21,7 +19,8 @@ import axios from 'axios' // 导入 axios 模块 ...@@ -21,7 +19,8 @@ import axios from 'axios' // 导入 axios 模块
import Header from '@/components/Header/Header.vue' // 导入 Header 组件 import Header from '@/components/Header/Header.vue' // 导入 Header 组件
import Goods from '@/components/Goods/Goods.vue' // 导入 Goods 组件 import Goods from '@/components/Goods/Goods.vue' // 导入 Goods 组件
import Footer from '@/components/Footer/Footer.vue' import Footer from '@/components/Footer/Footer.vue'
import eventBus from './components/eventBus.js' import { EventBus } from './components/eventBus.js'
export default { export default {
components: { components: {
Header, // 注册 Header 组件 Header, // 注册 Header 组件
...@@ -84,7 +83,7 @@ export default { ...@@ -84,7 +83,7 @@ export default {
this.initBuyCars() this.initBuyCars()
// helloWorld(); // 执行该方法
} }
} }
</script> </script>
......
export function helloWorld() {
const eventBus = 'hello' console.log("Hello, World!");
export default eventBus; // 导出 EventBus 对象 }
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册