Prompts 提示集
使用 |
文档 |
何时使用#
Prompts 组件用于显示一组与当前上下文相关的预定义的问题或建议。
代码演示 #
✨ Inspirational Sparks and Marvelous Tips
Ignite Your Creativity
Got any sparks for a new project?
Uncover Background Info
Help me understand the background of this topic.
Efficiency Boost Battle
How can I work faster and better?
Tell me a Joke
Why do not ants get sick? Because they have tiny ant-bodies!
Common Issue Solutions
How to solve common issues? Share some tips!
加载中
☕️ It's time to relax!
Task Completion Secrets
What are some tricks for getting tasks done?
Time for a Coffee Break
How to rest effectively after long hours of work?
加载中
🤔 You might also want to ask:
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?
加载中
🤔 You might also want to ask:
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?
加载中
Do you want?
Hot Topics
What are you interested in?
What's new in X?
What's AGI?
Where is the doc?
Design Guide
How to design a good product?
Know the well
Set the AI role
Express the feeling
Start Creating
How to start a new project?
Fast Start
Install Ant Design X
Online Playground
Play on the web without installing
加载中
API#
nx-prompts#
| Property | Description | Type | Default |
|---|---|---|---|
[nxItems] | 包含多个提示项的列表 | NxPrompt[] | - |
[nxTitle] | 显示在提示列表顶部的标题 | string | - |
[nxVertical] | 设置为 true 时, 提示列表将垂直排列 | boolean | false |
[nxWrap] | 设置为 true 时, 提示列表将自动换行 | boolean | false |
(nxItemClick) | 提示项被点击时的回调函数 | EventEmitter<{ data: PromptProps }> | - |
interfaces#
NxPrompt#
| Property | Description | Type | Default |
|---|---|---|---|
key | 唯一标识用于区分每个提示项 | string | - |
disabled | 设置为 true 时禁用点击事件 | boolean | false |
icon | 提示图标显示在提示项的左侧 | string | - |
label | 提示标签显示提示的主要内容 | string | - |
description | 提示描述提供额外的信息 | string | - |
children | 嵌套的子提示项 | NxPrompts[] | - |