reactnativecn / react-native-website

React Native 中文网
https://reactnative.cn
MIT License
216 stars 327 forks source link

[Text] iOS中,当文本有\n时 ,ellipsizeMode = 'tail'没有效果 #739

Closed guoyw closed 7 months ago

guoyw commented 10 months ago

代码

<View style={{flex: 1, paddingTop: 100}}>
      <Text numberOfLines={2}>{'Hello World\nHello World\nHello World'}</Text>
</View>

实际结果

image

想要的结果

image

问题

1、有没有办法修改? 2、如果没有,有没有其他组件可以替代?

参数

System:
    OS: macOS 12.6.7
    CPU: (8) x64 Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz
    Memory: 25.88 MB / 16.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 20.5.0 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 9.8.0 - /usr/local/bin/npm
    Watchman: Not Found
  Managers:
    CocoaPods: 1.12.1 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: DriverKit 22.2, iOS 16.2, macOS 13.1, tvOS 16.1, watchOS 9.1
    Android SDK: Not Found
  IDEs:
    Android Studio: 2022.2 AI-222.4459.24.2221.10121639
    Xcode: 14.2/14C18 - /usr/bin/xcodebuild
  Languages:
    Java: 17.0.6 - /usr/bin/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: 18.2.0 => 18.2.0 
    react-native: ^0.71.8 => 0.71.12 
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found
github-actions[bot] commented 7 months ago

👋 Hey there, it looks like there has been no activity on this issue in the last 90 days. Has the issue been fixed, or does it still require the community attention? This issue will be closed in the next 7 days if no further activity occurs. Thank you for your contributions.

github-actions[bot] commented 7 months ago

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.