交互式爱情
在VUE的mounted方法里面,如果构造一个函数,如何能获得指向那个函数的this?像下面这段这样写的话,zoom()里面的this指向的是vue组件吗?mounted() { let scroll = function(param) { this.obj = param; }; scroll.prototype = { zoom: function() { this.obj.onmousewheel = this.move; } }; let obj = document.getElementById("img"); let s = new scroll(obj); s.zoom();},