摘要: class B { constructor (){ console.log('boonook'); } } let b = new B(); b.constructor B.prototype.constructor // true//// 等同于 //装饰器 阅读全文
posted @ 2018-09-26 17:50 一叶*秋 阅读(161) 评论(0) 推荐(0)
摘要: const _arr = [1, 2, 3, 4, 5, 5, 5, 5];console.log(..._arr);//解构console.log(new Set(_arr));//去重值是唯一的 /// console.log([...new Set(_arr)])//去重值是唯一的 阅读全文
posted @ 2018-09-26 17:11 一叶*秋 阅读(122) 评论(0) 推荐(0)
摘要: ///组件生命周期 挂载到html文档中//this.$watch可以下载mounted和update这种但是不能在methods中 mounted () { this.$watch('value.show',newValue=>{ if (newValue){ this.value.formDat 阅读全文
posted @ 2018-09-26 16:40 一叶*秋 阅读(2485) 评论(0) 推荐(0)
摘要: beforeCreate(创建前) created(创建后) beforeMount(载入前) mounted(载入后) beforeUpdate(更新前) updated(更新后) beforeDestroy(销毁前) destroyed(销毁后) computed:{/****实现某一属性的实时 阅读全文
posted @ 2018-09-26 16:24 一叶*秋 阅读(160) 评论(0) 推荐(0)
摘要: 1.constructor():构造函数 执行时间:组件被加载前最先调用,并且仅调用一次 作用:定义状态机变量 注意:第一个语句必须是super(props),正确定义状态机代码如下 constructor(props) { super(props); this.state = { content: 阅读全文
posted @ 2018-09-26 16:23 一叶*秋 阅读(407) 评论(0) 推荐(0)
摘要: 使用前提返回的是一个promiss对象 阅读全文
posted @ 2018-09-26 15:51 一叶*秋 阅读(355) 评论(0) 推荐(0)

博客侧边栏公告广告位招租