提交 508fe0da 编写于 作者: Q qiang

Revert "fix(x-ios): Tab 页面与安卓一致不调用 show 方法"

This reverts commit 2551da5c.
上级 50217365
......@@ -1381,13 +1381,12 @@ function findPageRoute(path) {
return __uniRoutes.find((route) => route.path === path);
}
function createTab(path, query, callback) {
registerPage({
showWebview(registerPage({
url: path,
path,
query,
openType: "switchTab"
});
callback === null || callback === void 0 || callback();
}), "none", 0, callback);
var page = getCurrentPage();
tabBar0.appendItem(page.$page.id.toString());
return page;
......
......@@ -7,6 +7,7 @@ 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
......@@ -167,8 +168,12 @@ function createTab(
query: Record<string, string>,
callback?: () => void
): Page {
registerPage({ url: path, path, query, openType: 'switchTab' })
callback?.()
showWebview(
registerPage({ url: path, path, query, openType: 'switchTab' }),
'none',
0,
callback
)
const page = getCurrentPage() as Page
tabBar0!.appendItem(page!.$page.id.toString())
return page
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册