摘要: require.context是webpack暴露出来的方法,使用webpack或vue-cli搭建的项目都可以使用。 1.动态将components文件下的组件自动化注册为全局组件 main.js中 import Vue from "vue"; // 自动加载components目录下的 .vue 阅读全文
posted @ 2021-07-01 14:40 x小梦 阅读(709) 评论(0) 推荐(0) 编辑