正常调用可采取以下
created: function() { this.$options.methods.loadLinks(); }, methods: { loadLinks: function() { } }
但是有时候methods方法中需要用到data中数据,由于生命周期原因,可采取如下:
created: function() { this.$options.methods.loadLinks.bind(this)(""); }, methods: { loadLinks: function() { this.currentPage = 1; } }