fix(uni-app): 🐛 安装类型依赖

This commit is contained in:
CodiceFabbrica 2026-05-28 11:54:22 +08:00
parent 80debf6d6b
commit 18a037e9b7
6 changed files with 49 additions and 2 deletions

2
.npmrc
View File

@ -1,2 +1,2 @@
registry=http://npm.nps.yunvip123.cn
engine-strict=true

View File

@ -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:",

View File

@ -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 {

View File

@ -14,7 +14,7 @@ declare module "vue/types/options" {
export declare function install(Vue: VueConstructor): void;
/** 页面可见性生命周期插件 */
declare const VisibilityPlugin: PluginObject<never> & {
declare const VisibilityPlugin: PluginObject<unknown> & {
/** 安装页面可见性生命周期插件 */
install: typeof install;
};

View File

@ -3,6 +3,7 @@ import { ComponentPublicInstance } from "vue";
type CustomClassObj = Record<string, boolean>;
type CustomClass = string | Array<string> | CustomClassObj;
type DistCustomClass = Record<string, true>;
export function createCustomClassObj(customClass: string): DistCustomClass;
export function createCustomClassObj(
customClass: Array<string>,

View File

@ -153,6 +153,9 @@ importers:
packages/uni-app:
dependencies:
'@jonny1994/qqmap-wx-jssdk':
specifier: ^1.4.0
version: 1.4.0
'@r-utils/common':
specifier: workspace:^
version: link:../common