console.log('open')}
onSwipeableClose={() => console.log('close')}>
Simple example: left and right buttons
</View>
);
};
export default BasicSwipeActionExample;`
🔴 版本
8.19.2
💻 运行环境
Android
⚫️ npx react-native info输出信息
System:
OS: Windows 11 10.0.22621
CPU: (16) x64 12th Gen Intel(R) Core(TM) i5-12500H
Memory: 2.10 GB / 15.73 GB
Binaries:
Node:
version: 18.12.1
path: D:\nodejs\node.EXE
Yarn: Not Found
npm:
version: 10.7.0
path: E:\SmartWater\SmartWaterAndroidApp\node_modules.bin\npm.CMD
Watchman: Not Found
SDKs:
Android SDK: Not Found
Windows SDK: Not Found
IDEs:
Android Studio: Not Found
Visual Studio:
17.9.34622.214 (Visual Studio Community 2022)
Languages:
Java: 17.0.11
Ruby: Not Found
npmPackages:
"@react-native-community/cli": Not Found
react:
installed: 18.2.0
wanted: 18.2.0
react-native:
installed: 0.74.0
wanted: 0.74.0
react-native-windows: Not Found
npmGlobalPackages:
"react-native": Not Found
Android:
hermesEnabled: true
newArchEnabled: false
iOS:
hermesEnabled: Not found
newArchEnabled: Not found
💬 前提强调
🙋 描述详情/重现步骤
我想要使用SwipeAction组件,添加滑动功能,但是运行报错TypeError: Cannot read property 'RectButton' of undefined 下面是我的代码: `import React from 'react'; import {View} from 'react-native'; import {List, SwipeAction} from '@ant-design/react-native';
const BasicSwipeActionExample = () => { const right = [ { text: 'More', onPress: () => console.log('more'), backgroundColor: 'orange', color: 'white', }, { text: 'Delete', onPress: () => console.log('delete'), backgroundColor: 'red', color: 'white', }, ];
const left = [ { text: 'Read', onPress: () => console.log('read'), backgroundColor: 'blue', color: 'white', }, { text: 'Reply', onPress: () => console.log('reply'), backgroundColor: 'green', color: 'white', }, ];
return ( <View style={{paddingTop: 30}}>
); };
export default BasicSwipeActionExample;`
🔴 版本
8.19.2
💻 运行环境
Android
⚫️
npx react-native info
输出信息System: OS: Windows 11 10.0.22621 CPU: (16) x64 12th Gen Intel(R) Core(TM) i5-12500H Memory: 2.10 GB / 15.73 GB Binaries: Node: version: 18.12.1 path: D:\nodejs\node.EXE Yarn: Not Found npm: version: 10.7.0 path: E:\SmartWater\SmartWaterAndroidApp\node_modules.bin\npm.CMD Watchman: Not Found SDKs: Android SDK: Not Found Windows SDK: Not Found IDEs: Android Studio: Not Found Visual Studio:
info React Native v0.74.2 is now available (your project is running on v0.74.0). info Changelog: https://github.com/facebook/react-native/releases/tag/v0.74.2 info Diff: https://react-native-community.github.io/upgrade-helper/?from=0.74.0 info For more info, check out "https://reactnative.dev/docs/upgrading?os=windows".
补充说明
No response