-
+
-
- {{ item.badge }}
+ {{ item.badge }}
-
{{ item.text }}
-
- {{ item.badge }}
+
+ {{ item.badge }}
@@ -53,125 +51,130 @@
+
diff --git a/src/platforms/h5/components/index.js b/src/platforms/h5/components/index.js
index 7e140eb6c12fde92f9cd698cb9257d3ca12818ea..59e8677adfb161e4fb6b7945f5f935e7e1bb7208 100644
--- a/src/platforms/h5/components/index.js
+++ b/src/platforms/h5/components/index.js
@@ -4,6 +4,7 @@ import App from './app'
import Page from './page'
import AsyncError from './async-error'
import AsyncLoading from './async-loading'
+import CustomTabBar from './app/customTabBar'
import SystemRouteComponents from 'uni-h5-system-routes'
@@ -11,6 +12,7 @@ Vue.component(App.name, App)
Vue.component(Page.name, Page)
Vue.component(AsyncError.name, AsyncError)
Vue.component(AsyncLoading.name, AsyncLoading)
+Vue.component(CustomTabBar.name, CustomTabBar)
Object.keys(SystemRouteComponents).forEach(name => {
const Component = SystemRouteComponents[name]
diff --git a/src/platforms/h5/service/api/ui/tab-bar.js b/src/platforms/h5/service/api/ui/tab-bar.js
index 671a430a60928c8fc2de72583c55f69d003a9dab..7118afd8ea238d80f95c41da2cb7d1d314b05e64 100644
--- a/src/platforms/h5/service/api/ui/tab-bar.js
+++ b/src/platforms/h5/service/api/ui/tab-bar.js
@@ -30,7 +30,7 @@ function setTabBar (type, args = {}) {
const {
index
} = args
- const tabBar = app.$children[0].tabBar
+ const tabBar = __uniConfig.tabBar
if (index >= __uniConfig.tabBar.list.length) {
return {
errMsg: `${type}:fail tabbar item not found`