diff --git a/dist/example/navbar/navbar.js b/dist/example/navbar/navbar.js index b7380065..f7cd2dfa 100644 --- a/dist/example/navbar/navbar.js +++ b/dist/example/navbar/navbar.js @@ -12,7 +12,7 @@ Page({ wx.getSystemInfo({ success: function(res) { that.setData({ - sliderLeft: (res.windowWidth / that.data.tabs.length - sliderWidth) / 2, + sliderLeft: (res.windowWidth / that.data.tabs.length - 100) / 2, sliderOffset: res.windowWidth / that.data.tabs.length * that.data.activeIndex }); } @@ -24,4 +24,4 @@ Page({ activeIndex: e.currentTarget.id }); } -}); \ No newline at end of file +}); diff --git a/src/example/navbar/navbar.js b/src/example/navbar/navbar.js index b7380065..f7cd2dfa 100644 --- a/src/example/navbar/navbar.js +++ b/src/example/navbar/navbar.js @@ -12,7 +12,7 @@ Page({ wx.getSystemInfo({ success: function(res) { that.setData({ - sliderLeft: (res.windowWidth / that.data.tabs.length - sliderWidth) / 2, + sliderLeft: (res.windowWidth / that.data.tabs.length - 100) / 2, sliderOffset: res.windowWidth / that.data.tabs.length * that.data.activeIndex }); } @@ -24,4 +24,4 @@ Page({ activeIndex: e.currentTarget.id }); } -}); \ No newline at end of file +});