Skip to content

Commit fa4d75a

Browse files
author
mayintao3
committed
feat: 去掉xyz的引号
1 parent 961c89f commit fa4d75a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/style_propetries/transform_origin.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ impl ToExpr for TransformOrigin {
3737
span: DUMMY_SP,
3838
props: vec![
3939
PropOrSpread::Prop(Box::new(Prop::KeyValue(KeyValueProp {
40-
key: PropName::Ident(Ident::new(stringify!("x").into(), DUMMY_SP)),
40+
key: PropName::Ident(Ident::new(stringify!(x).into(), DUMMY_SP)),
4141
value: Box::new(
4242
match &self.x {
4343
EnumValue::String(value) => generate_expr_lit_str!(value.to_string()),
@@ -46,7 +46,7 @@ impl ToExpr for TransformOrigin {
4646
),
4747
}))),
4848
PropOrSpread::Prop(Box::new(Prop::KeyValue(KeyValueProp {
49-
key: PropName::Ident(Ident::new(stringify!("y").into(), DUMMY_SP)),
49+
key: PropName::Ident(Ident::new(stringify!(y).into(), DUMMY_SP)),
5050
value: Box::new(
5151
match &self.y {
5252
EnumValue::String(value) => generate_expr_lit_str!(value.to_string()),

src/style_propetries/transform_properties/translate.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ impl Translate {
4747
if let Some(z) = &self.z {
4848
match z {
4949
Length::Value(val) => props.push(PropOrSpread::Prop(Box::new(Prop::KeyValue(KeyValueProp {
50-
key: PropName::Ident(Ident::new(stringify!("z").into(), DUMMY_SP)),
50+
key: PropName::Ident(Ident::new(stringify!(z).into(), DUMMY_SP)),
5151
value: Box::new(generate_expr_by_length_value(&val, Platform::Harmony))
5252
})))),
5353
_ => {}
@@ -84,7 +84,7 @@ impl Translate {
8484
if let Some(z) = &self.z {
8585
match z {
8686
Length::Value(val) => props.push(PropOrSpread::Prop(Box::new(Prop::KeyValue(KeyValueProp {
87-
key: PropName::Ident(Ident::new(stringify!("z").into(), DUMMY_SP)),
87+
key: PropName::Ident(Ident::new(stringify!(z).into(), DUMMY_SP)),
8888
value: Box::new(generate_expr_by_length_value(&val, Platform::Harmony))
8989
})))),
9090
_ => {}

0 commit comments

Comments
 (0)