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

feat: uni.canIUse

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