@@ -23,7 +23,7 @@ use swc_ecma_visit::{
2323} ;
2424
2525use crate :: {
26- constants:: { CALC_DYMAMIC_STYLE , CONVERT_STYLE_PX_FN , INNER_STYLE , INNER_STYLE_DATA , NESTING_STYLE , NESTINT_STYLE_DATA , RN_CONVERT_STYLE_PX_FN , RN_CONVERT_STYLE_VU_FN } , parse_style_properties:: parse_style_properties, scraper:: Element , style_parser:: StyleValue , style_propetries:: { style_value_type:: StyleValueType , traits:: ToStyleValue , unit:: { Platform , PropertyTuple } } , utils:: {
26+ constants:: { CALC_DYMAMIC_STYLE , COMBINE_NESTING_STYLE , CONVERT_STYLE_PX_FN , INNER_STYLE , INNER_STYLE_DATA , NESTING_STYLE , NESTINT_STYLE_DATA , RN_CONVERT_STYLE_PX_FN , RN_CONVERT_STYLE_VU_FN } , parse_style_properties:: parse_style_properties, scraper:: Element , style_parser:: StyleValue , style_propetries:: { style_value_type:: StyleValueType , traits:: ToStyleValue , unit:: { Platform , PropertyTuple } } , utils:: {
2727 create_qualname, get_callee_attributes, prefix_style_key, recursion_jsx_member, split_selector, to_camel_case, to_kebab_case
2828 }
2929} ;
@@ -409,6 +409,12 @@ pub fn insert_import_module_decl(module: &mut Module, last_import_index: usize,
409409 // ))),
410410 imported: None ,
411411 is_type_only: false ,
412+ } ) ,
413+ ImportSpecifier :: Named ( ImportNamedSpecifier {
414+ span: DUMMY_SP ,
415+ local: Ident :: new( COMBINE_NESTING_STYLE . into( ) , DUMMY_SP ) ,
416+ imported: None ,
417+ is_type_only: false ,
412418 } )
413419 ] ,
414420 src : Box :: new ( Str :: from ( "@tarojs/runtime" ) ) ,
@@ -445,8 +451,16 @@ impl ModuleMutVisitor {
445451 let expr = arg. take ( ) . unwrap ( ) ;
446452 * arg = Some ( Box :: new ( Expr :: Call ( CallExpr {
447453 span : DUMMY_SP ,
448- callee : Callee :: Expr ( Box :: new ( Expr :: Ident ( quote_ident ! ( "MyMethod" ) ) ) ) ,
449- args : vec ! [ ExprOrSpread { expr, spread: None } ] ,
454+ callee : Callee :: Expr ( Box :: new ( Expr :: Ident ( quote_ident ! ( COMBINE_NESTING_STYLE ) ) ) ) ,
455+ args : vec ! [
456+ ExprOrSpread { expr, spread: None } ,
457+ ExprOrSpread { expr: Box :: new( Expr :: Call ( CallExpr {
458+ span: DUMMY_SP ,
459+ callee: Callee :: Expr ( Box :: new( Expr :: Ident ( quote_ident!( NESTING_STYLE ) ) ) ) ,
460+ args: vec![ ] ,
461+ type_args: None
462+ } ) ) , spread: None }
463+ ] ,
450464 type_args : None ,
451465 } ) ) )
452466 }
0 commit comments