提交 cf4dee98 编写于 作者: D DCloud_LXH

feat: uni.canIUse

上级 510fecd8
import { hasOwn } from '@vue/shared'
import {
API_CAN_I_USE,
API_TYPE_CAN_I_USE,
CanIUseProtocol,
defineSyncApi,
} from '@dcloudio/uni-api'
export const canIUse = defineSyncApi<API_TYPE_CAN_I_USE>(
API_CAN_I_USE,
(schema: string) => {
if (hasOwn(uni, schema)) {
return true
}
return false
},
CanIUseProtocol
)
...@@ -7,6 +7,8 @@ export * from './file/removeSavedFile' ...@@ -7,6 +7,8 @@ export * from './file/removeSavedFile'
export * from './file/getFileInfo' export * from './file/getFileInfo'
export * from './file/openDocument' export * from './file/openDocument'
export * from './base/canIUse'
export * from './device/systemInfo' export * from './device/systemInfo'
export * from './device/compass' export * from './device/compass'
export * from './device/vibrate' export * from './device/vibrate'
......
...@@ -32,8 +32,6 @@ const SCHEMA_CSS = { ...@@ -32,8 +32,6 @@ const SCHEMA_CSS = {
'css.env': cssEnv, 'css.env': cssEnv,
'css.constant': cssConstant, 'css.constant': cssConstant,
'css.backdrop-filter': cssBackdropFilter, 'css.backdrop-filter': cssBackdropFilter,
getLaunchOptionsSync: false,
getEnterOptionsSync: false,
} }
export const canIUse = defineSyncApi<API_TYPE_CAN_I_USE>( export const canIUse = defineSyncApi<API_TYPE_CAN_I_USE>(
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册