Skip to content

Commit 6de1b02

Browse files
committed
feat: 将样式转换处理拆分出去
1 parent 8f137e5 commit 6de1b02

38 files changed

+2755
-2959
lines changed

__test__/index.spec.mjs.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ Generated by [AVA](https://avajs.dev).
5252
justifyContent: FlexAlign.Center,␊
5353
alignItems: ItemAlign.Center␊
5454
},␊
55+
flexShrink: 0,␊
5556
gap: "4px",␊
5657
height: "24px",␊
5758
linearGradient: [␊
@@ -115,6 +116,7 @@ Generated by [AVA](https://avajs.dev).
115116
flexOptions: {␊
116117
justifyContent: FlexAlign.SpaceBetween␊
117118
},␊
119+
flexShrink: 0,␊
118120
gap: "-94px",␊
119121
height: "23px",␊
120122
left: "201px",␊
@@ -225,6 +227,7 @@ Generated by [AVA](https://avajs.dev).
225227
color: "#fff",␊
226228
display: "inline-flex",␊
227229
flexOptions: {},␊
230+
flexShrink: 0,␊
228231
fontSize: "12px",␊
229232
lineHeight: "1",␊
230233
margin: {␊
@@ -238,13 +241,15 @@ Generated by [AVA](https://avajs.dev).
238241
color: "#000",␊
239242
display: "inline-flex",␊
240243
flexOptions: {},␊
244+
flexShrink: 0,␊
241245
fontSize: "16px",␊
242246
lineHeight: "1",␊
243247
width: "116px"␊
244248
},␊
245249
"instruction2": {␊
246250
color: "#999",␊
247251
flexOptions: {},␊
252+
flexShrink: 0,␊
248253
fontSize: "11px",␊
249254
lineHeight: "1.36",␊
250255
overflow: "hidden",␊
@@ -289,6 +294,7 @@ Generated by [AVA](https://avajs.dev).
289294
direction: FlexDirection.Column,␊
290295
justifyContent: FlexAlign.Center␊
291296
},␊
297+
flexShrink: 0,␊
292298
fontFamily: "Source Han Sans CN",␊
293299
fontWeight: "500",␊
294300
gap: "8px",␊
@@ -305,12 +311,14 @@ Generated by [AVA](https://avajs.dev).
305311
color: "#999",␊
306312
display: "inline-flex",␊
307313
flexOptions: {},␊
314+
flexShrink: 0,␊
308315
fontSize: "12px",␊
309316
lineHeight: "1"␊
310317
},␊
311318
"txt1": {␊
312319
color: "#222",␊
313320
flexOptions: {},␊
321+
flexShrink: 0,␊
314322
fontSize: "11px",␊
315323
lineHeight: "1.36",␊
316324
textAlign: "center"␊
@@ -319,6 +327,7 @@ Generated by [AVA](https://avajs.dev).
319327
color: "#999",␊
320328
display: "inline-flex",␊
321329
flexOptions: {},␊
330+
flexShrink: 0,␊
322331
fontSize: "12px",␊
323332
lineHeight: "1.83",␊
324333
width: "290px"␊
@@ -429,6 +438,7 @@ Generated by [AVA](https://avajs.dev).
429438
direction: FlexDirection.Column,␊
430439
justifyContent: FlexAlign.Center␊
431440
},␊
441+
flexShrink: 0,␊
432442
fontFamily: "Source Han Sans CN",␊
433443
fontWeight: "500",␊
434444
gap: "8px",␊
@@ -472,7 +482,7 @@ Generated by [AVA](https://avajs.dev).
472482
],␊
473483
textDecoration: {␊
474484
type: TextDecorationType["LineThrough"],␊
475-
color: "Red"␊
485+
color: "red"␊
476486
},␊
477487
width: "18px"␊
478488
}} src='//img20.360buyimg.com/img/jfs/t1/166410/12/38783/3147/64f58062Fd7737e2b/5aaf0205cd1ce175.png'></img>␊
@@ -685,6 +695,7 @@ Generated by [AVA](https://avajs.dev).
685695
flexOptions: {␊
686696
justifyContent: FlexAlign.SpaceBetween␊
687697
},␊
698+
flexShrink: 0,␊
688699
gap: "-94px",␊
689700
height: "23px",␊
690701
left: "201px",␊
@@ -711,6 +722,7 @@ Generated by [AVA](https://avajs.dev).
711722
<span className='instruction2' style={{␊
712723
color: "#999",␊
713724
flexOptions: {},␊
725+
flexShrink: 0,␊
714726
fontSize: "11px",␊
715727
lineHeight: "1.36",␊
716728
overflow: "hidden",␊
@@ -720,6 +732,7 @@ Generated by [AVA](https://avajs.dev).
720732
<span className='txt1' style={{␊
721733
color: "#222",␊
722734
flexOptions: {},␊
735+
flexShrink: 0,␊
723736
fontSize: "11px",␊
724737
lineHeight: "1.36",␊
725738
textAlign: "center"␊
@@ -744,6 +757,7 @@ Generated by [AVA](https://avajs.dev).
744757
color: "#999",␊
745758
display: "inline-flex",␊
746759
flexOptions: {},␊
760+
flexShrink: 0,␊
747761
fontSize: "12px",␊
748762
lineHeight: "1.83",␊
749763
width: "290px"␊

__test__/index.spec.mjs.snap

21 Bytes
Binary file not shown.

src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ extern crate napi_derive;
1313
mod document;
1414
mod scraper;
1515
mod style_parser;
16+
mod style_transform;
1617
mod style_write;
1718
mod utils;
1819
mod visitor;

0 commit comments

Comments
 (0)