详细问题描述
mui.js
mtabsegmented div选项卡,当上级元素有display:none 先隐藏在显示出来后会出现BUG,蓝色下滑线不会跟着动。
代码修复如下:
在 4835 行 setTranslate 方法
setTranslate: function(x, y) {
this._super(x, y);
var progressBar = this.progressBar;
if (progressBar) {
this.progressBarStyle.webkitTransform = this._getTranslateStr((-x * (this.progressBarWidth / this.wrapperWidth)), 0);
//console.log(this._getTranslateStr((-x * (this.progressBarWidth / this.wrapperWidth)), 0));
}
},
改成如下:
setTranslate: function(x, y) {
this._super(x, y);
var progressBar = this.progressBar;
if (progressBar) {
if(!this.progressBarWidth){
this.progressBarWidth = this.progressBar.offsetWidth;
}
this.progressBarStyle.webkitTransform = this._getTranslateStr((-x * (this.progressBarWidth / this.wrapperWidth)), 0);
//console.log(this._getTranslateStr((-x * (this.progressBarWidth / this.wrapperWidth)), 0));
}
}
重现步骤
[步骤]
[结果]
[期望]
运行环境
[系统版本]
[浏览器版本]
[IDE版本]
[mui版本]
附件
[代码片段]
[安装包]
联系方式
[QQ]
[电话]
0 个回复