上一页 1 2 3 4 5 6 7 8 ··· 10 下一页
摘要: img添加属性 crossorigin="anonymous" <img :src="bgurl" alt="" class="width100b" crossorigin="anonymous"/> <img :src="bgurl" alt="" class="width100b" crosso 阅读全文
posted @ 2019-08-29 09:49 刘兵博客 阅读(12389) 评论(0) 推荐(0) 编辑
摘要: 你可以替换你的项目根目录中的下列文件来指定环境变量: .env # 在所有的环境中被载入 .env.local # 在所有的环境中被载入,但会被 git 忽略 .env.[mode] # 只在指定的模式中被载入 .env.[mode].local # 只在指定的模式中被载入,但会被 git 忽略 模 阅读全文
posted @ 2019-08-13 17:52 刘兵博客 阅读(4377) 评论(0) 推荐(0) 编辑
摘要: 打开 angular.json -> projects -> 项目名 -> architect -> build -> configurations -> production。复制该配置以设置更多的配置项 更改对应的配置文件路径 "fileReplacements": [ { "replace": 阅读全文
posted @ 2019-08-12 19:18 刘兵博客 阅读(391) 评论(0) 推荐(0) 编辑
摘要: 第一步: 执行命令: cnpm i lrz -S 第二步: 在main.js中引入: import lrz from 'lrz' 第三步: 使用函数: 返回结果是一个promise对象。 lrz( file, { width : 300 //quality: 0.8 //自定义使用压缩方式 }) . 阅读全文
posted @ 2019-08-09 14:57 刘兵博客 阅读(211) 评论(0) 推荐(0) 编辑
摘要: document.querySelector(".loading").scrollIntoView() 阅读全文
posted @ 2019-08-06 16:58 刘兵博客 阅读(2207) 评论(0) 推荐(1) 编辑
摘要: 找到项目中的 polyfills.ts 代码 代码 将这一段import解除注释 polifills.ts代码 polifills.ts代码 重新运行项目,问题解决。 阅读全文
posted @ 2019-07-22 18:33 刘兵博客 阅读(461) 评论(0) 推荐(0) 编辑
摘要: 不检测隐式类型 "arrow-parens": [ false, "as-needed" ], // @ts-ignore 不检测下行代码 不检测any tsconfig.json添加"noImplicitAny": false, 或者 "strict": true,改为false 阅读全文
posted @ 2019-07-16 11:41 刘兵博客 阅读(447) 评论(0) 推荐(0) 编辑
摘要: 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 刘兵博客 阅读(130) 评论(0) 推荐(0) 编辑
摘要: 解决方法就是通过依赖注入给组件来引入一个ChangeDetectorRef,并标注组建树目录,告诉angular此处需要监测,具体方法见代码:@Component({ template: '{{num}}', changeDetection: ChangeDetectionStrategy.OnPu 阅读全文
posted @ 2019-06-22 15:20 刘兵博客 阅读(2632) 评论(0) 推荐(0) 编辑
摘要: 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 刘兵博客 阅读(418) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 10 下一页