Vue-router原理:3、实现构造函数 在介绍VueRouter的类图时,我们说过 Constructor是一个构造方法,该该构造方法中会初始化options ,data,routeMap这几个属性。 constructor(options) { this.options = options; this.routeMap = {}; this.data = _Vue.observable({ current: "/", }); }