gnomes-open . 打开目录
所有语言 不可能提供深拷贝api
map不会操纵原函数 它会把原函数浅拷贝出来给你
问到深拷贝 JSON.parse(JSON.stringify(fn))
JSON序列化反序列化
原型链 把共有的属性放到构造函数的原型上面去
class Point{
construct(x,y){
}
toString(){
}
}
//class 函数直接没有,
//添加 方法
Object.assign(Point.prototype,{
toValue(){},
say(){}
})
Object.keys(obj) //obj的可遍历属性
Object.getOwnPropertyNames(obj) //obj不可遍历属性
Object.assign({},{},{}) //用于合并对象 把后面的对象合并到第一个对象中
强制指定this .bind(this)
用户数据 ui 数据
this.view.data.name -> this.view.name
字符串 -0 变数字s
Vue
dom 必须 放到一个div里面
this.view.$el 获取 绑定 dom
不在需要 手动更新 渲染dom this.view.render(this.model.data)
不需要 controller.init({view,model})
http://jsbin.com/durewolobe/1/edit?js
组件已经加载到页面中了
Vue created
react componentDidMount
网友评论