摘要:
prototype: 1、创建公共的属性和方法 2、节约内存 3、实现继承 原型链: 由__proto__组成的链条叫做原型链 prototype: 1、创建公共的属性和方法 2、节约内存 3、实现继承 原型链: 由__proto__组成的链条叫做原型链 阅读全文
posted @ 2019-09-18 21:41
前端小菜鸟吖
阅读(236)
评论(0)
推荐(0)
摘要:
store = { state:{ username:"Alley", age:20 } } this.$store.state.username this.$store.state.age {{username}} {{age}} import {mapSt... 阅读全文
posted @ 2019-09-18 21:40
前端小菜鸟吖
阅读(631)
评论(0)
推荐(0)
摘要:
- 首页用服务端渲染(特点就是有利于SEO优化) nuxt - 设置meta标签 - 标签语义化 阅读全文
posted @ 2019-09-18 21:39
前端小菜鸟吖
阅读(3753)
评论(0)
推荐(0)
摘要:
<script> //防抖 var timer = null; document.onscroll = function(){ clearTimeout(timer) timer = setTimeout(()=>{ console.log(111); },500) } //节流 var firstTime = 0; document.onscroll = function(){ var last 阅读全文
posted @ 2019-09-18 21:38
前端小菜鸟吖
阅读(322)
评论(0)
推荐(0)
摘要:
ref="child" this.$refs.child.方法 ref="child" this.$refs.child.方法 阅读全文
posted @ 2019-09-18 21:37
前端小菜鸟吖
阅读(1106)
评论(0)
推荐(0)
摘要:
class Person { constructor(){ this.name = "Alley" } show(){} } class Man extends Person{ constructor(){ super();//super指的是父级 } } var p =new Man() clas 阅读全文
posted @ 2019-09-18 21:36
前端小菜鸟吖
阅读(293)
评论(0)
推荐(0)
摘要:
1、数据流的不同: vue双向数据流 React 单向响应数据流 2、性能: vue性能内部已经做过处理了 React的性能优化主要在shouldcomponentupdate 3、语法 vue template react jsx 4、灵活 vue不太灵活 react比较灵活 。。。。。 1、数据 阅读全文
posted @ 2019-09-18 21:35
前端小菜鸟吖
阅读(890)
评论(0)
推荐(0)
摘要:
<script> /* 1、promise的使用 2、promise常用的APi .all 多个异步都执行完毕以后才会执行.then中的结果 .race 多个异步中如果有一个执行成功就不在去执行另外一个了 3、多个异步如何同步执行 4、如何执行多个ajax Promise.all promise是一个构造函数 new 每次promise执行完毕以后都会返回一个新的promise 状态:resolv 阅读全文
posted @ 2019-09-18 21:32
前端小菜鸟吖
阅读(270)
评论(0)
推荐(0)

浙公网安备 33010602011771号