mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-01-13 01:21:58 +00:00
Merge branch hotfix/code-generator-condition-expr-optimize into release/1.0.0
Title: fix: 🐛 解决条件渲染场景下若条件值为 0 会误渲染出 0 的问题 RT Link: https://code.aone.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/codereview/4116856
This commit is contained in:
commit
4bc37a2fe3
@ -305,7 +305,7 @@ export function generateConditionReactCtrl(
|
||||
});
|
||||
|
||||
pieces.unshift({
|
||||
value: `(${value}) && (`,
|
||||
value: `!!(${value}) && (`,
|
||||
type: PIECE_TYPE.BEFORE,
|
||||
});
|
||||
|
||||
|
||||
@ -97,7 +97,7 @@ class Home$$Page extends Component {
|
||||
<View>
|
||||
<Text>=== User Info: ===</Text>
|
||||
</View>
|
||||
{__$$eval(() => __$$context.state.user) && (
|
||||
{!!__$$eval(() => __$$context.state.user) && (
|
||||
<View style={{ flexDirection: 'row' }}>
|
||||
<Image
|
||||
source={{ uri: __$$eval(() => __$$context.state.user.avatar) }}
|
||||
@ -153,7 +153,7 @@ class Home$$Page extends Component {
|
||||
</View>
|
||||
<View>
|
||||
<Text>操作提示:</Text>
|
||||
<Text>1. 点击会员名,可以弹出 Toast "Hello xxx!"</Text>
|
||||
<Text>1. 点击会员名,可以弹出 Toast "Hello xxx!"</Text>
|
||||
<Text>2. 点击订单,会记录点击的订单信息,并弹出 Toast 提示</Text>
|
||||
<Text>3. 最下面的【点击次数】,点一次应该加 1</Text>
|
||||
</View>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user