UNPKG

cnd-components-mcp

Version:

An MCP service for Cnd components query | 一个减少 Cnd 组件代码生成幻觉的 MCP 服务,包含系统提示词、组件文档、API 文档、代码示例和更新日志查询

21 lines 9.11 kB
步骤条常用于需要分步操作或展示信息的场景,用户可以清晰地知道当前操作的进程或所在环节。 | 参数 | 说明 | 类型 | 默认值 | 是否必填 | | -------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | -------- | -------- | | current | 当前步骤 | number | 0 | | | shape | 类型 | StepShape | 'circle' | | | direction | 展示方向 | StepDirection | 'hoz' | | | labelPlacement | 横向布局时的内容排列方式 | StepDirection | 'ver' | | | readOnly | 是否只读模式 | boolean | - | | | animation | 是否开启动效 | boolean | true | | | itemRender | 自定义渲染节点<br/><br/>**签名**:<br/>**参数**:<br/>*index*: 节点索引<br/>*status*: 节点状态<br/>*title*: 节点标题,仅在 `shape='circle'` 时会传递<br/>*content*: 节点内容,仅在 `shape='circle'` 时会传递<br/>**返回值**:<br/>节点的渲染结果 | (<br/> index: number,<br/> status: StepStatus,<br/> title?: ReactNode,<br/> content?: ReactNode<br/> ) => `React.ReactNode` | - | | | stretch | 宽度是否横向拉伸 | boolean | false | | | 参数 | 说明 | 类型 | 默认值 | 是否必填 | | ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | ------ | -------- | | status | 步骤的状态,如不传,会根据外层的 Step 的 current 属性生成 | StepStatus | - | | | title | 标题 | `React.ReactNode` | - | | | icon | 图标 | string | - | | | content | 内容填充,shape 为 arrow 时无效 | `React.ReactNode` | - | | | itemRender | StepItem 的自定义渲染,会覆盖父节点设置的 itemRender<br/><br/>**签名**:<br/>**参数**:<br/>*index*: 节点索引<br/>*status*: 节点状态<br/>*title*: 节点标题,仅在 `shape='circle'` 时会传递<br/>*content*: 节点内容,仅在 `shape='circle'` 时会传递<br/>**返回值**:<br/>节点的渲染结果 | (<br/> index: number,<br/> status: StepStatus,<br/> title?: `React.ReactNode`,<br/> content?: `React.ReactNode`<br/> ) => `React.ReactNode` | - | | | percent | 百分比 | number | - | | | disabled | 是否禁用 | boolean | - | | | onClick | 点击步骤时的回调<br/><br/>**签名**:<br/>**参数**:<br/>*index*: 节点索引 | (index: number) => unknown | - | |