摘要:
img添加属性 crossorigin="anonymous" <img :src="bgurl" alt="" class="width100b" crossorigin="anonymous"/> <img :src="bgurl" alt="" class="width100b" crosso 阅读全文
摘要:
你可以替换你的项目根目录中的下列文件来指定环境变量: .env # 在所有的环境中被载入 .env.local # 在所有的环境中被载入,但会被 git 忽略 .env.[mode] # 只在指定的模式中被载入 .env.[mode].local # 只在指定的模式中被载入,但会被 git 忽略 模 阅读全文
摘要:
打开 angular.json -> projects -> 项目名 -> architect -> build -> configurations -> production。复制该配置以设置更多的配置项 更改对应的配置文件路径 "fileReplacements": [ { "replace": 阅读全文
摘要:
第一步: 执行命令: cnpm i lrz -S 第二步: 在main.js中引入: import lrz from 'lrz' 第三步: 使用函数: 返回结果是一个promise对象。 lrz( file, { width : 300 //quality: 0.8 //自定义使用压缩方式 }) . 阅读全文
摘要:
document.querySelector(".loading").scrollIntoView() 阅读全文
摘要:
找到项目中的 polyfills.ts 代码 代码 将这一段import解除注释 polifills.ts代码 polifills.ts代码 重新运行项目,问题解决。 阅读全文
摘要:
不检测隐式类型 "arrow-parens": [ false, "as-needed" ], // @ts-ignore 不检测下行代码 不检测any tsconfig.json添加"noImplicitAny": false, 或者 "strict": true,改为false 阅读全文
摘要:
let blob = new Blob([res], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8' }) let link = document.createElem 阅读全文
摘要:
解决方法就是通过依赖注入给组件来引入一个ChangeDetectorRef,并标注组建树目录,告诉angular此处需要监测,具体方法见代码:@Component({ template: '{{num}}', changeDetection: ChangeDetectionStrategy.OnPu 阅读全文
摘要:
1.下载node.js各版本 V11.x: #curl --silent --location https://rpm.nodesource.com/setup_11.x | bash - V7.x: #curl --silent --location https://rpm.nodesource. 阅读全文