user-examples-section.md
基本信息
- 类型: React Client 组件
- 路径:
./src/components/prompts/user-examples-section.tsx
功能描述
用户示例区块组件,用于展示用户提交的Prompt使用示例。支持图片和视频类型的示例展示,集成添加示例功能。
导出内容
UserExamplesSection- 主组件UserExamplesSectionProps- Props接口
Props 接口
| 属性 | 类型 | 说明 |
|---|---|---|
| mediaUrl | string | 主媒体URL |
| title | string | Prompt标题 |
| type | string | Prompt类型 |
| promptId | string | Prompt ID |
| isLoggedIn | boolean | 用户是否登录 |
| currentUserId | string | 当前用户ID(可选) |
| isAdmin | boolean | 是否管理员(可选) |
依赖
react- React核心./media-preview-with-examples- 媒体预览组件./add-example-dialog- 添加示例弹窗
相关组件
MediaPreviewWithExamples- 媒体预览和示例展示AddExampleDialog- 添加示例弹窗PromptDetail- Prompt详情页集成