@tarojs/rn-style-transformer 3.4.0-beta.1 → 3.4.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.
package/dist/transforms/index.js
CHANGED
|
@@ -38,7 +38,7 @@ import { StyleSheet, Dimensions } from 'react-native'
|
|
|
38
38
|
|
|
39
39
|
// 一般app 只有竖屏模式,所以可以只获取一次 width
|
|
40
40
|
const deviceWidthDp = Dimensions.get('window').width
|
|
41
|
-
const uiWidthPx =
|
|
41
|
+
const uiWidthPx = 750
|
|
42
42
|
|
|
43
43
|
function scalePx2dp (uiElementPx) {
|
|
44
44
|
return uiElementPx * deviceWidthDp / uiWidthPx
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tarojs/rn-style-transformer",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.1",
|
|
4
4
|
"description": "提供Taro RN 统一处理样式文件能力",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -23,25 +23,25 @@
|
|
|
23
23
|
"npm": ">=6.0.0"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@tarojs/helper": "3.4.
|
|
26
|
+
"@tarojs/helper": "3.4.1",
|
|
27
27
|
"fbjs": "^2.0.0",
|
|
28
28
|
"less": "^3.12.2",
|
|
29
29
|
"postcss": "^7.0.35",
|
|
30
30
|
"postcss-import": "^12.0.1",
|
|
31
|
-
"postcss-pxtransform": "3.4.
|
|
31
|
+
"postcss-pxtransform": "3.4.1",
|
|
32
32
|
"postcss-reporter": "^6.0.1",
|
|
33
33
|
"prop-types": "^15.7.2",
|
|
34
34
|
"sass": "1.35.2",
|
|
35
35
|
"stylelint": "^13.8.0",
|
|
36
|
-
"stylelint-config-taro-rn": "3.4.
|
|
37
|
-
"stylelint-taro-rn": "3.4.
|
|
36
|
+
"stylelint-config-taro-rn": "3.4.1",
|
|
37
|
+
"stylelint-taro-rn": "3.4.1",
|
|
38
38
|
"stylus": "^0.54.8",
|
|
39
|
-
"taro-css-to-react-native": "3.4.
|
|
39
|
+
"taro-css-to-react-native": "3.4.1"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@types/less": "^3.0.2",
|
|
43
43
|
"@types/postcss-import": "^12.0.0",
|
|
44
44
|
"@types/sass": "^1.16.1"
|
|
45
45
|
},
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "a2437215b1966fd0b6dd09311bcb4fd894a871d0"
|
|
47
47
|
}
|
package/src/transforms/index.ts
CHANGED
|
@@ -16,7 +16,7 @@ import { StyleSheet, Dimensions } from 'react-native'
|
|
|
16
16
|
|
|
17
17
|
// 一般app 只有竖屏模式,所以可以只获取一次 width
|
|
18
18
|
const deviceWidthDp = Dimensions.get('window').width
|
|
19
|
-
const uiWidthPx =
|
|
19
|
+
const uiWidthPx = 750
|
|
20
20
|
|
|
21
21
|
function scalePx2dp (uiElementPx) {
|
|
22
22
|
return uiElementPx * deviceWidthDp / uiWidthPx
|