Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

百度小程序 flex 布局失效 #7920

Closed
Discreater opened this issue Oct 26, 2020 · 2 comments
Closed

百度小程序 flex 布局失效 #7920

Discreater opened this issue Oct 26, 2020 · 2 comments
Labels
duplicate This issue or pull request already exists

Comments

@Discreater
Copy link

相关平台

百度小程序

复现仓库

https://github.com/Discreater/taro-flex-test
小程序基础库: 3.210.115
使用框架: React

复现步骤

  1. taro init 创建项目
  2. index 页面改为如下代码,完整代码见上面的复现仓库
    <View className='index'>
        <Text>Hello world!</Text>
        <View style={{display: 'flex'}}>
          <View style={{backgroundColor: "green", flex: 1}}>🤷‍♀️</View>
          <View style={{backgroundColor: "purple", flex: 1}}>🤷‍♂️</View>
          <View style={{backgroundColor: "yellow", flex: 1}}>👀</View>
        </View>
      </View>
  3. 分别编译到百度小程序和微信小程序

期望结果

  1. 编译到微信小程序中的效果正常
    image

  2. 百度小程序原生开发正常

  • 代码
    <view style="display:flex;">
        <view style="flex:1;background-color:green;">🤷‍♀️</view>
        <view style="flex:1;background-color:purple;">🤷‍♂️</view>
        <view style="flex:1;background-color:yellow;">👀</view>
    </view>
  • 效果
    image

实际结果

taro编译到百度小程序中的样式出现问题
image

环境信息

� Taro v3.0.15


  Taro CLI 3.0.15 environment info:
    System:
      OS: Windows 10
    Binaries:
      Node: 14.11.0 - D:\ProgramGreen\nvm-noinstall\v14.11.0\node.EXE
      Yarn: 1.22.10 - D:\ProgramGreen\nvm-noinstall\v14.11.0\yarn.CMD
      npm: 6.14.8 - D:\ProgramGreen\nvm-noinstall\v14.11.0\npm.CMD
@Chen-jj
Copy link
Contributor

Chen-jj commented Oct 26, 2020

Duplicate of #6015

@Chen-jj Chen-jj marked this as a duplicate of #6015 Oct 26, 2020
@Chen-jj Chen-jj closed this as completed Oct 26, 2020
@Chen-jj Chen-jj added the duplicate This issue or pull request already exists label Oct 26, 2020
@axinjs
Copy link

axinjs commented Mar 5, 2021

3.1.1 最近升级了 百度也是不支持, 然后.... 项目上百处flex吧...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants