Skip to content

Commit

Permalink
同步harmony最新开发分支的代码:代码format
Browse files Browse the repository at this point in the history
  • Loading branch information
58liuyang committed Apr 3, 2024
1 parent f68bb38 commit 7ae77cb
Show file tree
Hide file tree
Showing 153 changed files with 1,975 additions and 1,976 deletions.
558 changes: 274 additions & 284 deletions packages/taro-platform-harmony-hybrid/src/api/apis/NativeApi.ts

Large diffs are not rendered by default.

42 changes: 14 additions & 28 deletions packages/taro-platform-harmony-hybrid/src/api/apis/ad/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Taro from '@tarojs/taro'

/**
* 创建激励视频广告组件
*
*
* @canNotUse createRewardedVideoAd
*/
export { createRewardedVideoAd } from '@tarojs/taro-h5'
Expand All @@ -15,7 +15,7 @@ export { createRewardedVideoAd } from '@tarojs/taro-h5'

/**
* 创建插屏广告组件
*
*
* @canUse createInterstitialAd
* @null_implementation
*/
Expand All @@ -25,44 +25,30 @@ export const createInterstitialAd = () => {

/**
* 插屏广告组件类
*
*
* @canUse InterstitialAd
* @null_implementation
*/
class InterstitialAd implements Taro.InterstitialAd {
destroy (): void {
destroy(): void {}

}

offClose (_callback: Taro.InterstitialAd.OnCloseCallback): void {

}

offError (_callback: Taro.InterstitialAd.OnErrorCallback): void {

}

offLoad (_callback: Taro.InterstitialAd.OnLoadCallback): void {
offClose(_callback: Taro.InterstitialAd.OnCloseCallback): void {}

}

onClose (_callback: Taro.InterstitialAd.OnCloseCallback): void {

}
offError(_callback: Taro.InterstitialAd.OnErrorCallback): void {}

onError (_callback: Taro.InterstitialAd.OnErrorCallback): void {
offLoad(_callback: Taro.InterstitialAd.OnLoadCallback): void {}

}
onClose(_callback: Taro.InterstitialAd.OnCloseCallback): void {}

onLoad (_callback: Taro.InterstitialAd.OnLoadCallback): void {
onError(_callback: Taro.InterstitialAd.OnErrorCallback): void {}

}
onLoad(_callback: Taro.InterstitialAd.OnLoadCallback): void {}

load (): Promise<any> {
load(): Promise<any> {
return Promise.resolve()
}
show (): Promise<any> {

show(): Promise<any> {
return Promise.resolve()
}
}
}
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
/**
* 停止人脸识别
*
*
* @canNotUse stopFaceDetect
*/
export { stopFaceDetect } from '@tarojs/taro-h5'

/**
* 初始化人脸识别
*
*
* @canNotUse initFaceDetect
*/
export { initFaceDetect } from '@tarojs/taro-h5'

/**
* 人脸识别
*
*
* @canNotUse faceDetect
*/
export { faceDetect } from '@tarojs/taro-h5'
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
/**
* 获取通用AI推理引擎版本
*
*
* @canNotUse getInferenceEnvInfo
*/
export { getInferenceEnvInfo } from '@tarojs/taro-h5'

/**
* 创建 AI 推理 Session
*
*
* @canNotUse createInferenceSession
*/
export { createInferenceSession } from '@tarojs/taro-h5'

/**
* InferenceSession类
*
*
* @canNotUse InferenceSession
*/

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
/**
* 获取通用AI推理引擎版本
*
*
* @canNotUse getInferenceEnvInfo
*/
export { getInferenceEnvInfo } from '@tarojs/taro-h5'

/**
* 创建 AI 推理 Session
*
*
* @canNotUse createInferenceSession
*/
export { createInferenceSession } from '@tarojs/taro-h5'
export { createInferenceSession } from '@tarojs/taro-h5'
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
/**
* 判断支持版本
*
*
* @canNotUse isVKSupport
*/
export { isVKSupport } from '@tarojs/taro-h5'

/**
* 创建 vision kit 会话对象
*
*
* @canNotUse createVKSession
*/
export { createVKSession } from '@tarojs/taro-h5'
Expand Down Expand Up @@ -54,4 +54,4 @@ export { createVKSession } from '@tarojs/taro-h5'

/**
* @canNotUse VKSession
*/
*/
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
/**
* 获取支付宝会员的基础信息
*
*
* @canNotUse getOpenUserInfo
*/
export { getOpenUserInfo } from '@tarojs/taro-h5'

/**
* 此接口是用于发起支付的 API
*
*
* @canNotUse tradePay
*/
export { tradePay } from '@tarojs/taro-h5'
export { tradePay } from '@tarojs/taro-h5'
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/**
* 获取用户加密模块
*
*
* @canNotUse getUserCryptoManager
*/
export { getUserCryptoManager } from '@tarojs/taro-h5'

/**
* 用户加密模块类
*
*
* @canNotUse UserCryptoManager
*/
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* 环境变量
*
*
* @canUse env
* @__variable [FRAMEWORK, TARO_ENV, USER_DATA_PATH]
*/
Expand All @@ -14,10 +14,10 @@ export const env = {

/**
* 向调试面板中打印日志。console 是一个全局对象,可以直接访问。
*
*
* @canUse console
* @__class [debug, error, group, groupEnd, info, log, warn]
*/

export * from './system'
export * from './weapp/life-cycle'
export * from './weapp/life-cycle'
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,35 @@ import Taro from '@tarojs/taro'

/**
* 程序测速上报
*
*
* @canNotUse reportPerformance
*/
export { reportPerformance } from '@tarojs/taro-h5'

/**
* 预加载下个页面的 WebView
*
*
* @canNotUse preloadWebview
*/
export { preloadWebview } from '@tarojs/taro-h5'

/**
* 预加载下个页面所需要的 Skyline 运行环境
*
*
* @canNotUse preloadSkylineView
*/
export { preloadSkylineView } from '@tarojs/taro-h5'

/**
* 为视图层预加载媒体资源文件
*
*
* @canNotUse preloadAssets
*/
export { preloadAssets } from '@tarojs/taro-h5'

/**
* 程序测速上报
*
*
* @canUse getPerformance
* @null_implementation
*/
Expand All @@ -40,13 +40,13 @@ export const getPerformance: typeof Taro.getPerformance = () => {

/**
* 获取性能数据及创建性能监听器
*
*
* @canUse Performance
* @null_implementation
*/
class Performance implements Taro.Performance {
_res = {
/** 开始时间,不同指标的具体含义会有差异 */
/** 开始时间,不同指标的具体含义会有差异 */
startTime: 0,
/** 耗时 ms。仅对于表示阶段的指标有效。 */
duration: 0,
Expand All @@ -72,9 +72,9 @@ class Performance implements Taro.Performance {
viewLayerRenderEndTime: 0,
}

createObserver (callback): Taro.PerformanceObserver {
createObserver(callback): Taro.PerformanceObserver {
if (typeof callback === 'function') {
// do nothing
// do nothing
}
const result: Taro.PerformanceEntry = {
/** 指标类型 */
Expand All @@ -84,9 +84,9 @@ class Performance implements Taro.Performance {
...this._res,
}
const disconnect = () => {}
const observe = (option: Taro.PerformanceObserver.observe.Option) => {
const observe = (option: Taro.PerformanceObserver.observe.Option) => {
if (typeof option === 'object') {
// do nothing
// do nothing
}
}
const performanceObserver: Taro.PerformanceObserver = {
Expand All @@ -97,7 +97,7 @@ class Performance implements Taro.Performance {
return performanceObserver
}

getEntries (): Taro.PerformanceEntry[] {
getEntries(): Taro.PerformanceEntry[] {
const result: Taro.PerformanceEntry = {
/** 指标类型 */
entryType: 'navigation',
Expand All @@ -108,7 +108,7 @@ class Performance implements Taro.Performance {
return [result]
}

getEntriesByName (name: string, entryType: string): Taro.PerformanceEntry[] {
getEntriesByName(name: string, entryType: string): Taro.PerformanceEntry[] {
const result: Taro.PerformanceEntry = {
/** 指标类型 */
entryType: entryType as keyof Taro.PerformanceEntry.EntryType,
Expand All @@ -119,7 +119,7 @@ class Performance implements Taro.Performance {
return [result]
}

getEntriesByType (entryType: string): Taro.PerformanceEntry[] {
getEntriesByType(entryType: string): Taro.PerformanceEntry[] {
const result: Taro.PerformanceEntry = {
/** 指标类型 */
entryType: entryType as keyof Taro.PerformanceEntry.EntryType,
Expand All @@ -130,27 +130,27 @@ class Performance implements Taro.Performance {
return [result]
}

setBufferSize (size: number): void {
setBufferSize(size: number): void {
if (typeof size === 'number') {
// do nothing
}
// do nothing
}
}
}

/**
* EntryList 对象
*
*
* @canNotUse EntryList
*/

/**
* 单条性能数据
*
*
* @canNotUse PerformanceEntry
*/

/**
* PerformanceObserver 对象,用于监听性能相关事件
*
*
* @canNotUse PerformanceObserver
*/
*/
Loading

0 comments on commit 7ae77cb

Please sign in to comment.