Version: 1.3.42

Taro.canIUse(String)

使用方式同 wx.canIUse

示例代码

import Taro from '@tarojs/taro'
Taro.canIUse('openBluetoothAdapter')
Taro.canIUse('getSystemInfoSync.return.screenWidth')
Taro.canIUse('getSystemInfo.success.screenWidth')
Taro.canIUse('showToast.object.image')
Taro.canIUse('onCompassChange.callback.direction')
Taro.canIUse('request.object.method.GET')
Taro.canIUse('live-player')
Taro.canIUse('text.selectable')
Taro.canIUse('button.open-type.contact')

API支持度

API微信小程序H5React Native
Taro.canIUse✔️