| 1234567891011121314151617 |
- export function rpxToPx(unirpx: number): number {
- if (getApp<any>().globalData.device) {
- return (unirpx * getApp<any>().globalData.device.windowWidth) / 750;
- }
- return unirpx;
- }
- export function pxToRpx(px: number): number {
- if (getApp<any>().globalData.device) {
- return (750 * px) / getApp<any>().globalData.device.windowWidth;
- }
- return px;
- }
- export const isDevTool =
- getApp<any>().globalData.device &&
- getApp<any>().globalData.device.platform === "devtools";
|