提交 13d417f8 编写于 作者: 杜庆泉's avatar 杜庆泉

获取电量插件 调整声明类型

上级 9e98946c
......@@ -60,12 +60,12 @@ export type GetBatteryInfoResult = {
/**
* 获取电量信息
* @param {GetBatteryInfoOptions} options
*
*
*
* @tutorial https://uniapp.dcloud.net.cn/api/system/batteryInfo.html
* @platforms APP-IOS = ^9.0,APP-ANDROID = ^22
* @since 3.6.11
*
*
* @assert () => success({errCode: 0, errSubject: "uni-getBatteryInfo", errMsg: "getBatteryInfo:ok", level: 60, isCharging: false })
* @assert () => fail({errCode: 1001, errSubject: "uni-getBatteryInfo", errMsg: "getBatteryInfo:fail getAppContext is null" })
*/
......@@ -79,7 +79,7 @@ interface Uni {
/**
* 获取电池电量信息
* @description 获取电池电量信息
* @param {GetBatteryInfoOptions} options
* @param {GetBatteryInfoOptions} options
* @example
* ```typescript
* uni.getBatteryInfo({
......@@ -107,7 +107,7 @@ interface Uni {
* @uniVueVersion 2,3 //支持的vue版本
*
*/
getBatteryInfo : GetBatteryInfo,
getBatteryInfo (options : GetBatteryInfoOptions) : void,
/**
* 同步获取电池电量信息
* @description 获取电池电量信息
......@@ -134,6 +134,6 @@ interface Uni {
* @uniVueVersion 2,3 //支持的vue版本
*
*/
getBatteryInfoSync: GetBatteryInfoSync
getBatteryInfoSync() : GetBatteryInfoResult
}
\ No newline at end of file
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册