@leafer/miniapp 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +5 -5
  2. package/src/index.ts +3 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leafer/miniapp",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "@leafer/miniapp",
5
5
  "author": "Chao (Leafer) Wan",
6
6
  "license": "MIT",
@@ -22,11 +22,11 @@
22
22
  "leaferjs"
23
23
  ],
24
24
  "dependencies": {
25
- "@leafer/core": "1.0.0",
26
- "@leafer/canvas-miniapp": "1.0.0",
27
- "@leafer/image-miniapp": "1.0.0"
25
+ "@leafer/core": "1.0.1",
26
+ "@leafer/canvas-miniapp": "1.0.1",
27
+ "@leafer/image-miniapp": "1.0.1"
28
28
  },
29
29
  "devDependencies": {
30
- "@leafer/interface": "1.0.0"
30
+ "@leafer/interface": "1.0.1"
31
31
  }
32
32
  }
package/src/index.ts CHANGED
@@ -4,7 +4,7 @@ export * from '@leafer/canvas-miniapp'
4
4
  export * from '@leafer/image-miniapp'
5
5
 
6
6
  import { ICanvasType, ICreator, IExportFileType, IExportImageType, IFunction, IObject, IMiniappSelect, IMiniappSizeView, IBoundsData } from '@leafer/interface'
7
- import { Platform, Creator, FileHelper } from '@leafer/core'
7
+ import { Platform, Creator, FileHelper, defineKey } from '@leafer/core'
8
8
 
9
9
  import { LeaferCanvas } from '@leafer/canvas-miniapp'
10
10
  import { LeaferImage } from '@leafer/image-miniapp'
@@ -136,4 +136,5 @@ export function useCanvas(_canvasType: ICanvasType, app?: IObject): void {
136
136
 
137
137
  Platform.name = 'miniapp'
138
138
  Platform.requestRender = function (render: IFunction): void { Platform.canvas.view.requestAnimationFrame(render) }
139
- Platform.devicePixelRatio = wx.getSystemInfoSync().pixelRatio
139
+ defineKey(Platform, 'devicePixelRatio', { get() { return Math.max(1, wx.getSystemInfoSync().pixelRatio) } })
140
+