Browse Source

Pull request #2108: 无JIRA任务 整理代码

Merge in VISUAL/fineui from ~GUY/fineui:master to master

* commit '45d9c7b907f52f1931f46ef53ca1bbf370949bcf':
  整理代码
es6
guy 3 years ago
parent
commit
5384aafb9e
  1. 2
      demo/app.js
  2. 6
      dist/router.js

2
demo/app.js

@ -38,7 +38,7 @@ BI.$(function () {
BI.createWidget({
type: "bi.router",
ref: function (_ref) {
BI.router = _ref._router;
BI.$router = _ref.$router;
},
element: "#wrapper",
routes: routes,

6
dist/router.js vendored

@ -3125,13 +3125,13 @@
var $router, cbs = [];
var RouterWidget = BI.inherit(BI.Widget, {
init: function () {
this._router = $router = new VueRouter({
this.$router = BI.Router.$router = $router = new VueRouter({
routes: this.options.routes
});
this._router.afterEach(function () {
this.$router.afterEach(function () {
cbs.forEach(function (cb) {cb();});
});
this._router.init(this);
this.$router.init(this);
}
});
BI.shortcut("bi.router", RouterWidget);

Loading…
Cancel
Save