会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
刘兵
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
6
7
8
···
10
下一页
2019年8月29日
html2canvas图片跨域问题
摘要: img添加属性 crossorigin="anonymous" <img :src="bgurl" alt="" class="width100b" crossorigin="anonymous"/> <img :src="bgurl" alt="" class="width100b" crosso
阅读全文
posted @ 2019-08-29 09:49 刘兵博客
阅读(12406)
评论(0)
推荐(0)
2019年8月13日
vue-cli3配置环境变量
摘要: 你可以替换你的项目根目录中的下列文件来指定环境变量: .env # 在所有的环境中被载入 .env.local # 在所有的环境中被载入,但会被 git 忽略 .env.[mode] # 只在指定的模式中被载入 .env.[mode].local # 只在指定的模式中被载入,但会被 git 忽略 模
阅读全文
posted @ 2019-08-13 17:52 刘兵博客
阅读(4415)
评论(0)
推荐(0)
2019年8月12日
Angular配置文件
摘要: 打开 angular.json -> projects -> 项目名 -> architect -> build -> configurations -> production。复制该配置以设置更多的配置项 更改对应的配置文件路径 "fileReplacements": [ { "replace":
阅读全文
posted @ 2019-08-12 19:18 刘兵博客
阅读(411)
评论(0)
推荐(0)
2019年8月9日
js压缩图片
摘要: 第一步: 执行命令: cnpm i lrz -S 第二步: 在main.js中引入: import lrz from 'lrz' 第三步: 使用函数: 返回结果是一个promise对象。 lrz( file, { width : 300 //quality: 0.8 //自定义使用压缩方式 }) .
阅读全文
posted @ 2019-08-09 14:57 刘兵博客
阅读(228)
评论(0)
推荐(0)
2019年8月6日
js使div滚动到可视区域
摘要: document.querySelector(".loading").scrollIntoView()
阅读全文
posted @ 2019-08-06 16:58 刘兵博客
阅读(2224)
评论(0)
推荐(1)
2019年7月22日
解决更新ng-cli后无法Angular项目无法支持低版本浏览器
摘要: 找到项目中的 polyfills.ts 代码 代码 将这一段import解除注释 polifills.ts代码 polifills.ts代码 重新运行项目,问题解决。
阅读全文
posted @ 2019-07-22 18:33 刘兵博客
阅读(483)
评论(0)
推荐(0)
2019年7月16日
自定义TSlint检测规则
摘要: 不检测隐式类型 "arrow-parens": [ false, "as-needed" ], // @ts-ignore 不检测下行代码 不检测any tsconfig.json添加"noImplicitAny": false, 或者 "strict": true,改为false
阅读全文
posted @ 2019-07-16 11:41 刘兵博客
阅读(466)
评论(0)
推荐(0)
2019年7月11日
js下载文件
摘要: let blob = new Blob([res], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8' }) let link = document.createElem
阅读全文
posted @ 2019-07-11 17:51 刘兵博客
阅读(135)
评论(0)
推荐(0)
2019年6月22日
Angular8中回调函数内改变数据但视图不能实时更新
摘要: 解决方法就是通过依赖注入给组件来引入一个ChangeDetectorRef,并标注组建树目录,告诉angular此处需要监测,具体方法见代码:@Component({ template: '{{num}}', changeDetection: ChangeDetectionStrategy.OnPu
阅读全文
posted @ 2019-06-22 15:20 刘兵博客
阅读(2671)
评论(0)
推荐(0)
2019年6月5日
CentOS7利用yum安装node.js
摘要: 1.下载node.js各版本 V11.x: #curl --silent --location https://rpm.nodesource.com/setup_11.x | bash - V7.x: #curl --silent --location https://rpm.nodesource.
阅读全文
posted @ 2019-06-05 10:49 刘兵博客
阅读(430)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
7
8
···
10
下一页
公告