-
-
Notifications
You must be signed in to change notification settings - Fork 191
Open
Description
Which React Vant packages are impacted?
-
react-vant(React Vant core) -
react-vant-icons(React Vant Icon)
What version of React Vant are you using?
3.3.5
Reproduce live demo(codesandebox or stackblitz)?
No response
Descripition
刚开始可以滑动
- 如果此时不进行任何操作,直接点击按钮切换禁止状态,SwipeCell可以根据期望紧张滑动。
- 如何此时去操作SwipeCell进行滑动操作,然后点击按钮切换禁止状态,可以发现SwipeCell依旧可以滑动
"use client"
import { useState } from "react"
import { SwipeCell, Button, Cell, Toast } from "react-vant"
const page = () => {
const [disabled, setDisabled] = useState(false)
return (
<SwipeCell
disabled={disabled}
onOpen={() => Toast.info("打开")}
onClose={() => Toast.info("关闭")}
rightAction={
<Button style={{ height: "100%" }} square type='danger'>
删除
}
>
<Button
onClick={() => {
setDisabled(!disabled)
}}
>
{!disabled ? "点击禁止" : "点击允许"}
)
}
export default page
Metadata
Metadata
Assignees
Labels
No labels