注册全局组件方式 在main.js中: * 注册全局组件方式: 注册: import GoodsList from "@/components/GoodsList"; Vue.component('GoodsList',GoodsList) 引用: <GoodsList/>