Skip to content

Commit

Permalink
fix(x-ios): Tab 页面与安卓一致不调用 show 方法
Browse files Browse the repository at this point in the history
  • Loading branch information
zhetengbiji committed May 6, 2024
1 parent d090049 commit 2551da5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
5 changes: 3 additions & 2 deletions packages/uni-app-plus/dist/uni.x.runtime.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -1381,12 +1381,13 @@ function findPageRoute(path) {
return __uniRoutes.find((route) => route.path === path);
}
function createTab(path, query, callback) {
showWebview(registerPage({
registerPage({
url: path,
path,
query,
openType: "switchTab"
}), "none", 0, callback);
});
callback === null || callback === void 0 || callback();
var page = getCurrentPage();
tabBar0.appendItem(page.$page.id.toString());
return page;
Expand Down
9 changes: 2 additions & 7 deletions packages/uni-app-plus/src/x/framework/app/tabBar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import { getAllPages } from '../../../service/framework/page/getCurrentPages'
import type { ComponentPublicInstance } from 'vue'
import { ON_HIDE, ON_SHOW } from '@dcloudio/uni-shared'
import { registerPage } from '../page'
import { showWebview } from '../../api/route/webview'

type Page = ComponentPublicInstance

Expand Down Expand Up @@ -168,12 +167,8 @@ function createTab(
query: Record<string, string>,
callback?: () => void
): Page {
showWebview(
registerPage({ url: path, path, query, openType: 'switchTab' }),
'none',
0,
callback
)
registerPage({ url: path, path, query, openType: 'switchTab' })
callback?.()
const page = getCurrentPage() as Page
tabBar0!.appendItem(page!.$page.id.toString())
return page
Expand Down

0 comments on commit 2551da5

Please sign in to comment.