Prompts提示集
使用import{ Prompts }from"@ant-design/x"; |
使用import{ Prompts }from"@ant-design/x"; |
Prompts 组件用于显示一组与当前上下文相关的预定义的问题或建议。
Got any sparks for a new project?
Help me understand the background of this topic.
How can I work faster and better?
Why do not ants get sick? Because they have tiny ant-bodies!
How to solve common issues? Share some tips!
What are some tricks for getting tasks done?
How to rest effectively after long hours of work?
How to rest effectively after long hours of work?
What are the secrets to maintaining a positive mindset?
How to stay calm under immense pressure?
Got any sparks for a new project?
Help me understand the background of this topic.
How to solve common issues? Share some tips!
How can I work faster and better?
What are some tricks for getting tasks done?
How to rest effectively after long hours of work?
What are the secrets to maintaining a positive mindset?
How to stay calm under immense pressure?
Got any sparks for a new project?
Help me understand the background of this topic.
How can I work faster and better?
Why do not ants get sick? Because they have tiny ant-bodies!
How to solve common issues? Share some tips!
What are you interested in?
What's new in X?
What's AGI?
Where is the doc?
How to design a good product?
Know the well
Set the AI role
Express the feeling
How to start a new project?
Install Ant Design X
Play on the web without installing
通用属性参考:通用属性
属性 | 说明 | 类型 | 默认值 | 版本 |
---|---|---|---|---|
classNames | 自定义样式类名,用于各个提示项的不同部分 | Record<SemanticType, string> | - | - |
items | 包含多个提示项的列表 | PromptProps[] | - | - |
prefixCls | 样式类名的前缀 | string | - | - |
rootClassName | 根节点的样式类名 | string | - | - |
styles | 自定义样式,用于各个提示项的不同部分 | Record<SemanticType, React.CSSProperties> | - | - |
title | 显示在提示列表顶部的标题 | React.ReactNode | - | - |
vertical | 设置为 true 时, 提示列表将垂直排列 | boolean | false | - |
wrap | 设置为 true 时, 提示列表将自动换行 | boolean | false | - |
onItemClick | 提示项被点击时的回调函数 | (info: { data: PromptProps }) => void | - | - |
type SemanticType = 'list' | 'item' | 'content' | 'title' | 'subList' | 'subItem';
属性 | 说明 | 类型 | 默认值 | 版本 |
---|---|---|---|---|
children | 嵌套的子提示项 | PromptProps[] | - | - |
description | 提示描述提供额外的信息 | React.ReactNode | - | - |
disabled | 设置为 true 时禁用点击事件 | boolean | false | - |
icon | 提示图标显示在提示项的左侧 | React.ReactNode | - | - |
key | 唯一标识用于区分每个提示项 | string | - | - |
label | 提示标签显示提示的主要内容 | React.ReactNode | - | - |
Got any sparks for a new project?
Help me understand the background of this topic.
How can I work faster and better?
What sparks your creativity?
How do you get inspired?
What is the background of this topic?
Why is this important?