时间:2020.9.04 1.vue的声明周期 以及每个周期完成的事件 2.vue如何获取dom节点 3.vue的v-if 与 v-show的控制原理 4.vue数据双向绑定的原理 中的set方法是如何实现的 5.冒泡排序(手写算法) 6.冒泡排序的时间复杂度?O(n^2) 空间复杂度 7.commit到本地仓库如何退回? 找到之前提交的git commit的id git log 找到想要撤销的id 2、git reset –hard id 完成撤销,同时将代码恢复到前一commit_id 对应的版本 3、git reset id 完成Commit命令的撤销,但是不对代码修改进行撤销,可以直接通过git commit 重新提交对本地代码的修改 8.闭包的使用场景 9.深浅拷贝 手写一个深拷贝 10.数据处理 代码划分 11.es6 import 和export 12.webpack有了解吗 input和output有了解吗 13.说一下项目中的vuex的使用 14.说一下对代码模块的一个划分 15.const x = ‘abc’; const y = new String(‘abc’)的区别 16.类的继承 手写一个类的继承实现如下 student继承person:
Person.name//属性 Person.getName() Studen.school//属性 Student.study() const s = new Student('AA', 'BB'); //第一个参数对应school 第二个参数对应的是name s.greet();你是怎么知道 Student(‘AA’, ‘BB’);俩个参数 谁对应 17.会后台语言吗 说一下多态 18.filter 对数据处理 还有什么其他方法对数据进行处理 19.知道set吗 怎么使用 20.怎么区分 对象和数组 instanceof返回的是什么
window.name = 'outer'; function A() { console.log(age); var age = 12; this.name = 'inner'; console.log(this.name); console.log(this.age); } A.prototype.getName = function() { console.log(this.name); }; var a = new A(); var b = a.getName; b();