常规的 border-image 属性如果直接使用 border-radius 会无效,关于如何实现渐变边框圆角,网上流传着大概这么几种办法: 渐变背景方式(仅适用于纯底色背景) 借助 after 伪类(仅适用于纯底色背景) 借助 css3 中的 mask 遮罩蒙版 加 after 伪类实现(仅适用 Read More
posted @ 2021-03-08 18:05 极·简 Views(823) Comments(0) Diggs(0) Edit
原文链接:https://blog.jijian.link/2020-12-03/nuxtjs-server-error-page/ 当 nuxt 项目在生产环境运行时,如果服务端运行出错,比如 asyncData 方中出错时候,会抛出如下错误页面: 虽然官网提供了一个新增 /layouts/err Read More
posted @ 2020-12-03 17:23 极·简 Views(7198) Comments(1) Diggs(0) Edit
原文链接:https://blog.jijian.link/2020-10-22/css-pre/ 如果后台使用 textarea 输入内容,在前段显示需要保留换行符与空白字符,该如何做? 常规方法 替换换行符为 <br> 标签,替换空白字符为 &nbsp;,再输出到要显示的位置。 弊端:不够简洁! Read More
posted @ 2020-10-22 16:39 极·简 Views(672) Comments(0) Diggs(0) Edit
原文链接:https://blog.jijian.link/2020-09-08/js-ar/ 重要事情说三遍 此文章中的API接口,必须放在 https 协议下测试!浏览器APP必须开启摄像头权限!此文章代码仅在 chrome 手机浏览器及微信中测试通过。此处省略两遍。 示例 本文仅使用陀螺仪模拟 Read More
posted @ 2020-09-08 17:16 极·简 Views(657) Comments(0) Diggs(0) Edit
原文链接:https://blog.jijian.link/2020-08-11/cypress-typescript-cannot-find-module-tslib/ cypress 在 typescript 项目运行报错如下: An unexpected error occurred Cann Read More
posted @ 2020-08-11 13:56 极·简 Views(2139) Comments(0) Diggs(1) Edit
原文链接:https://blog.jijian.link/2020-08-03/cypress-zepto-ajax-response-null/ 如果你项目有如下几个巧合,大概率会发现一个 ajax 请求返回为 null 的 bug: 如果你的项目是移动端项目,刚好使用了 zepto.js。 还 Read More
posted @ 2020-08-04 09:38 极·简 Views(519) Comments(0) Diggs(0) Edit
原文地址: https://blog.jijian.link/2020-07-28/jquery-ajax-upload-file/ 一般上传方式 const file = document.getElementById('js_resume_file').files[0]; const formD Read More
posted @ 2020-07-28 10:56 极·简 Views(1589) Comments(0) Diggs(0) Edit
需求总是千变万化,npm 不是万能的,node_modules 里面的文件也是需要维护的。 如果 npm install 安装了某个包,然而这个包里面部分文件不支持你的需求,这时候怎么办? 比如:https://github.com/svg/svgo 此包可以批量处理 svg 文件,但是是 node Read More
posted @ 2020-07-23 17:29 极·简 Views(2957) Comments(0) Diggs(0) Edit
同步发布:https://blog.jijian.link/2020-06-30/nginx-import-file/ 编程世界中各种奇奇怪怪的需求都有,本次遇到一个需求:根据URL参数判断,包含 xxx=00001 的页面上,引入的 test.js 文件要去掉一部分代码,但是带有参数和不带参数的页 Read More
posted @ 2020-06-30 15:55 极·简 Views(1444) Comments(0) Diggs(0) Edit
nuxt.js 生成的默认文件 components/Logo.vue 源码大概如下: 1 <template> 2 <svg 3 class="NuxtLogo" 4 > 5 </svg> 6 </template> 7 <style> 8 .NuxtLogo { 9 margin: auto; Read More
posted @ 2020-06-16 15:40 极·简 Views(3271) Comments(0) Diggs(1) Edit