From cd7b90a86d18417e87f2d81cf4da3679f9b93854 Mon Sep 17 00:00:00 2001 From: chenjiajian <798095202@qq.com> Date: Thu, 3 Dec 2020 23:02:03 +0800 Subject: [PATCH] =?UTF-8?q?fix(taro-h5):=20=E8=A1=A5=E5=85=A8=20taro-h5=20?= =?UTF-8?q?=E5=AF=BC=E5=87=BA=E7=9A=84=E6=95=A3=E8=A3=85=20API,=20fix=20#8?= =?UTF-8?q?189?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/taro-h5/src/taro/index.js | 72 ++++++++++++++++++++++++++++-- 1 file changed, 68 insertions(+), 4 deletions(-) diff --git a/packages/taro-h5/src/taro/index.js b/packages/taro-h5/src/taro/index.js index c823677b1faf..e392b5905890 100644 --- a/packages/taro-h5/src/taro/index.js +++ b/packages/taro-h5/src/taro/index.js @@ -11,11 +11,31 @@ const { render, interceptors, Current, - ...rest + noPromiseApis, + onAndSyncApis, + otherApis, + Link, + getCurrentInstance, + useDidShow, + useDidHide, + usePullDownRefresh, + useReachBottom, + usePageScroll, + useResize, + useShareAppMessage, + useTabItemTap, + useTitleClick, + useOptionMenuClick, + usePullIntercept, + useShareTimeline, + useAddToFavorites, + useReady, + useRouter, + options, + nextTick } = Taro const taro = { - ...rest, getEnv, ENV_TYPE, Events, @@ -29,7 +49,29 @@ const taro = { reLaunch, redirectTo, getCurrentPages, - switchTab + switchTab, + noPromiseApis, + onAndSyncApis, + otherApis, + Link, + getCurrentInstance, + useDidShow, + useDidHide, + usePullDownRefresh, + useReachBottom, + usePageScroll, + useResize, + useShareAppMessage, + useTabItemTap, + useTitleClick, + useOptionMenuClick, + usePullIntercept, + useShareTimeline, + useAddToFavorites, + useReady, + useRouter, + options, + nextTick } const initPxTransform = originalInitPxTransform.bind(taro) @@ -88,5 +130,27 @@ export { reLaunch, redirectTo, getCurrentPages, - switchTab + switchTab, + noPromiseApis, + onAndSyncApis, + otherApis, + Link, + getCurrentInstance, + useDidShow, + useDidHide, + usePullDownRefresh, + useReachBottom, + usePageScroll, + useResize, + useShareAppMessage, + useTabItemTap, + useTitleClick, + useOptionMenuClick, + usePullIntercept, + useShareTimeline, + useAddToFavorites, + useReady, + useRouter, + options, + nextTick }