提交 3bcac6e6 编写于 作者: D DCloud_LXH

feat: uni.canIUse

上级 05d98063
......@@ -3,11 +3,15 @@ import {
} from 'uni-shared'
import platformSchema from 'uni-platform/helpers/can-i-use'
import api from 'uni-service-api'
// TODO 待处理其他 API 的检测
export function canIUse (schema) {
if (hasOwn(platformSchema, schema)) {
return platformSchema[schema]
}
return true
}
if (hasOwn(api, schema)) {
return true
}
return false
}
......@@ -5,7 +5,5 @@ function cssSupports (css) {
export default {
'css.var': cssSupports('--a:0'),
'css.env': cssSupports('top:env(a)'),
'css.constant': cssSupports('top:constant(a)'),
getLaunchOptionsSync: false,
getEnterOptionsSync: false
'css.constant': cssSupports('top:constant(a)')
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册