Skip to content

Commit a2cce34

Browse files
committed
0.0.51
1 parent 3d759fd commit a2cce34

File tree

6 files changed

+100
-100
lines changed

6 files changed

+100
-100
lines changed

__test__/compileMode.spec.mjs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Generated by [AVA](https://avajs.dev).
1515
if (__inner_style_data__) return __inner_style_data__;␊
1616
__inner_style_data__ = {␊
1717
"item": {␊
18-
height: "100lpx"
18+
height: convertNumber2VP(100)
1919
}␊
2020
};␊
2121
return __inner_style_data__;␊

__test__/compileMode.spec.mjs.snap

-1 Bytes
Binary file not shown.

__test__/index.spec.mjs.md

Lines changed: 72 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,19 @@ Generated by [AVA](https://avajs.dev).
1515
if (__inner_style_data__) return __inner_style_data__;␊
1616
__inner_style_data__ = {␊
1717
"calc": {␊
18-
width: \`calc(50% - 140lpx)\`␊
18+
width: \`calc(50% - ${convertNumber2VP(140, 'px')})\`␊
1919
},␊
2020
"decimal": {␊
21-
width: "0.5lpx"
21+
width: convertNumber2VP(0.5)
2222
},␊
2323
"decimal2": {␊
24-
width: "0.5lpx"
24+
width: convertNumber2VP(0.5)
2525
},␊
2626
"percent": {␊
2727
width: "100%"␊
2828
},␊
2929
"px": {␊
30-
top: "100lpx",␊
30+
top: convertNumber2VP(100),␊
3131
left: convertNumber2VP(100, "PX"),␊
3232
right: convertNumber2VP(100, "PX"),␊
3333
bottom: convertNumber2VP(100, "PX")␊
@@ -137,7 +137,7 @@ Generated by [AVA](https://avajs.dev).
137137
flexBasis: convertNumber2VP(160)␊
138138
},␊
139139
"item2": {␊
140-
flexBasis: "3lpx"
140+
flexBasis: convertNumber2VP(3)
141141
},␊
142142
"item3": {␊
143143
flexBasis: "50%"␊
@@ -394,18 +394,18 @@ Generated by [AVA](https://avajs.dev).
394394
if (__inner_style_data__) return __inner_style_data__;␊
395395
__inner_style_data__ = {␊
396396
"item": {␊
397-
left: "10lpx",␊
398-
top: "10lpx",␊
399-
right: "10lpx",␊
400-
bottom: "10lpx",␊
401-
marginTop: "10lpx",␊
402-
marginRight: "10lpx",␊
403-
marginBottom: "10lpx",␊
404-
marginLeft: "10lpx",␊
405-
paddingTop: "10lpx",␊
406-
paddingRight: "10lpx",␊
407-
paddingBottom: "10lpx",␊
408-
paddingLeft: "10lpx"
397+
left: convertNumber2VP(10),␊
398+
top: convertNumber2VP(10),␊
399+
right: convertNumber2VP(10),␊
400+
bottom: convertNumber2VP(10),␊
401+
marginTop: convertNumber2VP(10),␊
402+
marginRight: convertNumber2VP(10),␊
403+
marginBottom: convertNumber2VP(10),␊
404+
marginLeft: convertNumber2VP(10),␊
405+
paddingTop: convertNumber2VP(10),␊
406+
paddingRight: convertNumber2VP(10),␊
407+
paddingBottom: convertNumber2VP(10),␊
408+
paddingLeft: convertNumber2VP(10)
409409
}␊
410410
};␊
411411
return __inner_style_data__;␊
@@ -427,12 +427,12 @@ Generated by [AVA](https://avajs.dev).
427427
if (__inner_style_data__) return __inner_style_data__;␊
428428
__inner_style_data__ = {␊
429429
"item": {␊
430-
width: "10lpx",␊
431-
height: "10lpx",␊
432-
minWidth: "10lpx",␊
433-
maxWidth: "10lpx",␊
434-
minHeight: "10lpx",␊
435-
maxHeight: "10lpx"
430+
width: convertNumber2VP(10),␊
431+
height: convertNumber2VP(10),␊
432+
minWidth: convertNumber2VP(10),␊
433+
maxWidth: convertNumber2VP(10),␊
434+
minHeight: convertNumber2VP(10),␊
435+
maxHeight: convertNumber2VP(10)
436436
}␊
437437
};␊
438438
return __inner_style_data__;␊
@@ -511,8 +511,8 @@ Generated by [AVA](https://avajs.dev).
511511
src: "https://www.baidu.com"␊
512512
},␊
513513
backgroundSize: {␊
514-
width: "100lpx",␊
515-
height: "200lpx"
514+
width: convertNumber2VP(100),␊
515+
height: convertNumber2VP(200)
516516
},␊
517517
backgroundPosition: Alignment.Center,␊
518518
backgroundRepeat: ImageRepeat.NoRepeat␊
@@ -567,7 +567,7 @@ Generated by [AVA](https://avajs.dev).
567567
"50%",␊
568568
"50%"␊
569569
],␊
570-
radius: "30lpx",␊
570+
radius: convertNumber2VP(30),␊
571571
repeating: false␊
572572
}␊
573573
},␊
@@ -631,14 +631,14 @@ Generated by [AVA](https://avajs.dev).
631631
},␊
632632
"length": {␊
633633
backgroundSize: {␊
634-
width: "100lpx",␊
634+
width: convertNumber2VP(100),␊
635635
height: "auto"␊
636636
}␊
637637
},␊
638638
"length_x_length_y": {␊
639639
backgroundSize: {␊
640-
width: "100lpx",␊
641-
height: "200lpx"
640+
width: convertNumber2VP(100),␊
641+
height: convertNumber2VP(200)
642642
}␊
643643
}␊
644644
};␊
@@ -702,14 +702,14 @@ Generated by [AVA](https://avajs.dev).
702702
},␊
703703
"length": {␊
704704
backgroundPosition: {␊
705-
x: "100lpx",␊
705+
x: convertNumber2VP(100),␊
706706
y: "50%"␊
707707
}␊
708708
},␊
709709
"length_x_length_y": {␊
710710
backgroundPosition: {␊
711-
x: "100lpx",␊
712-
y: "200lpx"
711+
x: convertNumber2VP(100),␊
712+
y: convertNumber2VP(200)
713713
}␊
714714
},␊
715715
"right": {␊
@@ -738,10 +738,10 @@ Generated by [AVA](https://avajs.dev).
738738
if (__inner_style_data__) return __inner_style_data__;␊
739739
__inner_style_data__ = {␊
740740
"item": {␊
741-
borderTopWidth: "1lpx",␊
742-
borderRightWidth: "1lpx",␊
743-
borderBottomWidth: "1lpx",␊
744-
borderLeftWidth: "1lpx",␊
741+
borderTopWidth: convertNumber2VP(1),␊
742+
borderRightWidth: convertNumber2VP(1),␊
743+
borderBottomWidth: convertNumber2VP(1),␊
744+
borderLeftWidth: convertNumber2VP(1),␊
745745
borderTopStyle: BorderStyle.Solid,␊
746746
borderRightStyle: BorderStyle.Solid,␊
747747
borderBottomStyle: BorderStyle.Solid,␊
@@ -771,22 +771,22 @@ Generated by [AVA](https://avajs.dev).
771771
if (__inner_style_data__) return __inner_style_data__;␊
772772
__inner_style_data__ = {␊
773773
"item": {␊
774-
borderTopWidth: "1lpx",␊
774+
borderTopWidth: convertNumber2VP(1),␊
775775
borderTopStyle: BorderStyle.Solid,␊
776776
borderTopColor: "#FF0000"␊
777777
},␊
778778
"item2": {␊
779-
borderBottomWidth: "1lpx",␊
779+
borderBottomWidth: convertNumber2VP(1),␊
780780
borderBottomStyle: BorderStyle.Solid,␊
781781
borderBottomColor: "#FF0000"␊
782782
},␊
783783
"item3": {␊
784-
borderLeftWidth: "1lpx",␊
784+
borderLeftWidth: convertNumber2VP(1),␊
785785
borderLeftStyle: BorderStyle.Solid,␊
786786
borderLeftColor: "#FF0000"␊
787787
},␊
788788
"item4": {␊
789-
borderRightWidth: "1lpx",␊
789+
borderRightWidth: convertNumber2VP(1),␊
790790
borderRightStyle: BorderStyle.Solid,␊
791791
borderRightColor: "#FF0000"␊
792792
}␊
@@ -810,16 +810,16 @@ Generated by [AVA](https://avajs.dev).
810810
if (__inner_style_data__) return __inner_style_data__;␊
811811
__inner_style_data__ = {␊
812812
"item": {␊
813-
borderTopWidth: "1lpx"
813+
borderTopWidth: convertNumber2VP(1)
814814
},␊
815815
"item2": {␊
816-
borderBottomWidth: "1lpx"
816+
borderBottomWidth: convertNumber2VP(1)
817817
},␊
818818
"item3": {␊
819-
borderLeftWidth: "1lpx"
819+
borderLeftWidth: convertNumber2VP(1)
820820
},␊
821821
"item4": {␊
822-
borderRightWidth: "1lpx"
822+
borderRightWidth: convertNumber2VP(1)
823823
}␊
824824
};␊
825825
return __inner_style_data__;␊
@@ -903,28 +903,28 @@ Generated by [AVA](https://avajs.dev).
903903
if (__inner_style_data__) return __inner_style_data__;␊
904904
__inner_style_data__ = {␊
905905
"item": {␊
906-
borderTopLeftRadius: "10lpx",␊
907-
borderTopRightRadius: "10lpx",␊
908-
borderBottomLeftRadius: "10lpx",␊
909-
borderBottomRightRadius: "10lpx"
906+
borderTopLeftRadius: convertNumber2VP(10),␊
907+
borderTopRightRadius: convertNumber2VP(10),␊
908+
borderBottomLeftRadius: convertNumber2VP(10),␊
909+
borderBottomRightRadius: convertNumber2VP(10)
910910
},␊
911911
"item2": {␊
912-
borderTopLeftRadius: "10lpx",␊
913-
borderTopRightRadius: "20lpx",␊
914-
borderBottomLeftRadius: "20lpx",␊
915-
borderBottomRightRadius: "10lpx"
912+
borderTopLeftRadius: convertNumber2VP(10),␊
913+
borderTopRightRadius: convertNumber2VP(20),␊
914+
borderBottomLeftRadius: convertNumber2VP(20),␊
915+
borderBottomRightRadius: convertNumber2VP(10)
916916
},␊
917917
"item3": {␊
918-
borderTopLeftRadius: "10lpx",␊
919-
borderTopRightRadius: "20lpx",␊
920-
borderBottomLeftRadius: "20lpx",␊
921-
borderBottomRightRadius: "30lpx"
918+
borderTopLeftRadius: convertNumber2VP(10),␊
919+
borderTopRightRadius: convertNumber2VP(20),␊
920+
borderBottomLeftRadius: convertNumber2VP(20),␊
921+
borderBottomRightRadius: convertNumber2VP(30)
922922
},␊
923923
"item4": {␊
924-
borderTopLeftRadius: "10lpx",␊
925-
borderTopRightRadius: "20lpx",␊
926-
borderBottomLeftRadius: "40lpx",␊
927-
borderBottomRightRadius: "30lpx"
924+
borderTopLeftRadius: convertNumber2VP(10),␊
925+
borderTopRightRadius: convertNumber2VP(20),␊
926+
borderBottomLeftRadius: convertNumber2VP(40),␊
927+
borderBottomRightRadius: convertNumber2VP(30)
928928
}␊
929929
};␊
930930
return __inner_style_data__;␊
@@ -946,16 +946,16 @@ Generated by [AVA](https://avajs.dev).
946946
if (__inner_style_data__) return __inner_style_data__;␊
947947
__inner_style_data__ = {␊
948948
"item": {␊
949-
borderTopLeftRadius: "10lpx"
949+
borderTopLeftRadius: convertNumber2VP(10)
950950
},␊
951951
"item2": {␊
952-
borderTopRightRadius: "10lpx"
952+
borderTopRightRadius: convertNumber2VP(10)
953953
},␊
954954
"item3": {␊
955-
borderBottomLeftRadius: "10lpx"
955+
borderBottomLeftRadius: convertNumber2VP(10)
956956
},␊
957957
"item4": {␊
958-
borderBottomRightRadius: "10lpx"
958+
borderBottomRightRadius: convertNumber2VP(10)
959959
}␊
960960
};␊
961961
return __inner_style_data__;␊
@@ -1002,8 +1002,8 @@ Generated by [AVA](https://avajs.dev).
10021002
"item4": {␊
10031003
transform: {␊
10041004
Translate: {␊
1005-
x: "10lpx",␊
1006-
y: "20lpx"
1005+
x: convertNumber2VP(10),␊
1006+
y: convertNumber2VP(20)
10071007
}␊
10081008
}␊
10091009
},␊
@@ -1014,8 +1014,8 @@ Generated by [AVA](https://avajs.dev).
10141014
y: 1␊
10151015
},␊
10161016
Translate: {␊
1017-
x: "10lpx",␊
1018-
y: "20lpx"
1017+
x: convertNumber2VP(10),␊
1018+
y: convertNumber2VP(20)
10191019
},␊
10201020
Rotate: {␊
10211021
x: 1␊
@@ -1043,8 +1043,8 @@ Generated by [AVA](https://avajs.dev).
10431043
__inner_style_data__ = {␊
10441044
"item": {␊
10451045
transformOrigin: {␊
1046-
"x": "10lpx",␊
1047-
"y": "20lpx"
1046+
"x": convertNumber2VP(10),␊
1047+
"y": convertNumber2VP(20)
10481048
}␊
10491049
},␊
10501050
"item2": {␊
@@ -1079,7 +1079,7 @@ Generated by [AVA](https://avajs.dev).
10791079
if (__inner_style_data__) return __inner_style_data__;␊
10801080
__inner_style_data__ = {␊
10811081
"item": {␊
1082-
fontSize: "10lpx"
1082+
fontSize: convertNumber2VP(10)
10831083
}␊
10841084
};␊
10851085
return __inner_style_data__;␊
@@ -1135,7 +1135,7 @@ Generated by [AVA](https://avajs.dev).
11351135
if (__inner_style_data__) return __inner_style_data__;␊
11361136
__inner_style_data__ = {␊
11371137
"item": {␊
1138-
lineHeight: "10lpx"
1138+
lineHeight: convertNumber2VP(10)
11391139
}␊
11401140
};␊
11411141
return __inner_style_data__;␊

__test__/index.spec.mjs.snap

14 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)