提交 29fe376f 编写于 作者: D DCloud_LXH

chore: swiper、tab-bar

上级 18ec9048
......@@ -487,7 +487,6 @@ export default {
}
},
_handleTrackStart () {
if (!this.items.length) return
this._cancelSchedule()
this._contentTrackViewport = this._viewportPosition
this._contentTrackSpeed = 0
......@@ -495,7 +494,6 @@ export default {
this._cancelViewportAnimation()
},
_handleTrackMove (data) {
if (!this.items.length) return
var self = this
var contentTrackT = this._contentTrackT
this._contentTrackT = Date.now()
......@@ -530,7 +528,6 @@ export default {
}
},
_handleTrackEnd (isCancel) {
if (!this.items.length) return
this.userTracking = false
var t = this._contentTrackSpeed / Math.abs(this._contentTrackSpeed)
var n = 0
......@@ -547,7 +544,7 @@ export default {
}
},
_handleContentTrack (e) {
if (this.disableTouch) {
if (this.disableTouch || !this.items.length) {
return
}
if (!this._invalid) {
......
......@@ -23,6 +23,11 @@ export function setTabBarItem ({
pagePath,
visible
}) {
if (!isTabBarPage()) {
return {
errMsg: 'setTabBarItem:fail not TabBar page'
}
}
tabBar.setTabBarItem(index, text, iconPath, selectedIconPath, visible)
const route = pagePath && __uniRoutes.find(({ path }) => path === pagePath)
if (route) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册