裝包:
npx expo install expo-clipboard
?
import * as Clipboard from 'expo-clipboard'const handleCopy = async (text) => {await Clipboard.setStringAsync(text)Toast.show('復制成功', {duration: 3000,position: Toast.positions.CENTER,})}
參考鏈接:
https://docs.expo.dev/versions/latest/sdk/clipboard/
https://www.npmjs.com/package/expo-clipboard?
https://chat.xutongbao.top/
?