可参考官方文档:https://developer.huawei.com/consumer/cn/doc/harmonyos-references-V5/js-apis-syscap-V5\#caniuse可根据系统能力来判断是否可以使用某接口,示例代码:const issetWindowSystemBarEnableAvailable = canIUse('SystemCapability.Window.SessionManager'); if(issetWindowSystemBarEnableAvailable){ console.log("can") }
可参考官方文档:https://developer.huawei.com/consumer/cn/doc/harmonyos-references-V5/js-apis-syscap-V5\#caniuse
可根据系统能力来判断是否可以使用某接口,示例代码: