on(event: string, handler: function)

监听 Model 的事件。一般用于让插件在 VueModello 的事件中执行指定方法。

myModelloPlugin.js

export default {
  install: function (modello, option) {
    modello.on('mixed', function (eachModule) {
      eachModule(function (module) {
        // do something for module
      })
    })
  }
}

results matching ""

    No results matching ""