Skip to content

Commit e1af9d3

Browse files
committed
feat: 移除编译时处理style
1 parent 320fe42 commit e1af9d3

File tree

3 files changed

+205
-405
lines changed

3 files changed

+205
-405
lines changed

__test__/fixure/pesudo.jsx

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,14 @@ import './pesudo.scss'
33

44
export default function Pesudo() {
55

6-
return <View style={{height: `${'100px'}`, width: '100px'}}></View>
6+
return <>
7+
<View style={{width: '100px'}}></View>
8+
<View style={{width: `${'100px'}`}}></View>
9+
<View style={{width: `${'100px'}`, height: '100px'}}></View>
10+
<View className='a'></View>
11+
<View className={'a' + 1}></View>
12+
<View style={{width: '100px'}} className='a'></View>
13+
<View style={{width: `${'100px'}`}} className='a'></View>
14+
<View style={{width: `${'100px'}`, height: '100px'}} className='a'></View>
15+
</>
716
}

src/utils.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -49,18 +49,18 @@ pub fn to_camel_case(s: &str, is_first: bool) -> String {
4949
result
5050
}
5151

52-
pub fn to_kebab_case(s: &str) -> String {
53-
let mut result = String::new();
54-
for c in s.chars() {
55-
if c.is_uppercase() {
56-
result.push('-');
57-
result.extend(c.to_lowercase());
58-
} else {
59-
result.push(c);
60-
}
61-
}
62-
result
63-
}
52+
// pub fn to_kebab_case(s: &str) -> String {
53+
// let mut result = String::new();
54+
// for c in s.chars() {
55+
// if c.is_uppercase() {
56+
// result.push('-');
57+
// result.extend(c.to_lowercase());
58+
// } else {
59+
// result.push(c);
60+
// }
61+
// }
62+
// result
63+
// }
6464

6565
pub fn prefix_style_key(s: String, platform: Platform) -> String {
6666
match platform {

0 commit comments

Comments
 (0)