产品动态
产品公告
<ClickableonClickAction={{ type: "sys.go_to_url", payload: { url: "/profile" } }}padding="16px"radius="md"><Icon name="user" size="lg" /><Text value="查看个人资料" /></Clickable>

属性名 | 类型 | 描述 | 默认值 |
onClickAction | ActionConfig | 点击时触发的动作 | - |
disabled | boolean | 是否禁用组件(禁用后不响应点击,光标显示为 not-allowed) | false |
属性名 | 类型 | 描述 | 默认值 |
direction | "row" | "col" | 布局方向 | "row" |
children | ChatKitComponent[] | 子组件列表 | - |
align | Alignment | 交叉轴对齐方式 | - |
justify | Justification | 主轴对齐方式 | - |
wrap | "nowrap" | "wrap" | "wrap-reverse" | 换行方式 | "nowrap" |
flex | number | string | Flex 值 | - |
gap | number | string | 子元素间距 | - |
padding | number | string | Spacing | 内边距 | - |
border | number | Border | Borders | 边框配置 | - |
background | string | ThemeColor | 背景颜色 | - |
属性名 | 类型 | 描述 | 默认值 |
height | number | string | 高度 | - |
width | number | string | 宽度 | - |
size | number | string | 同时设置宽高 | - |
minHeight | number | string | 最小高度 | - |
minWidth | number | string | 最小宽度 | - |
minSize | number | string | 最小尺寸 | - |
maxHeight | number | string | 最大高度 | - |
maxWidth | number | string | 最大宽度 | - |
maxSize | number | string | 最大尺寸 | - |
aspectRatio | number | string | 宽高比 | - |
radius | RadiusValue | 圆角 | - |
margin | number | string | Spacing | 外边距 | - |
disabled 设置为 true 时,Clickable 组件会进入不可交互状态:not-allowed 的禁用状态。onClickAction。disabled 属性的子组件(如 Button、Input、Checkbox 等)都会被自动禁用。<Clickable disabled={true}onClickAction={{ type: "sys.go_to_url", payload: { url: "/profile" } }}padding="16px"radius="md"><Icon name="user" size="lg" /><Text value="查看个人资料" /></Clickable>
默认效果 | disabled 设置为 true 时效果 |
![]() | ![]() |
disable() 方法禁用整个 Widget 时,如果 Clickable 组件的 onClickAction 中配置了 alwaysEnabled: true,该 Clickable 组件将不会被禁用。<CardasForm={true}confirm={{ label: "提交", action: { type: "form.submit" } }}><Input name="username" required={true} /><Input name="email" required={true} /><ClickableonClickAction={{type: "dialog.close",alwaysEnabled: true}}><Button label="取消" color="secondary" /></Clickable></Card>
disable() 禁用整个表单:<ClickableonClickAction={{type: "help.show",alwaysEnabled: true}}><Icon name="circle-question" /><Text value="需要帮助?" /></Clickable>
alwaysEnabled 仅对通过父组件 disable() 方法传递的禁用状态生效。disabled: true,组件仍然会被禁用。alwaysEnabled 后,Clickable 及其所有子组件都不会被父组件禁用。文档反馈