UNPKG

cnd-components-mcp

Version:

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

50 lines (45 loc) 1.25 kB
## 示例 ```tsx import React from 'react'; import { Message, Button } from '@alicloud/console-components'; const showSuccess = () => Message.success('成功'); const showWarning = () => Message.warning('警告'); const showError = () => Message.error('错误'); const showNotice = () => Message.notice('通知'); const showHelp = () => Message.help('帮助'); const showLoading = () => Message.loading('加载'); export default () => { const style = { marginRight: 10, }; return ( <div> <Button onClick={showSuccess} style={style}> 成功 </Button> <Button onClick={showWarning} style={style}> 警告 </Button> <Button onClick={showError} style={style}> 错误 </Button> <Button onClick={showNotice} style={style}> 通知 </Button> <Button onClick={showHelp} style={style}> 帮助 </Button> <Button onClick={showLoading} style={style}> 加载 </Button> </div> ); }; export const meta = { title: '使用示例', describe: '通过增加closeable属性可以控制提示框是否可关闭。', }; ``` ## API ```tsx ```