摘要: cookie 是由服务器发送到浏览器的变量。 cookie 通常是服务器嵌入到用户计算机中的小文本文件。每当计算机通过浏览器请求一个页面,就会发送这个 cookie。 setCookie(name, value, expire, path, domain, secure) name::必需。名称 v 阅读全文
posted @ 2021-11-30 16:49 Jaye8584 阅读(142) 评论(0) 推荐(0) 编辑
摘要: 一、隐藏滚动条 .className::-webkit-scrollbar{ display: none;} 二、禁止触发默认手势的操作 touch-action: none https://zhuanlan.zhihu.com/p/53660071 三、pointer-events 禁止长按保存图 阅读全文
posted @ 2021-07-23 11:05 Jaye8584 阅读(56) 评论(0) 推荐(0) 编辑
摘要: 注:个人学习笔记,不具备参考性 参考博文:https://www.cnblogs.com/fengzheng126/archive/2012/05/18/2507632.html 一、“行高”顾名思意指一行文字的高度。具体来说是指两行文字间基线之间的距离。 二、line-height 被用来控制行与 阅读全文
posted @ 2021-07-21 17:18 Jaye8584 阅读(156) 评论(0) 推荐(0) 编辑
摘要: 问题描述: 在移动端,点击返回按钮(或者左滑右滑返回)时,页面并不会刷新,但需要刷新页面重新请求数据,怎么做? window.onpageshow = function(e) { if (e.persisted) { window.location.reload(); } }; window.onp 阅读全文
posted @ 2021-07-21 16:02 Jaye8584 阅读(370) 评论(0) 推荐(0) 编辑
摘要: 创建 <script> 外部引入 js 文件: 需求:想要在页面中引入外部 js 文件,但是因各种原因不能直接在根页面引入 <script src="//xxx/xxxxx.js"></script>,可以封装一个方法,采用 appendChild 插入节点。 loadScript(src) { c 阅读全文
posted @ 2020-11-05 15:15 Jaye8584 阅读(1125) 评论(0) 推荐(0) 编辑
摘要: Django 中写注释: {% comment "TODO 因需求改动先隐藏掉,相关代码勿删除" %} <div>hhh</div> {% endcomment %} 阅读全文
posted @ 2020-09-21 15:59 Jaye8584 阅读(280) 评论(0) 推荐(0) 编辑
摘要: 参考相关文章: https://blog.risingstack.com/pdf-from-html-node-js-puppeteer/ https://juejin.im/post/5dae8b82e51d4524ce222764 这篇文章写得很好很具体了,下面记录下实际运用。 关于页面导出 . 阅读全文
posted @ 2020-07-29 18:23 Jaye8584 阅读(3180) 评论(0) 推荐(1) 编辑
摘要: 一款配合 ts、CSS Modules 的插件。 https://github.com/mrmckeb/typescript-plugin-css-modules#visual-studio-code 1、yarn add -D typescript-plugin-css-modules 2、tsc 阅读全文
posted @ 2020-07-23 10:34 Jaye8584 阅读(2548) 评论(0) 推荐(0) 编辑
摘要: 官网资料:https://react.docschina.org/docs/hooks-reference.html#useref useRef 返回一个可变的 ref 对象,其 .current 属性被初始化为传入的参数(initialValue)。返回的 ref 对象在组件的整个生命周期内保持不 阅读全文
posted @ 2020-07-06 16:50 Jaye8584 阅读(6745) 评论(0) 推荐(0) 编辑
摘要: 偶然碰到这个问题,摘自 ts 官网:https://www.tslang.cn/docs/release-notes/typescript-2.6.html TypeScript 2.6支持在.ts文件中通过在报错一行上方使用 // @ts-ignore来忽略错误。 if (false) { // 阅读全文
posted @ 2020-07-06 15:53 Jaye8584 阅读(6722) 评论(0) 推荐(0) 编辑