Skip to content

Commit 84dcb1a

Browse files
committed
feat: 调整生成逻辑
1 parent 197a922 commit 84dcb1a

File tree

7 files changed

+975
-1297
lines changed

7 files changed

+975
-1297
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ napi-derive = "2.12.2"
1414
cssparser = "0.31.2"
1515
ego-tree = "0.6.2"
1616
html5ever = "0.26.0"
17-
lightningcss = {version = "1.0.0-alpha.45", features = ["visitor"]}
17+
lightningcss = {version = "1.0.0-alpha.45", features = ["visitor", "into_owned"]}
1818
once_cell = "1.18.0"
1919
selectors = "0.25.0"
2020
smallvec = "1.11.0"

__test__/index.spec.mjs.md

Lines changed: 47 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,14 @@ Generated by [AVA](https://avajs.dev).
7777
bottom: "8px",␊
7878
left: "4px"␊
7979
},␊
80+
rotate: [␊
81+
{␊
82+
x: 2,␊
83+
y: -1,␊
84+
z: -1,␊
85+
angle: "-.2turn"␊
86+
}␊
87+
],␊
8088
textDecoration: {␊
8189
type: TextDecorationType["LineThrough"],␊
8290
color: "black"␊
@@ -141,6 +149,14 @@ Generated by [AVA](https://avajs.dev).
141149
},␊
142150
flexOptions: {},␊
143151
height: "18px",␊
152+
rotate: [␊
153+
{␊
154+
x: 2,␊
155+
y: -1,␊
156+
z: -1,␊
157+
angle: "-.2turn"␊
158+
}␊
159+
],␊
144160
textDecoration: {␊
145161
type: TextDecorationType["LineThrough"],␊
146162
color: "black"␊
@@ -403,22 +419,31 @@ Generated by [AVA](https://avajs.dev).
403419
}␊
404420
render() {␊
405421
return <div className='mod' style={{␊
422+
background: {␊
423+
image: [],␊
424+
color: "#fff6f0",␊
425+
size: [],␊
426+
position: []␊
427+
},␊
406428
borderRadius: {␊
407429
topLeft: "8px",␊
408430
topRight: "8px",␊
409431
bottomLeft: "8px",␊
410432
bottomRight: "8px"␊
411433
},␊
412434
display: "flex",␊
413-
flexOptions: {},␊
435+
flexOptions: {␊
436+
direction: FlexDirection.Column,␊
437+
justifyContent: FlexAlign.Center␊
438+
},␊
414439
fontFamily: "Source Han Sans CN",␊
415440
fontWeight: "500",␊
416441
gap: "8px",␊
417-
height: "800",␊
442+
height: "800px",␊
418443
margin: {␊
419444
top: "-12px",␊
420-
right: "10",␊
421-
bottom: "12",␊
445+
right: "10px",␊
446+
bottom: "12px",␊
422447
left: "32px"␊
423448
},␊
424449
padding: {␊
@@ -438,15 +463,23 @@ Generated by [AVA](https://avajs.dev).
438463
borderRadius: {␊
439464
topLeft: "2px",␊
440465
topRight: "4px",␊
441-
bottomLeft: "2px",␊
442-
bottomRight: "4px"␊
466+
bottomLeft: "4px",␊
467+
bottomRight: "2px"␊
443468
},␊
444469
color: "red",␊
445470
flexOptions: {},␊
446471
height: "18px",␊
472+
rotate: [␊
473+
{␊
474+
x: 2,␊
475+
y: -1,␊
476+
z: -1,␊
477+
angle: "-.2turn"␊
478+
}␊
479+
],␊
447480
textDecoration: {␊
448481
type: TextDecorationType["LineThrough"],␊
449-
color: "red"␊
482+
color: "Red"␊
450483
},␊
451484
width: "18px"␊
452485
}} src='//img20.360buyimg.com/img/jfs/t1/166410/12/38783/3147/64f58062Fd7737e2b/5aaf0205cd1ce175.png'></img>␊
@@ -514,7 +547,10 @@ Generated by [AVA](https://avajs.dev).
514547
]␊
515548
},␊
516549
display: "flex",␊
517-
flexOptions: {},␊
550+
flexOptions: {␊
551+
justifyContent: FlexAlign.Start,␊
552+
alignItems: ItemAlign.Center␊
553+
},␊
518554
gap: "10px",␊
519555
height: "50px",␊
520556
position: "relative",␊
@@ -654,7 +690,9 @@ Generated by [AVA](https://avajs.dev).
654690
borderStyle: "solid",␊
655691
borderWidth: "1px",␊
656692
display: "flex",␊
657-
flexOptions: {},␊
693+
flexOptions: {␊
694+
justifyContent: FlexAlign.SpaceBetween␊
695+
},␊
658696
gap: "-94px",␊
659697
height: "23px",␊
660698
left: "201px",␊

__test__/index.spec.mjs.snap

92 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)