Skip to content

Commit

Permalink
perf(setData): 减少setData数据量(修改遗漏点)
Browse files Browse the repository at this point in the history
  • Loading branch information
yushijie1 committed Sep 25, 2024
1 parent 70d4697 commit 3a03863
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion crates/swc_plugin_compile_mode/src/transform_harmony.rs
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ impl TransformVisitor {
Expr::Lit(_) => {
// {condition1 && 'Hello'} 在预处理时会变成 {condition1 ? 'Hello' : "compileIgnore"}
// 而普通文本三元则会被 block 标签包裹,因此处理后只有上述情况会存在 lit 类型的表达式
// 由于这种情况没有办法使用 wx:if 来处理,需要特殊处理成 {{i.cn[3].v==="compileIgnore"?"":i.cn[3].v}} 的形式
// 由于这种情况没有办法使用 wx:if 来处理,需要特殊处理成 {{i.c[3].v==="compileIgnore"?"":i.c[3].v}} 的形式
let current_path = self.get_current_node_path();

self.component_set.insert(TEXT_TAG.to_string());
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const TARO_TEMPLATES_f0t0 = '<template name="tmpl_0_f0t0"><view><view hover-class="{{xs.b(i.cn[0].p1,\'none\')}}"></view></view></template>';
const TARO_TEMPLATES_f0t0 = '<template name="tmpl_0_f0t0"><view><view hover-class="{{xs.b(i.c[0].p1,\'none\')}}"></view></view></template>';
function Index() {
return <View compileMode="f0t0">

Expand Down
2 changes: 1 addition & 1 deletion packages/taro-cli-convertor/__tests__/data/fileData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ export const PLUGIN_FILE_DATA = {
</text>
<button bindtap="goToMiniprogramPage">跳转到小程序页面</button>
<button bindtap="goToPluginPage">跳转到插件页面</button>
<component1>n</component1>
<component1>nn</component1>
`,
'/plugin/pages/index/index.js': `
Page({
Expand Down

0 comments on commit 3a03863

Please sign in to comment.