Skip to content
This repository has been archived by the owner on Mar 7, 2024. It is now read-only.

[BUG]微信小程序 - 状态修改无变化 #1096

Closed
limerence819 opened this issue Jun 18, 2020 · 0 comments · Fixed by #1100
Closed

[BUG]微信小程序 - 状态修改无变化 #1096

limerence819 opened this issue Jun 18, 2020 · 0 comments · Fixed by #1100
Labels
bug Something isn't working

Comments

@limerence819
Copy link

bug 描述
使用 remax/wechat 中的Picker,switch组件,修改状态成功后无显示变化。

复现步骤
image

期望结果
修改后文字变化发生变化。

复现代码

     const [checked, setChecked] = useState(false);
      //...other code
      <View style={{padding: '0rpx 30rpx', backgroundColor: "#FFF",border:'1rpx solid #F2F2F2'}}>
          <View className={styles.switchRole}>
            <View className={styles.roleTitle}><Text>当前角色</Text></View>
            <View>
              <Picker mode="selector" className={styles.filterItem} range={['角色1', '角色2']}
                      onChange={(e) => {
                        setChecked(e.detail.value == 0)
                        app.serCurrentRole(e.detail.value == 0);
                      }}>
                <Text className={styles.filterTitle}>{checked ? '角色1' : '角色2'}</Text>
                <Icon type={'triangledownfill'} size={'18rpx'} color={'#C1C1C1'}/>
              </Picker>
            </View>
          </View>
        </View>

版本信息:

  • remax 版本: 2.5.3
  • 手机型号 微信小程序开发工具模拟器
  • 小程序端 微信小程序
  • 小程序版本 2.10.3
  • 开发环境 mac OS

其他信息
remax 版本切回到2.4.0 ,结果正常

@limerence819 limerence819 added the bug Something isn't working label Jun 18, 2020
yesmeck pushed a commit that referenced this issue Jun 18, 2020
yesmeck pushed a commit that referenced this issue Jun 18, 2020
yesmeck pushed a commit that referenced this issue Jun 18, 2020
yesmeck pushed a commit that referenced this issue Jun 18, 2020
yesmeck added a commit that referenced this issue Jun 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant