Skip to content

Commit 36c8a3f

Browse files
committed
feat: 移除对taro-component的标签判断识别
1 parent 1d134dd commit 36c8a3f

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

src/visitor.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -229,13 +229,13 @@ impl<'a> VisitAll for AstVisitor<'a> {
229229
let element = self.create_element(JSXElementOrJSXCallee::JSXElement(jsx));
230230
if let JSXElementName::Ident(ident) = &jsx.opening.name {
231231
let name = ident.sym.to_string();
232-
if is_starts_with_uppercase(name.as_str()) {
233-
if self.taro_components.contains(&name) {
234-
self.jsx_record.insert(SpanKey(jsx.span), element);
235-
}
236-
} else {
232+
// if is_starts_with_uppercase(name.as_str()) {
233+
// if self.taro_components.contains(&name) {
234+
// self.jsx_record.insert(SpanKey(jsx.span), element);
235+
// }
236+
// } else {
237237
self.jsx_record.insert(SpanKey(jsx.span), element);
238-
}
238+
// }
239239
}
240240
jsx.visit_all_children_with(self);
241241
}
@@ -263,15 +263,15 @@ impl<'a> VisitAll for AstVisitor<'a> {
263263
_ => "".to_string()
264264
};
265265

266-
if is_starts_with_uppercase(name.as_str()) {
267-
if self.taro_components.contains(&name) {
268-
self.jsx_record.insert(SpanKey(call_expr.span), element);
269-
}
270-
} else {
266+
// if is_starts_with_uppercase(name.as_str()) {
267+
// if self.taro_components.contains(&name) {
268+
// self.jsx_record.insert(SpanKey(call_expr.span), element);
269+
// }
270+
// } else {
271271
if !name.is_empty() {
272272
self.jsx_record.insert(SpanKey(call_expr.span), element);
273273
}
274-
}
274+
// }
275275
}
276276
}
277277
}

0 commit comments

Comments
 (0)