上一页 1 2 3 4 5 6 7 8 9 ··· 16 下一页
摘要: let { default: styles } = require('./video.css') interface IComponent { templateContainer: HTMLElement; init: () => void; template: () => void; handle 阅读全文
posted @ 2020-12-13 09:27 ladybug7 阅读(1151) 评论(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 阅读(316) 评论(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 阅读(243) 评论(0) 推荐(0) 编辑
摘要: 。。。 阅读全文
posted @ 2020-12-04 22:39 ladybug7 阅读(48) 评论(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 阅读(64) 评论(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 阅读(175) 评论(0) 推荐(0) 编辑
摘要: 1.父组件中给子组件定义一个ref. 然后通过ref 访问子组件的属性和方法 2.用事件监听的方式 注意: 新版本的vue中 用mitt这个插件 阅读全文
posted @ 2020-10-19 00:31 ladybug7 阅读(321) 评论(0) 推荐(0) 编辑
摘要: https://cn.vuejs.org/v2/guide/components-props.html#%E7%A6%81%E7%94%A8-Attribute-%E7%BB%A7%E6%89%BF 阅读全文
posted @ 2020-10-14 20:52 ladybug7 阅读(219) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2020-08-12 17:04 ladybug7 阅读(132) 评论(0) 推荐(0) 编辑
摘要: <html> <head> <script language="JavaScript" > function onlyNumber(obj){ //得到第一个字符是否为负号 var t = obj.value.charAt(0); //先把非数字的都替换掉,除了数字和. obj.value = ob 阅读全文
posted @ 2020-07-22 11:44 ladybug7 阅读(2185) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 ··· 16 下一页