12 2020 档案
摘要:let { default: styles } = require('./video.css') interface IComponent { templateContainer: HTMLElement; init: () => void; template: () => void; handle
阅读全文
摘要:let styles = require('./popup.css') styles = styles.default interface Icomponent { tempContainer: HTMLElement; init: () => void; template: () => void;
阅读全文
摘要:replaceImgSrc(content) console.log(replaceImgSrc(content)) function replaceImgSrc(str) { var newStr = str.replace(/<img [^>]*src=['"]([^'"]+)[^>]*>/gi
阅读全文
摘要:for (var i = 0; i < 10; i++) { setTimeout(function() { console.log(i) }, 10) } 输出10个10 for (var i = 0; i < 10; i++) { (function(i){ setTimeout(functio
阅读全文
摘要:let someValue: any = 'this is a string' // 类型断言方式一: let strLength: number = (<string>someValue).length // 类型断言方式二:【推荐使用这种方式】 let strLength: number = (
阅读全文

浙公网安备 33010602011771号