diff --git a/src/core/service/api/base/can-i-use.js b/src/core/service/api/base/can-i-use.js index 0189ee5ab0f61e35da33126227df4f1cb88f9557..1e434173fe986e0457a20e9de884607ee350f21f 100644 --- a/src/core/service/api/base/can-i-use.js +++ b/src/core/service/api/base/can-i-use.js @@ -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 +} diff --git a/src/platforms/h5/helpers/can-i-use.js b/src/platforms/h5/helpers/can-i-use.js index 989ef90071013534a5becddf13615280a1b58f6a..fee9e753361472835b46e9e64725c6d9b0feafc1 100644 --- a/src/platforms/h5/helpers/can-i-use.js +++ b/src/platforms/h5/helpers/can-i-use.js @@ -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)') }