画布高清处理

This commit is contained in:
icssoa
2025-08-03 16:19:19 +08:00
parent 914114aa11
commit a0682337ad
5 changed files with 56 additions and 51 deletions

14
cool/utils/device.ts Normal file
View File

@@ -0,0 +1,14 @@
/**
* 获取设备像素比
* @returns 设备像素比
*/
export const getDevicePixelRatio = (): number => {
const dpr = uni.getDeviceInfo().devicePixelRatio ?? 1;
// #ifdef MP
// 微信小程序高清处理
return 3;
// #endif
return dpr;
};

View File

@@ -1,6 +1,7 @@
export * from "./comm";
export * from "./storage";
export * from "./path";
export * from "./day";
export * from "./parse";
export * from "./device";
export * from "./file";
export * from "./parse";
export * from "./path";
export * from "./storage";