项目问题集合
曦曦湘涟
web前端
展开
-
You may use special comments to disable some warnings.
npm run dev出现:解决:注释build/webpack.base.conf.js文件的第44行代码,如下图示:原创 2020-06-14 20:51:09 · 207 阅读 · 0 评论 -
Unexpected end of JSON input while parsing near
npm install 出现:npm ERR! Unexpected end of JSON input while parsing near '...0.0","string-width":"'npm ERR! A complete log of this run can be found in:npm ERR! C:\Users\Gladys\AppData\Roaming\npm-cache\_logs\2020-05-27T12_56_29_397Z-de原创 2020-05-30 22:32:00 · 210 阅读 · 0 评论 -
Vue npm ERR! code ELIFECYCLE
npm install出现:npm ERR! code ELIFECYCLEnpm ERR! errno 1npm ERR! node-sass@4.11.0 postinstall: `node scripts/build.js`npm ERR! Exit status 1npm ERR!npm ERR! Failed at the node-sass@4.11.0 postinstall script.npm ERR! This is probably not a problem with原创 2020-05-28 11:13:01 · 369 阅读 · 0 评论 -
Vue项目中包含穿透的样式页面使用less
<style scoped lang="less">/* 页面样式 */</style><style scoped>/* 穿透样式*/</style>原创 2020-04-11 03:32:36 · 234 阅读 · 0 评论 -
如何在Vue项目中使用less
第一步 npm 安装lessnpm install less less-loader --save第二步 修改webpack.base.conf.js修改位置:build文件夹—webpack.base.conf.js–module.export—moulde—rules,在rules里添加以下代码{ test: /\.less$/, loader: "style-loader...原创 2020-04-11 03:31:53 · 712 阅读 · 0 评论 -
Vue页面内锚点跳转
问题在vue项目中,在导航栏内用href跳转页面,刷新后页面消失刷新前:刷新后:解决html:<ul> <li><a @click="jump('#project')">作品展现</a></li> </ul>js:methods: {const downloadEle = document.que...原创 2020-03-14 05:11:02 · 2210 阅读 · 0 评论 -
Vue项目打包后整体页面缩小的坑
这两天发现一个特别奇怪的问题,做好的Vue项目打包后页面整体都缩小了,然后去度娘上搜索解决方案,但是上面都是页面放大或者防止页面缩小放大的解决方案,好不容易搜到有类似的标题,但是没有解决方案,百思不得其解,各种方法都试过了,都无济于事,不知道你们是否有遇到过这样的问题?后来,我想着将打包后的页面放大看看,结果一打开就发现问题所在了,打包后的页面是按100%来显示的,而打开的本地项目页面是按125...原创 2020-02-23 18:03:18 · 2425 阅读 · 1 评论 -
如何利用github在.md文件中添加图片
1、在github上的仓库建立一个存放图片的库,库的名字随意。如:Images-blog2、将需要在.md文件中显示的图片整理在一个文件夹中,然后push到Images-blog库中3、然后打开github官网,进入仓库的Images-blog库中,打开图片点击红框所示的按钮,copy地址4、在.md文件中填入:![Image](https://raw.githubuserconte...原创 2020-02-17 16:58:09 · 4542 阅读 · 0 评论 -
built files are meant to be served over an HTTP server. Opening index.html over file:// won't work
npm run build之后,出现提示:Tip: built files are meant to be served over an HTTP server. Opening index.html over file:// won‘t work.打开dist文件夹里的index.html文件,页面无法显示,控制台报错如下:解决1:将绝对路径改为相对路径**修改目标文件:**项目目录 &...原创 2020-02-10 23:41:59 · 3894 阅读 · 0 评论