上一页 1 ··· 27 28 29 30 31 32 33 34 35 ··· 87 下一页
摘要: 1. type可以声明 基本类型,联合类型,元组 的别名,interface不行 // 基本类型别名 type Name = string // 联合类型 interface Dog { wong(); } interface Cat { miao(); } type Pet = Dog | Cat 阅读全文
posted @ 2020-05-22 14:01 全玉 阅读(8610) 评论(0) 推荐(0) 编辑
摘要: 1. 声明合并 ts声明的重名的类或命名空间,会进行合并 类合并 interface Box { height: number; width: number; } interface Box { scale: number; } let box: Box = {height: 5, width: 6 阅读全文
posted @ 2020-05-22 11:18 全玉 阅读(162) 评论(0) 推荐(0) 编辑
摘要: 1. 基础类型 有12种 布尔值 let isDone: boolean = false; 数字 let dec: number = 6; 字符串 let name : string = 'bob'; 数组 let list: number[] = [1, 2, 3]; 元组 let x : [st 阅读全文
posted @ 2020-05-21 20:52 全玉 阅读(266) 评论(0) 推荐(0) 编辑
摘要: 1. JavaScript高级程序设计 (红宝书) 2. JavaScript权威指南 (犀牛书) 阅读全文
posted @ 2020-05-21 16:31 全玉 阅读(146) 评论(0) 推荐(0) 编辑
摘要: 1. 选择集 d3.select() //选择第一个 d3.selectAll() //选择全部 2. 绑定数据 datnum() //绑定一个数据到选择集上 data() //绑定一个数组到选择集 3. 输出数据 var body = d3.select("body"); var p = body 阅读全文
posted @ 2020-05-21 16:20 全玉 阅读(197) 评论(0) 推荐(0) 编辑
摘要: Array.map的参数 Array.map((item,index,arr) => {}, thisValue) map的callback参数分别是数据项,索引,数组本身,thisValue可以指定callback中的this值 parseInt的参数 parseInt(str, radix) 该 阅读全文
posted @ 2020-05-21 14:56 全玉 阅读(546) 评论(0) 推荐(0) 编辑
摘要: 首先明确,首屏和白屏的时间计算,没有明确的API可以得到。 白屏 = 开始显示body的时间 - 开始请求的时间 首屏 = 首屏内容渲染结束的时间 - 开始请求的时间 具体计算方法如下: 1. 白屏 支持performance api,开始请求的时间 performance.timing.navig 阅读全文
posted @ 2020-05-21 14:34 全玉 阅读(1335) 评论(0) 推荐(0) 编辑
摘要: 两种可行的办法 1. 多套不同主题的css 用less/sass变量代替颜色值,用编译工具生成主题文件 theme-dark.csstheme-green.css 切换文件使用,不要append link,直接修改原有theme的link的href,就行了 //根据不同的企业用户加载不同的css d 阅读全文
posted @ 2020-05-21 10:51 全玉 阅读(515) 评论(0) 推荐(0) 编辑
摘要: 文件上传总结 文件上传的方式有哪些(Flash已经淘汰,不再提及) 目前常用的只有2种 1. form上传 就是使用 inputFile 控件,form的enctype必须是 multipart/form-data <form method="post" action="http://uploadU 阅读全文
posted @ 2020-05-20 23:42 全玉 阅读(423) 评论(0) 推荐(0) 编辑
摘要: 代码一: /*! Math.uuid.js (v1.4) http://www.broofa.com mailto:robert@broofa.com Copyright (c) 2010 Robert Kieffer Dual licensed under the MIT and GPL lice 阅读全文
posted @ 2020-05-20 17:17 全玉 阅读(680) 评论(0) 推荐(1) 编辑
上一页 1 ··· 27 28 29 30 31 32 33 34 35 ··· 87 下一页