4.1 Mixins 混入 1. 什么是Mixins 当多个组件内部都写了同样的方法,如何将该方法提取出来,减少代码量呢? Vue实现方式如下: // define a mixin object var myMixin = { created: function () { this.hello() }, methods: { hello: function () { console.log('hello from mixin!')