File tree Expand file tree Collapse file tree 2 files changed +4
-14
lines changed Expand file tree Collapse file tree 2 files changed +4
-14
lines changed Original file line number Diff line number Diff line change @@ -214,13 +214,8 @@ function handleTouchScroll(flag: any): void {
214
214
215
215
function pxTransform ( size : number ) : string {
216
216
if ( ! size ) return ''
217
- const designWidth = 750
218
- const deviceRatio = {
219
- 640 : 2.34 / 2 ,
220
- 750 : 1 ,
221
- 828 : 1.81 / 2
222
- }
223
- return `${ size / deviceRatio [ designWidth ] } rpx`
217
+
218
+ return Taro . pxTransform ( size )
224
219
}
225
220
226
221
function objectToString ( style : object | string ) : string {
Original file line number Diff line number Diff line change @@ -214,13 +214,8 @@ function handleTouchScroll(flag: any): void {
214
214
215
215
function pxTransform ( size : number ) : string {
216
216
if ( ! size ) return ''
217
- const designWidth = 750
218
- const deviceRatio = {
219
- 640 : 2.34 / 2 ,
220
- 750 : 1 ,
221
- 828 : 1.81 / 2
222
- }
223
- return `${ size / deviceRatio [ designWidth ] } rpx`
217
+
218
+ return Taro . pxTransform ( size )
224
219
}
225
220
226
221
function objectToString ( style : object | string ) : string {
You can’t perform that action at this time.
0 commit comments