Skip to content

fix(mp): 修复类名为变量时未能正确编译的Bug#5664

Merged
fxy060608 merged 2 commits intodevfrom
fix-vue2-dynamic-class-name
Jul 29, 2025
Merged

fix(mp): 修复类名为变量时未能正确编译的Bug#5664
fxy060608 merged 2 commits intodevfrom
fix-vue2-dynamic-class-name

Conversation

@chouchouji
Copy link
Copy Markdown
Member

@chouchouji chouchouji commented Jul 29, 2025

close #3101

测试代码

<view :class="{ [test]: true }">Hello {{ test }}</view>

问题产物

<view class="{{[(true)?'test':'']}}">{{"Hello "+test}}</view>

修复产物

<view class="{{[(true)?test:'']}}">{{"Hello "+test}}</view>

@chouchouji chouchouji force-pushed the fix-vue2-dynamic-class-name branch from 464599b to 7ecc859 Compare July 29, 2025 09:25
@fxy060608 fxy060608 merged commit c294ade into dev Jul 29, 2025
@chouchouji chouchouji deleted the fix-vue2-dynamic-class-name branch July 29, 2025 09:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants