摘要:
图片打包关键要用到file-loader或url-loader,其中url-loader与file-loader功能基本一致,只不过url-loader能将小于某个大小的图片进行base64格式的转化处理。 { test: /\.(png|jpg|gif|svg)$/, use: ['file-lo 阅读全文
摘要:
// permission.js 在main.js的引入 就会被执行 const whiteList =['/login'] router.beforeEach(to ,from, next) => { if(checkPermission()){ if(to.path '/'&& router.o 阅读全文
摘要:
const mapfunc = function (routers, routermap, curlevelrouters) { routers.foreach(todoroute => { routermap.foreach(maproute => { if(maproute.menucode t 阅读全文
摘要:
//导入import NProgress from 'nprogress'import 'nprogress/nprogress.css' router.beforeEach((to, from, next) => { NProgress.start() next()}) router.afterE 阅读全文
摘要:
var canvas = document.getElementsByTagName("canvas"); if(canvas&&canvas.length>0){ // 创建标签 var oA = document.createElement("a"); // 设置下载名称 oA.download 阅读全文
摘要:
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title></title> </head> <body> <div id="app"> <input type="text" v-model="text" /> {{text}} </div 阅读全文
摘要:
const excludes = ['./index.js'] const context = require.context('./filepath',true,/\.js/) const routerMap = context.keys().filter( url => { return exc 阅读全文
摘要:
.selectBox{ /deep/.el-select_tags{ span:first-child{ max-width:100%; text-align:left; .el-tag--light:first-child{ display:inline-block; max-width:100% 阅读全文
摘要:
import pic from '@/assets/33.jpg'; export default { name: 'HelloWorld', data () { return { msg: 'Welcome to Your Vue.js App', env: `${process.env.NODE 阅读全文
摘要:
assetsRoot:打包后存放的位置 assetsSubDirectory:静态文件路径会拼接上 assetsPublicPath+assetsSubDirectory assetsPublicPath:'test' 访问路径后添加/test 阅读全文