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

battery plugin release done

上级 4bc52919
......@@ -7,7 +7,7 @@
</view>
</template>
<script>
import getBatteryInfo from "../../uni_modules/uni-getbatteryinfo";
import getBatteryInfo from "@/uni_modules/uni-getbatteryinfo";
export default {
data() {
......
## 1.0.0(2022-09-01)
实现android/web/微信小程序平台获取电量
......@@ -2,9 +2,9 @@
"id": "uni-getbatteryinfo",
"displayName": "uni-getbatteryinfo",
"version": "1.0.0",
"description": "uni-getbatteryinfo",
"description": "使用uts开发,实现在多个平台获取电量信息",
"keywords": [
"uni-getbatteryinfo"
"battery"
],
"repository": "",
"engines": {
......@@ -24,9 +24,9 @@
"qq": ""
},
"declaration": {
"ads": "",
"data": "",
"permissions": ""
"ads": "",
"data": "插件不采集任何数据",
"permissions": ""
},
"npmurl": ""
},
......@@ -35,33 +35,35 @@
"encrypt": [],
"platforms": {
"cloud": {
"tcb": "u",
"aliyun": "u"
"tcb": "y",
"aliyun": "y"
},
"client": {
"Vue": {
"vue2": "u",
"vue3": "u"
"vue2": "n",
"vue3": "y"
},
"App": {
"app-android": "u",
"app-ios": "u"
"app-android": {
"minVersion": "21"
},
"app-ios": "n"
},
"H5-mobile": {
"Safari": "u",
"Android Browser": "u",
"微信浏览器(Android)": "u",
"QQ浏览器(Android)": "u"
"Safari": "y",
"Android Browser": "y",
"微信浏览器(Android)": "y",
"QQ浏览器(Android)": "y"
},
"H5-pc": {
"Chrome": "u",
"IE": "u",
"Edge": "u",
"Firefox": "u",
"Safari": "u"
"Chrome": "y",
"IE": "y",
"Edge": "y",
"Firefox": "y",
"Safari": "y"
},
"小程序": {
"微信": "u",
"微信": "y",
"阿里": "u",
"百度": "u",
"字节跳动": "u",
......
# uts-batteryinfo
### 开发文档
[UTS 语法](https://uniapp.dcloud.net.cn/tutorial/syntax-uts.html)
[UTS 原生插件](https://uniapp.dcloud.net.cn/plugin/uts-plugin.html)
[Hello UTS](https://gitcode.net/dcloud/hello-uts/-/tree/dev)
\ No newline at end of file
# uni-getbatteryinfo
## 使用文档
```ts
// 引用插件
import getBatteryInfo from "@/uni_modules/uni-getbatteryinfo";
// 获取电量信息
getBatteryInfo({
success(res) {
console.log(res);
uni.showToast({
title: "当前电量:" + res.level + '%',
icon: 'none'
});
}
})
```
{
"minSdkVersion": "21"
}
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册