From 9243917876095350b248e59cd545c8923524e6c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E9=98=B3?= Date: Tue, 16 Apr 2024 20:09:44 +0800 Subject: [PATCH] =?UTF-8?q?switchTab=E3=80=81navigateTo=E7=AD=89=E8=B7=AF?= =?UTF-8?q?=E7=94=B1=E5=87=BD=E6=95=B0=E5=8F=AF=E4=BB=A5=E8=A2=ABhook=20?= =?UTF-8?q?=E6=94=AF=E6=8C=81requriePlugin=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../build/config/harmony-definition.json | 27 +++------------ .../src/api/apis/comments.ts | 6 ---- .../src/api/apis/index.ts | 2 +- .../src/api/apis/route/index.ts | 34 ------------------- .../src/api/apis/taro.ts | 14 ++++++-- 5 files changed, 18 insertions(+), 65 deletions(-) delete mode 100644 packages/taro-platform-harmony-hybrid/src/api/apis/route/index.ts diff --git a/packages/taro-platform-harmony-hybrid/build/config/harmony-definition.json b/packages/taro-platform-harmony-hybrid/build/config/harmony-definition.json index 671d0b834da1..5e49f1177414 100644 --- a/packages/taro-platform-harmony-hybrid/build/config/harmony-definition.json +++ b/packages/taro-platform-harmony-hybrid/build/config/harmony-definition.json @@ -1296,18 +1296,9 @@ "phoneNumber": true } }, - "navigateBack": { - "object": { - "delta": true - } - }, + "navigateBack": false, "navigateBackMiniProgram": false, - "navigateTo": { - "object": { - "url": true, - "events": true - } - }, + "navigateTo": false, "navigateToBookshelf": false, "navigateToMiniProgram": { "object": { @@ -1603,11 +1594,7 @@ } }, "queryBookshelf": false, - "reLaunch": { - "object": { - "url": true - } - }, + "reLaunch": false, "readBLECharacteristicValue": { "object": { "characteristicId": true, @@ -1615,7 +1602,7 @@ "serviceId": true } }, - "redirectTo": true, + "redirectTo": false, "removeSavedFile": { "object": { "filePath": true @@ -1967,11 +1954,7 @@ "stopWifi": true, "subscribeService": false, "subscribeVoIPVideoMembers": false, - "switchTab": { - "object": { - "url": true - } - }, + "switchTab": false, "tradePay": false, "unsubscribeMessage": false, "updateBookshelfReadTime": false, diff --git a/packages/taro-platform-harmony-hybrid/src/api/apis/comments.ts b/packages/taro-platform-harmony-hybrid/src/api/apis/comments.ts index 9cda511f937b..c43312be399d 100644 --- a/packages/taro-platform-harmony-hybrid/src/api/apis/comments.ts +++ b/packages/taro-platform-harmony-hybrid/src/api/apis/comments.ts @@ -1036,12 +1036,6 @@ * @canNotUse onLocalServiceResolveFail */ -/** - * 监听隐私接口需要用户授权事件。 - * - * @canNotUse onNeedPrivacyAuthorization - */ - /** * 在最近的八次网络请求中, 出现下列三个现象之一则判定弱网。 * - 出现三次以上连接超时 diff --git a/packages/taro-platform-harmony-hybrid/src/api/apis/index.ts b/packages/taro-platform-harmony-hybrid/src/api/apis/index.ts index db92527b4fb9..673b616c10a3 100644 --- a/packages/taro-platform-harmony-hybrid/src/api/apis/index.ts +++ b/packages/taro-platform-harmony-hybrid/src/api/apis/index.ts @@ -20,7 +20,7 @@ export * from './network' export * from './open-api' export * from './payment' export * from './qq' -export * from './route' +// export * from './route' export * from './share' export * from './storage' export * from './swan' diff --git a/packages/taro-platform-harmony-hybrid/src/api/apis/route/index.ts b/packages/taro-platform-harmony-hybrid/src/api/apis/route/index.ts deleted file mode 100644 index ac02367fd795..000000000000 --- a/packages/taro-platform-harmony-hybrid/src/api/apis/route/index.ts +++ /dev/null @@ -1,34 +0,0 @@ -/** - * @canUse navigateBack - * @__object [delta] - */ - -/** - * @canUse navigateTo - * @__object [url, events] - */ - -/** - * @canUse redirectTo - * @object [url] - */ - -/** - * @canUse reLaunch - * @__object [url] - */ - -/** - * @canUse switchTab - * @__object [url] - */ - -export { navigateBack, navigateTo, redirectTo, reLaunch, switchTab } from '@tarojs/router' - -// FIXME 方法导出类型未对齐,后续修复 - -/** - * 页面间事件通信通道 - * - * @canNotUse EventChannel - */ diff --git a/packages/taro-platform-harmony-hybrid/src/api/apis/taro.ts b/packages/taro-platform-harmony-hybrid/src/api/apis/taro.ts index 146041e50923..51621da68bab 100644 --- a/packages/taro-platform-harmony-hybrid/src/api/apis/taro.ts +++ b/packages/taro-platform-harmony-hybrid/src/api/apis/taro.ts @@ -16,7 +16,7 @@ import { switchTab, } from './index' import native from './NativeApi' -import { permanentlyNotSupport } from './utils' +// import { permanentlyNotSupport } from './utils' // @ts-ignore window.base64ToArrayBuffer = (base64: string) => toByteArray(base64).buffer @@ -105,7 +105,15 @@ const taro: typeof Taro = { useUnload } -export const requirePlugin = permanentlyNotSupport('requirePlugin') +// export const requirePlugin = permanentlyNotSupport('requirePlugin') +const requirePlugin = () => { + return { + world: '', + hello: function () { + + } + } +} function getConfig (): Record { if (this?.pxTransformConfig) return this.pxTransformConfig @@ -348,6 +356,7 @@ function loadChooseLocationStyle () { loadChooseLocationStyle() +taro.requirePlugin = requirePlugin taro.getApp = getApp taro.pxTransform = pxTransform taro.initPxTransform = initPxTransform @@ -377,6 +386,7 @@ export { options, preload, pxTransform, + requirePlugin, useAddToFavorites, useDidHide, useDidShow,