天天看點

linux的eclipse下劃線不顯示,element的tab,下劃線不顯示的問題

頁面重新加載,tabs選中tab的下劃線不顯示,如圖所示:

linux的eclipse下劃線不顯示,element的tab,下劃線不顯示的問題

和點選後的效果,如下,是不一樣的

linux的eclipse下劃線不顯示,element的tab,下劃線不顯示的問題

computed: {

barStyle: {

get: function get() {

var _this = this;

var style = {};

var offset = 0;

var tabSize = 0;

var sizeName = ['top', 'bottom'].indexOf(this.rootTabs.tabPosition) !== -1 ? 'width' : 'height';

var sizeDir = sizeName === 'width' ? 'x' : 'y';

var firstUpperCase = function firstUpperCase(str) {

return str.toLowerCase().replace(/( |^)[a-z]/g, function (L) {

return L.toUpperCase();

});

};

this.tabs.every(function (tab, index) {

var $el = Object(util_["arrayFind"])(_this.$parent.$refs.tabs || [], function (t) {

return t.id.replace('tab-', '') === tab.paneName;

});

if (!$el) {

return false;

}

if (!tab.active) {

offset += $el['client' + firstUpperCase(sizeName)];

return true;

} else {

tabSize = $el['client' + firstUpperCase(sizeName)];

if (sizeName === 'width' && _this.tabs.length > 1) {

tabSize -= index === 0 || index === _this.tabs.length - 1 ? 20 : 40;

}

return false;

}

});

經過跟蹤element tab的代碼,發現這裡tab對應的clientWidth 為0,如果是通過點選方式,clientWidth是有值的。請問一下,是什麼原因導緻的這個問題?

export default {

data () {

return {

activeName: 'changeInformation'

}

},