gpt4 book ai didi

javascript - React native 模块允许您复制/选择 View 中包含的文本

转载 作者:行者123 更新时间:2023-11-29 23:20:46 28 4
gpt4 key购买 nike

是否有允许您选择/复制 View 中包含的文本的模块?

a busy cat a busy cat

如果没有,是否有办法知道所有“文本”类型标签的数量并提取每个标签中包含的文本?

<View>
<Text>Text1</Text>
<Text>Text2</Text>
<Text>Text3</Text>
</View>

最佳答案

试试这个:

<Text selectable={true}>Text</Text>

它允许您选择特定标签“文本”中的文本,其操作可能取决于 react-native 的版本和使用的设备类型。

关于javascript - React native 模块允许您复制/选择 View 中包含的文本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50786839/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com