阅读(1351) (31)

原生模块

2020-12-28 17:30:52 更新

模块

兼容APICloud现有所有模块及其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>