摘要: 1. 安装scss npm install node-sass sass-loader --save-dev npm install style-loader css-loader --save-dev 2. 在build文件中找到webpack.base.conf.js, 配置如下: { test 阅读全文
posted @ 2020-04-08 19:40 深巷漫步 阅读(1311) 评论(0) 推荐(0) 编辑
摘要: 1. 设置站点配置文件_config.yml中 post_asset_folder:true。 Hexo 提供了一种更方便管理 Asset 的设定:post_asset_folder当您设置post_asset_folder为true参数后,在建立文件时,Hexo会自动建立一个与文章同名的文件夹,您 阅读全文
posted @ 2020-03-31 12:26 深巷漫步 阅读(722) 评论(0) 推荐(1) 编辑
摘要: <style> #Arrow { margin: 200px; width: 0px; height: 0px; border-left: 30px solid transparent; border-right: 30px solid transparent; border-top: 30px s 阅读全文
posted @ 2020-03-30 10:45 深巷漫步 阅读(1049) 评论(0) 推荐(0) 编辑
摘要: 1. 使用css3中的属性:transform: translate(x,y) <style> .box { width: 100px; height: 100px; background: orange; position: absolute; left: 50%; top: 50%; trans 阅读全文
posted @ 2020-03-30 09:07 深巷漫步 阅读(494) 评论(0) 推荐(0) 编辑
摘要: 此错误的原因是css语法错误 解决方法 添加上面画线处代码, 就可以解决css压缩错误。 阅读全文
posted @ 2020-03-28 17:54 深巷漫步 阅读(1678) 评论(0) 推荐(0) 编辑
摘要: 如果需要在按需引入中显示取消按钮, 就必须要写成上图所示,如果使用alert方式, 也一样 阅读全文
posted @ 2020-03-22 10:24 深巷漫步 阅读(772) 评论(0) 推荐(0) 编辑
摘要: 1. 第一步 <template> <div class="tip"> <el-dialog title="提示" :visible="dialogVisible" width="30%"> <span>{{msg}}</span> <span slot="footer" class="dialog 阅读全文
posted @ 2020-03-11 14:31 深巷漫步 阅读(5484) 评论(0) 推荐(1) 编辑
摘要: 1. 函数防抖(事件频繁触发,在特定时间内,函数只被触发一次, 如果在特定时间内,不断被触发,则会重新计算时间) <button id="btn1">防抖</button> // 防抖 function getData() { console.log(1111); } const debounce 阅读全文
posted @ 2020-01-08 11:18 深巷漫步 阅读(127) 评论(0) 推荐(0) 编辑
摘要: 在package.json中找到 eslintConfig --> rules --> 添加 "no-console": "off"就ok啦 造成这个问题的原因是vue3.x脚手架使用eslint代码检测质量提醒造成的, 或者使用window.console.log(), 也可以解决问题,就不需要配 阅读全文
posted @ 2020-01-03 16:06 深巷漫步 阅读(799) 评论(0) 推荐(0) 编辑
摘要: 在一次使用axios封装请求时, 请求后台返回的数据是[[PromiseValue]] Promise的设计文档中说了,[[PromiseValue]]是个内部变量,外部无法得到,只能在then中获取。 最终请求可以返回数据(就是忘记了then) 阅读全文
posted @ 2020-01-03 11:06 深巷漫步 阅读(15051) 评论(0) 推荐(0) 编辑
/* 看板娘 */