提交 4a7bf269 编写于 作者: D DCloud_LXH

chore: tabBar

上级 3f68a4c8
......@@ -50,6 +50,9 @@ export const setTabBarItem = defineAsyncApi<API_TYPE_SET_TAB_BAR_ITEM>(
{ index, text, iconPath, selectedIconPath, pagePath, visible },
{ resolve, reject }
) => {
if (!isTabBarPage()) {
return reject('not TabBar page')
}
tabBar.setTabBarItem(index, text, iconPath, selectedIconPath, visible)
const route = pagePath && __uniRoutes.find(({ path }) => path === pagePath)
if (route) {
......@@ -74,9 +77,7 @@ export const setTabBarStyle = defineAsyncApi<API_TYPE_SET_TAB_BAR_STYLE>(
API_SET_TAB_BAR_STYLE,
(style = {}, { resolve, reject }) => {
if (!isTabBarPage()) {
return {
errMsg: 'setTabBarStyle:fail not TabBar page',
}
return reject('not TabBar page')
}
const borderStyles = {
black: 'rgba(0,0,0,0.4)',
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册