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

修改电量插件名称为 uts--getbatteryinfo

上级 0ff5201d
......@@ -30,7 +30,7 @@
</template>
<script>
import gotoDemoActivity from "@/uni_modules/uts-nativepage";
import getBatteryInfo from "@/uni_modules/uni-getbatteryinfo";
import getBatteryInfo from "@/uni_modules/uts-getbatteryinfo";
export default {
......
{
"id": "uni-getbatteryinfo",
"displayName": "uni-getbatteryinfo",
"id": "uts-getbatteryinfo",
"displayName": "uts-getbatteryinfo",
"version": "1.2.0",
"description": "使用uts开发,实现在多个平台获取电池电量功能",
"keywords": [
......
# uni-getbatteryinfo
# uts-getbatteryinfo
## 使用文档
```ts
// 获取电量信息
uni.getBatteryInfo({
import getBatteryInfo from "@/uni_modules/uts-getbatteryinfo";
// 获取电量信息
getBatteryInfo({
success(res) {
console.log(res);
uni.showToast({
title: "当前电量:" + res.level + '%',
icon: 'none'
});
}
})
```
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册