画布高清处理
This commit is contained in:
14
cool/utils/device.ts
Normal file
14
cool/utils/device.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
/**
|
||||
* 获取设备像素比
|
||||
* @returns 设备像素比
|
||||
*/
|
||||
export const getDevicePixelRatio = (): number => {
|
||||
const dpr = uni.getDeviceInfo().devicePixelRatio ?? 1;
|
||||
|
||||
// #ifdef MP
|
||||
// 微信小程序高清处理
|
||||
return 3;
|
||||
// #endif
|
||||
|
||||
return dpr;
|
||||
};
|
||||
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user