模塊
兼容APICloud現(xiàn)有所有模塊及其api。參考API模塊Store
模塊使用示例:
<template>
<view class='header'>
<text>{this.data.title}</text>
</view>
</template>
<script>
export default {
name: 'ApiTest',
apiready(){
var mam = api.require('mam');
mam.checkUpdate(function(ret, err){
if (ret) {
api.toast({msg: '成功'});
} else {
api.toast({msg: '失敗'});
}
});
},
data(){
return {
title: 'Hello APP'
}
}
}
</script>
<style>
.header{
height: 45px;
}
</style>
更多建議: