摘要: export const deepClone = data => { var type = getObjType(data); var obj; if (type 'array') obj = []; else if (type 'object') obj = {}; else return dat 阅读全文
posted @ 2022-07-12 15:27 yoona-lin 阅读(51) 评论(0) 推荐(0) 编辑
摘要: devServer: { // host: '0.0.0.0', port: 8080, open: true, proxy: { // "/test": { // target: `http://a/b`, //代理地址 // changeOrigin: true, //是否修改为后端host,h 阅读全文
posted @ 2022-07-12 15:02 yoona-lin 阅读(380) 评论(0) 推荐(0) 编辑
摘要: //index.js const componentsContext = require.context('./', true, /\.vue$/) let arr = {} componentsContext.keys().forEach(file_name => { // 获取文件中的 defa 阅读全文
posted @ 2022-07-12 14:42 yoona-lin 阅读(185) 评论(0) 推荐(0) 编辑
摘要: main.js // 全局组件自动注册 import '@/components/autoRegister' autoRegister.js /** * 全局组件自动注册 * * 全局组件各个组件按文件夹区分,文件夹名称与组件名无关联,但建议与组件名保持一致 * 文件夹内至少保留一个文件名为 ind 阅读全文
posted @ 2022-07-12 14:28 yoona-lin 阅读(27) 评论(0) 推荐(0) 编辑