会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
Tristam
博客园
首页
新随笔
联系
订阅
管理
2021年1月15日
Node.js中,脚本输出显示 -e 方法
摘要: Node.js中,除了直接运行脚本文件输出显示以外,还可以使用 -e 方法,如下所示: 装好Node.js后,打开cmd,直接输入以下即可。 node -e "console.log('Hello CSDN');" 原文链接:https://blog.csdn.net/u012138032/arti
阅读全文
posted @ 2021-01-15 14:41 tristam
阅读(515)
评论(0)
推荐(0)
2021年1月13日
使用getBoundingClientRect做一个简单的吸顶效果
摘要: getBoundingClientRect可以根据dom的四个边获得与window上边或左边的距离。 const obj = dom.getBoundingClientRect();obj.top = dom的上边距离window上边的距离;obj.bottom = dom的下边距离window上边
阅读全文
posted @ 2021-01-13 15:05 tristam
阅读(260)
评论(0)
推荐(0)
2020年12月3日
一个用于验证package.json版本号的正则
摘要: /\bv?(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)(?:-[\da-z-]+(?:\.[\da-z-]+)*)?(?:\+[\da-z-]+(?:\.[\da-z-]+)*)?\b/
阅读全文
posted @ 2020-12-03 10:02 tristam
阅读(166)
评论(0)
推荐(0)
2019年5月29日
git stash的使用
摘要: 当我修改bug01的时候突然来了一个bug02,而且bug02优先级比bug01高,但是我不能提交未修改完的bug01代码,这个时候可以用git stash把bug01的修改放到暂存区,然后修改完bug02并push后,可以用git stash pop把上一个放到暂存区的代码版本合并到当前工作区代码
阅读全文
posted @ 2019-05-29 18:35 tristam
阅读(276)
评论(0)
推荐(0)
2019年5月23日
js正则去空格
摘要: var str = " 1 sa s "; str = str.replace(/\s/g, '');
阅读全文
posted @ 2019-05-23 15:33 tristam
阅读(648)
评论(0)
推荐(0)
js下载后台返回的excel文件流
摘要: function download(filename) { var oReq = new XMLHttpRequest(); oReq.open("GET", "", true); oReq.responseType = "blob"; oReq.onload = function (...
阅读全文
posted @ 2019-05-23 11:23 tristam
阅读(4135)
评论(0)
推荐(0)
2019年5月8日
css引入字体
摘要: @font-face{ font-family: '字体名称随便起'; src: url('../font/字体名称.eot'); src:url('../font/字体名称.woff') format('woff'), url('../font/字体名称.ttf') format('truetype'), url('../fo...
阅读全文
posted @ 2019-05-08 10:00 tristam
阅读(4934)
评论(0)
推荐(0)
2019年3月20日
angular+axios后台返回excel文件流,js下载
摘要: 记得请求的responsType: 'blob'
阅读全文
posted @ 2019-03-20 11:28 tristam
阅读(1774)
评论(0)
推荐(0)
常用的mime类型
摘要: .doc application/msword .docx application/vnd.openxmlformats-officedocument.wordprocessingml.document .rtf application/rtf .xls application/vnd.ms-exc
阅读全文
posted @ 2019-03-20 11:27 tristam
阅读(878)
评论(0)
推荐(0)
2019年3月19日
angular懒加载
摘要: 生成module和routing.module文件
阅读全文
posted @ 2019-03-19 16:03 tristam
阅读(290)
评论(0)
推荐(0)
下一页
公告