![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Solve
JavaStudyha
这个作者很懒,什么都没留下…
展开
-
Vue项目设置favicon
vue-cli搭建的vue项目里面已经有了一个static文件夹,用于存放静态文件。一、将favicon图片放到该文件夹下,然后再index.html中添加:<link rel="shortcut icon" type="image/x-icon" href="static/favicon.ico">刷新浏览器就会更新。二、如果没有效果,则查看你的build文件夹下:build/webpack.dev.conf.js中:new HtmlWebpackPlugin({ fi原创 2020-09-18 11:28:34 · 1292 阅读 · 0 评论 -
解决:npm run dev:Error Cannot find module ‘babel-plugin-syntax-jsx‘
问题:vue 项目npm run dev运行时报错error in ./src/main.js Module build failed: Error: Cannot find module 'babel-plugin-syntax-jsx'解决:npm install babel-plugin-syntax-jsx --save-dev原因:缺少相应组件原创 2020-09-02 15:03:30 · 5789 阅读 · 0 评论 -
解决:Requires Babel “^7.0.0-0“, but was loaded with “6.26.3“
问题:Requires Babel "^7.0.0-0", but was loaded with "6.26.3". If you are sure you have a compatible version of @babel/core, it is likely that something in your build process is loading the wrong version. Inspect the stack trace of this error to look for原创 2020-08-31 21:50:20 · 2019 阅读 · 0 评论 -
解决:npm ERR! enoent This is related to npm not being able to find a file.
问题:运行npm命令时出现如下错误:npm ERR! enoent ENOENT: no such file or directory, rename 'D:\project\WebStorm\blog\node_modules\_braces@2.3.2@braces\node_modules\extend-shallow' -> 'D:\project\WebStorm\blog\node_modules\_braces@2.3.2@braces\node_modules\extend-sha原创 2020-08-31 21:43:20 · 22009 阅读 · 2 评论 -
如何给Vue页面添加背景图片
1、首先需要两个div,一个用来放背景图,一个用来放除背景图之外的东西<div class="background"></div><div class="front"></div>第一个div放背景图<div class="background"> <img :src="imgSrc" width="100%" height="100%" alt="" /></div>第二个div放其他页面2、js转载 2020-07-24 19:55:55 · 29841 阅读 · 12 评论 -
解决:vue组件顶部留有空白问题
问题:制作导航栏组件时发现无论怎么调整,顶部始终留有一小部分空白。解决:后来经过多方查找,原来是index.html的body自带样式,在该文件的头部写如下自定义样式。<style> body{ margin:0; padding:0; } </style>问题解决:...原创 2020-07-24 11:08:51 · 7790 阅读 · 2 评论 -
解决:Couldn‘t find preset “es2015“ relative to directory问题
问题:Couldn’t find preset “es2015” relative to directory原因:由于引入的 Element-UI 使用了ES标准,所以编译会报错。解决:安装 ES 标准npm install babel-preset-es2015 --save-dev原创 2020-07-23 22:01:39 · 2729 阅读 · 0 评论