Fork me on GitHub
摘要: 1. vue中use作用, Vue.use是Vue提供的一个静态方法,用来向vue注册插件。 Vue.use 可以接收一个对象,Vue.use(obj) 对象obj中需要提供一个 install 函数 在 Vue.use(obj) 时,会自动调用该 install 函数,并传入 Vue构造器 // 阅读全文
posted @ 2022-09-15 10:15 欢欢11 阅读(48) 评论(0) 推荐(0) 编辑
摘要: 1. 在webpack中使用require来获取组件 / 参数:1. 目录 2. 是否加载子目录 3. 加载的正则匹配 //匹配当前文件夹下的所有.vue文件 注册全局组件 const importFn = require.context('./', false, /\.vue$/) // cons 阅读全文
posted @ 2022-09-15 10:09 欢欢11 阅读(396) 评论(0) 推荐(0) 编辑