vite-uni-dev-tool
Version:
vite-uni-dev-tool, debug, uni-app, 一处编写,到处调试
23 lines (20 loc) • 482 B
text/typescript
// #ifdef MP-WEIXIN
import useNFCMpWeiXin from './useNFCMpWeiXin';
// #endif
// #ifdef APP-PLUS
import useNFCAndroid from './useNFCAndroid';
// #endif
export default function useNFC(
listener: (data: NFC.Result) => void,
options?: {
timeout?: number;
checkConnectedDelay?: number;
},
) {
// #ifdef MP-WEIXIN
return useNFCMpWeiXin(listener, options);
// #endif
// #ifdef APP-PLUS
return useNFCAndroid(listener, options);
// #endif
}