1.在项目中创建components文件夹

2.在main.js文件中引入vue文件

// main.js (或其他主入口文件)
import GlobalComponent from '@/components/GlobalComponent.vue' // 导入全局组件
Vue.component('global-component', GlobalComponent) // 全局注册组件

点赞(0) 打赏

评论列表 共有 0 条评论

暂无评论

微信小程序

微信扫一扫体验

立即
投稿

微信公众账号

微信扫一扫加关注

发表
评论
返回
顶部