fix(uni-app): 🐛 安装类型依赖
This commit is contained in:
@@ -83,6 +83,7 @@
|
||||
"test": "vitest run"
|
||||
},
|
||||
"dependencies": {
|
||||
"@jonny1994/qqmap-wx-jssdk": "^1.4.0",
|
||||
"@r-utils/common": "workspace:^",
|
||||
"chroma-js": "catalog:",
|
||||
"lodash-es": "catalog:",
|
||||
|
||||
+42
@@ -1,3 +1,45 @@
|
||||
declare namespace WechatMiniprogram {
|
||||
/** 微信小程序 NFC 适配器 */
|
||||
interface NFCAdapter {
|
||||
/** 开始监听 NFC 标签发现事件 */
|
||||
startDiscovery(options?: {
|
||||
/** 启动成功回调 */
|
||||
success?: (res: NFCError) => void;
|
||||
/** 启动失败回调 */
|
||||
fail?: (res: NFCError) => void;
|
||||
}): void;
|
||||
/** 停止监听 NFC 标签发现事件 */
|
||||
stopDiscovery(options?: {
|
||||
/** 停止成功回调 */
|
||||
success?: (res: NFCError) => void;
|
||||
/** 停止失败回调 */
|
||||
fail?: (res: NFCError) => void;
|
||||
}): void;
|
||||
/** 注册 NFC 标签发现回调 */
|
||||
onDiscovered(callback: (res: OnDiscoveredCallbackResult) => void): void;
|
||||
/** 取消注册 NFC 标签发现回调 */
|
||||
offDiscovered(callback?: (res: OnDiscoveredCallbackResult) => void): void;
|
||||
}
|
||||
|
||||
/** 微信小程序 NFC 操作结果 */
|
||||
interface NFCError {
|
||||
/** 错误码 */
|
||||
errCode?: number;
|
||||
/** 错误信息 */
|
||||
errMsg?: string;
|
||||
}
|
||||
|
||||
/** 微信小程序 NFC 标签发现结果 */
|
||||
interface OnDiscoveredCallbackResult {
|
||||
/** NFC 标签 ID */
|
||||
id: ArrayBuffer;
|
||||
/** NFC 标签消息列表 */
|
||||
messages?: unknown[];
|
||||
/** NFC 支持的技术列表 */
|
||||
techs?: string[];
|
||||
}
|
||||
}
|
||||
|
||||
export function startNfcScan(): Promise<number[]>;
|
||||
|
||||
export class WeixinNfcUtil {
|
||||
|
||||
Reference in New Issue
Block a user