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

电量获取插件引用方式 不再使用ext api 样式

上级 90bf4e50
......@@ -30,6 +30,7 @@
</template>
<script>
import gotoDemoActivity from "@/uni_modules/uts-nativepage";
import getBatteryInfo from "@/uni_modules/uni-getbatteryinfo";
export default {
......@@ -42,7 +43,7 @@
onUnload: function() {},
methods: {
testGetBatteryCapacity() {
uni.getBatteryInfo({
getBatteryInfo({
success(res) {
uni.showToast({
title: "当前电量:" + res.level + '%',
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册