mirror of
https://github.com/youzan/vant.git
synced 2025-10-19 10:07:07 +00:00
[bugfix] Tab: line width can be zero (#2081)
This commit is contained in:
@@ -256,7 +256,7 @@ export default create({
|
||||
}
|
||||
|
||||
const tab = this.$refs.tabs[this.curActive];
|
||||
const width = this.lineWidth || (tab.offsetWidth / 2);
|
||||
const width = this.isDef(this.lineWidth) ? this.lineWidth : (tab.offsetWidth / 2);
|
||||
const left = tab.offsetLeft + (tab.offsetWidth - width) / 2;
|
||||
|
||||
this.lineStyle = {
|
||||
|
Reference in New Issue
Block a user