● 判断小程序的API,回调,参数,组件等是否在当前版本可用canIUse
分类:基础
是否支持H5:支持
参数
string apiName
接口名称
返回参数
boolean
当前版本是否可用
调用示例
原生
let apiName = '';
let isUse = wx.canIUse(apiName)
H5
const _data = {
apiName: 'canIUse'
}
PAMINA.call('canIUse', _data, res => {
console.log(res)
}, e => {
console.log(e)
})