12 2020 档案

摘要:let { default: styles } = require('./video.css') interface IComponent { templateContainer: HTMLElement; init: () => void; template: () => void; handle 阅读全文
posted @ 2020-12-13 09:27 ladybug7 阅读(1328) 评论(0) 推荐(0)
摘要:let styles = require('./popup.css') styles = styles.default interface Icomponent { tempContainer: HTMLElement; init: () => void; template: () => void; 阅读全文
posted @ 2020-12-13 09:25 ladybug7 阅读(374) 评论(0) 推荐(0)
摘要:replaceImgSrc(content) console.log(replaceImgSrc(content)) function replaceImgSrc(str) { var newStr = str.replace(/<img [^>]*src=['"]([^'"]+)[^>]*>/gi 阅读全文
posted @ 2020-12-11 16:43 ladybug7 阅读(255) 评论(0) 推荐(0)
摘要:。。。 阅读全文
posted @ 2020-12-04 22:39 ladybug7 阅读(55) 评论(0) 推荐(0)
摘要: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 阅读全文
posted @ 2020-12-04 22:25 ladybug7 阅读(77) 评论(0) 推荐(0)
摘要:let someValue: any = 'this is a string' // 类型断言方式一: let strLength: number = (<string>someValue).length // 类型断言方式二:【推荐使用这种方式】 let strLength: number = ( 阅读全文
posted @ 2020-12-04 22:06 ladybug7 阅读(187) 评论(0) 推荐(0)