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

AtTabsPane 在 Taro UI 2.0.1 及以上版本,内容不会换行 #483

Closed
Garfield550 opened this issue Mar 19, 2019 · 3 comments
Closed

Comments

@Garfield550
Copy link
Collaborator

Taro UI 版本信息

2.0.2

问题描述

该问题在 #429 被提出过,我尝试按照 #429 (comment) 里的提示,在 View 上加 word-break: break-all; 也没有用

AtTabsPane 在 Taro UI 2.0.1 及以上版本内容不会换行

2.0.0 的表现
image

2.0.1 以上的表现
image

复现步骤

  1. 使用 taro init 创建默认模版项目
  2. 添加 taro-ui
  3. https://taro-ui.aotu.io/#/docs/tabs 的示例粘贴进去
  4. 将 View 组件的内容替换成多行文本

复现代码

参见我的 repo test-taro-ui-tab-panel

branch master 为 taro-ui 2.0.2 版本
branch taro-ui-2.0.1 为 taro-ui 2.0.1 版本
branch taro-ui-2.0.0 为 taro-ui 2.0.0 版本
image

报错信息

无错误信息

系统信息

  Taro CLI 1.2.20 environment info:
    System:
      OS: macOS 10.14.3
      Shell: 5.3 - /bin/zsh
    Binaries:
      Node: 11.11.0
      Yarn: 1.13.0
      npm: 6.7.0
    npmPackages:
      @tarojs/cli: ^1.2.20 => 1.2.20 
      @tarojs/components: 1.2.20 => 1.2.20 
      @tarojs/plugin-babel: 1.2.20 => 1.2.20 
      @tarojs/plugin-csso: 1.2.20 => 1.2.20 
      @tarojs/plugin-sass: 1.2.20 => 1.2.20 
      @tarojs/plugin-uglifyjs: 1.2.20 => 1.2.20 
      @tarojs/router: 1.2.20 => 1.2.20 
      @tarojs/taro: 1.2.20 => 1.2.20 
      @tarojs/taro-alipay: 1.2.20 => 1.2.20 
      @tarojs/taro-h5: 1.2.20 => 1.2.20 
      @tarojs/taro-swan: 1.2.20 => 1.2.20 
      @tarojs/taro-tt: 1.2.20 => 1.2.20 
      @tarojs/taro-weapp: 1.2.20 => 1.2.20 
      @tarojs/webpack-runner: 1.2.20 => 1.2.20 
      eslint-config-taro: 1.2.20 => 1.2.20 
      eslint-plugin-taro: 1.2.20 => 1.2.20 
      nervjs: ^1.3.9 => 1.3.12 

补充信息

@Garfield550
Copy link
Collaborator Author

发现问题了,是 commit 39f88d6 引入的 bug
white-space: initial;
image

@Garfield550
Copy link
Collaborator Author

image

@Garfield550
Copy link
Collaborator Author

Garfield550 commented Mar 19, 2019

自行在 AtTabsPane 里的节点添加 white-space: initial; 可以解决问题,
我觉得有必要更新一下文档说明这个问题

image

@jimczj jimczj closed this as completed in dde1b82 Mar 22, 2019
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

No branches or pull requests

1 participant