Browse Source

Pull request #1996: 无JIRA任务 bugfix

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

* commit '7ac0346a750841c8e3dfc8bc55d117236eba8381':
  bugfix
  update
master
guy 3 years ago
parent
commit
7fbdbf33e5
  1. 14
      src/core/wrapper/layout/adapt/adapt.table.js
  2. 17
      src/router/router2.js

14
src/core/wrapper/layout/adapt/adapt.table.js

@ -33,8 +33,18 @@ BI.TableAdaptLayout = BI.inherit(BI.Layout, {
_addElement: function (i, item) {
var o = this.options;
var td;
var width = o.columnSize[i] === "" ? "" : (o.columnSize[i] < 1 ? ((o.columnSize[i] * 100).toFixed(1) + "%") : (i === 0 ? o.hgap : 0) + o.hgap + o.lgap + o.rgap + o.columnSize[i]);
var td, width = "";
var columnSize = o.columnSize.length > 0 ? o.columnSize[i] : item.width >= 1 ? null : item.width;
if (o.columnSize.length > 0) {
if (item.width >= 1 && o.columnSize[i] >= 1 && o.columnSize[i] !== item.width) {
columnSize = null;
}
}
if (columnSize > 0) {
width = columnSize < 1 ?
((columnSize * 100).toFixed(1) + "%")
: (columnSize + (i === 0 ? o.hgap : 0) + o.hgap + o.lgap + o.rgap);
}
if (!this.hasWidget(this._getChildName(i))) {
var w = BI._lazyCreateWidget(item);
w.element.css({position: "relative", top: "0", left: "0", margin: "0px auto"});

17
src/router/router2.js

@ -3125,7 +3125,6 @@
var $router, cbs = [];
var RouterWidget = BI.inherit(BI.Widget, {
init: function () {
this._routerRoot = this;
this._router = $router = new VueRouter({
routes: this.options.routes
});
@ -3138,14 +3137,17 @@
BI.shortcut("bi.router", RouterWidget);
var RouterView = BI.inherit(BI.Widget, {
props: {
deps: 0
},
created: function () {
var self = this;
cbs.push(function () {
self.tab.setSelect($router.history.current.matched[0].path || "/");
var self = this, o = this.options;
cbs.push(this._callbackListener = function () {
self.tab.setSelect($router.history.current.matched[o.deps].path || "/");
});
},
render: function () {
var self = this;
var self = this, o = this.options;
return {
type: "bi.tab",
ref: function (_ref) {
@ -3157,9 +3159,12 @@
},
showIndex: false,
cardCreator: function (v) {
return $router.history.current.matched[0].components.default;
return $router.history.current.matched[o.deps].components.default;
}
};
},
destroyed: function () {
BI.remove(cbs, this._callbackListener);
}
});
BI.shortcut("bi.router_view", RouterView);

Loading…
Cancel
Save