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

[Bug] SwipeAction #1348

Open
1 task done
Jhh910 opened this issue Jun 27, 2024 · 3 comments
Open
1 task done

[Bug] SwipeAction #1348

Jhh910 opened this issue Jun 27, 2024 · 3 comments
Labels

Comments

@Jhh910
Copy link

Jhh910 commented Jun 27, 2024

💬 前提强调

  • I have searched the issues of this repository and believe that this is not a duplicate.

🙋 描述详情/重现步骤

我想要使用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}}>

<SwipeAction
right={right}
left={left}
onSwipeableOpen={() => console.log('open')}
onSwipeableClose={() => console.log('close')}>
<List.Item extra="extra content">
Simple example: left and right buttons
</List.Item>



);
};

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

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

@Jhh910 Jhh910 added the Bug🐛 label Jun 27, 2024
@1uokun
Copy link
Collaborator

1uokun commented Jun 27, 2024

没有下载依赖

npm install react-native-gesture-handler

@Jhh910
Copy link
Author

Jhh910 commented Jun 27, 2024

没有下载依赖

npm install react-native-gesture-handler

image
下载了的

@1uokun
Copy link
Collaborator

1uokun commented Aug 9, 2024

[email protected] 试一下

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants