咏竹莉
where there is a will,there is a way
上一页 1 ··· 4 5 6 7 8 9 10 11 12 13 下一页
摘要: 定义个一个函数,把继承的动作封装起来, 这个inherits() 函数可以复用: function inherits(Child, Parent){ var F = function(){}; F.prototype = Parent.prototype; Child.prototype = new 阅读全文
posted @ 2021-06-30 14:19 咏竹莉 阅读(54) 评论(0) 推荐(0)
摘要: // 原型对象 var Student = { name: 'Robot', height: 1.2, run: function(){ console.log(this.name + ' is running') } }; function createStudent(name){ // 基于St 阅读全文
posted @ 2021-06-29 14:42 咏竹莉 阅读(56) 评论(0) 推荐(0)
摘要: json 是一种数据交换格式。 在JSON中,一共有几种数据类型: number: 和js的 number完全一致; boolean: 就是js中的true 或 false; string: 就是js的string; null: 就是js的null array: 就是js的Array 表示方式--[ 阅读全文
posted @ 2021-06-28 17:14 咏竹莉 阅读(108) 评论(0) 推荐(0)
摘要: data () { return { resizeTimer: null, myChart1: null, myChart2: null, myChart3: null, myChart4: null } }, methods: { // 综合得分 雷达图 getScoreChart () { le 阅读全文
posted @ 2021-06-25 17:42 咏竹莉 阅读(342) 评论(0) 推荐(0)
摘要: Mac电脑上执行‘ npm install –global vue-cli’命令,报错 原因是无权限,要使用管理员权限 sudo。 解决: sudo npm install -g react-native-cli 阅读全文
posted @ 2021-06-25 17:36 咏竹莉 阅读(326) 评论(0) 推荐(0)
摘要: 1. 标准时间(即Date() 对象) Mon Sep 16 2019 00:00:00 GMT+0800 (中国标准时间)var now = new Date();now; // Mon Sep 16 2019 00:00:00 GMT+0800 (中国标准时间) 标准时间转时间戳,用getTim 阅读全文
posted @ 2021-06-25 17:31 咏竹莉 阅读(631) 评论(0) 推荐(0)
摘要: typeof 123; // 'number' typeof NaN; // 'number' typeof 'str'; // 'string' typeof true; // 'boolean' typeof undefined; // 'undefined' typeof Math.abs; 阅读全文
posted @ 2021-06-25 10:19 咏竹莉 阅读(92) 评论(0) 推荐(0)
摘要: var Tools = {}; Tools.removeNullOrUndefined = function (obj) { //typeof 返回的是字符串,有六种可能:"number"、"string"、"boolean"、"object"、"function"、"undefined" if ( 阅读全文
posted @ 2021-06-23 17:17 咏竹莉 阅读(243) 评论(0) 推荐(0)
摘要: 变量提升 js的函数定义有个特点,它会先扫描整个函数体的语句,把所有申明的变量"提升"到函数顶部: function log(){ var x = 'hello,' + y; console.log(x); // hello, undefined var y = 'world' } log(); 虽 阅读全文
posted @ 2021-06-23 15:18 咏竹莉 阅读(70) 评论(0) 推荐(0)
摘要: x=> x*x 上面的箭头函数相当于: function (x) { return x * x } 箭头函数相当于匿名函数,并且简化了函数定义,箭头函数有两种格式,一种上面的,只包含一个表达式,连{...} 和 return 都省略掉了,还有一种包含多条语句,这时候不能省略{...} 和 retur 阅读全文
posted @ 2021-06-21 10:39 咏竹莉 阅读(210) 评论(0) 推荐(0)
上一页 1 ··· 4 5 6 7 8 9 10 11 12 13 下一页