C

MobileSwipeActions 移动端滑动操作

业务组件

移动端滑动操作 — 面向 ERP/企业场景的业务组件。

何时使用

需要移动端滑动操作功能时使用本组件。

代码示例

基础用法

tsx
import { SwipeActions } from "@chaos_team/chaos-ui/mobile"

export function Basic() {
return <SwipeActions />
}

API / Props

SwipeActions

PropTypeDefault说明
classNamestring自定义样式类名
onSwipeLeft() => void
onSwipeRight() => void
onSwipeUp() => void
onSwipeDown() => void
thresholdnumber80
disabledboolean是否禁用
leftAction{
labelstring标签文本
colorstring颜色主题
onClick() => void点击回调
iconReact.ReactNode图标元素
rightAction{
...restReact.ComponentProps<"div">透传 <div> 原生属性

注意事项

  • Client Component: 使用 "use client",依赖 React hooks/状态,需在客户端渲染。
  • 原生属性: 继承所有 <div> 原生 HTML 属性。

📘 完整交互式示例与控件属性请查看 Storybook 文档