新增: u-ppt Vue 3 在线演示工具初始版本
- 核心架构: Vue 3 + Vite + TypeScript,零运行时依赖(仅 Vue) - 编辑器: 幻灯片增删排序、元素拖拽八向缩放、双击编辑、12 种元素类型 (标题/正文/列表/数据/金句/图片/形状/图表/卡片/表格/代码/公式) - 图表: 8 种 SVG 自绘(柱状/条形/折线/面积/饼图/环形/雷达/进度) - 富文本: 结构化 segments(加粗/斜体/颜色/高亮/上下标/代码/链接) - AI 能力: 对话编辑、生成整套、润色本页、大纲→逐页生成、一键美化、AI 配图 - 会话绑定: 每份 PPT 独立会话,切换 PPT 自动切换对话历史 - 模板系统: 7 个内置版式 + 用户自存模板 - 演示模式: 全屏播放、键盘/鼠标/滚轮导航、入场动画 - 持久化: localStorage 存 deck/文库/会话/模板/配置 - 支持多服务商: 智谱/DeepSeek/通义/Kimi/豆包/OpenAI/Anthropic/Gemini/Groq/Ollama
This commit is contained in:
@@ -0,0 +1,105 @@
|
||||
/* =====================================================================
|
||||
* chat.css — AI 聊天面板、消息气泡、设置相关
|
||||
* AiPanel 根元素为 .panel-pane.ai-pane,布局在 editor.css 定义
|
||||
* ===================================================================== */
|
||||
|
||||
/* 快捷操作工具条 */
|
||||
.ai-actions {
|
||||
display: flex; flex-wrap: wrap; gap: 6px;
|
||||
padding: 10px 12px; margin: 0;
|
||||
border-bottom: 1px solid var(--ui-border, #e2e8f0);
|
||||
flex-shrink: 0; background: var(--ui-panel, #f8fafc);
|
||||
}
|
||||
.ai-action {
|
||||
height: 28px; padding: 0 10px;
|
||||
border: 1px solid var(--ui-border, #e2e8f0); background: #fff;
|
||||
color: var(--ui-text, #1e293b); border-radius: 5px;
|
||||
font-size: 12px; font-weight: 500; line-height: 1;
|
||||
cursor: pointer; transition: all .12s;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.ai-action:hover {
|
||||
border-color: var(--ui-primary, #4f46e5);
|
||||
color: var(--ui-primary, #4f46e5);
|
||||
background: var(--ui-primary-soft, rgba(79,70,229,.06));
|
||||
}
|
||||
.ai-action:disabled { opacity: .45; cursor: not-allowed; }
|
||||
.ai-action:disabled:hover { border-color: var(--ui-border, #e2e8f0); color: var(--ui-text, #1e293b); background: #fff; }
|
||||
/* 破坏性操作(清空)再轻一点 */
|
||||
.ai-action.ghost {
|
||||
border-color: transparent; background: transparent;
|
||||
color: var(--ui-muted, #64748b);
|
||||
}
|
||||
.ai-action.ghost:hover {
|
||||
border-color: transparent; background: transparent;
|
||||
color: var(--ui-danger, #e11d48);
|
||||
}
|
||||
|
||||
/* 选中元素提示条 */
|
||||
.selected-hint {
|
||||
display: flex; align-items: center; gap: .45em;
|
||||
padding: 7px 10px; margin: 0 2px 8px;
|
||||
background: var(--ui-primary-soft, rgba(79,70,229,.08));
|
||||
border: 1px solid var(--ui-primary, #4f46e5); border-radius: 6px;
|
||||
font-size: 12px; color: var(--ui-text, #1e293b);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.selected-hint-icon { color: var(--ui-primary, #4f46e5); font-weight: 700; }
|
||||
.selected-hint-text { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
|
||||
.selected-hint-flag { font-size: 11px; color: var(--ui-primary, #4f46e5); flex-shrink: 0; }
|
||||
|
||||
/* 消息列表 */
|
||||
.chat-messages {
|
||||
flex: 1; min-height: 0; overflow-y: auto;
|
||||
padding: 4px 2px; display: flex; flex-direction: column; gap: 12px;
|
||||
}
|
||||
.chat-empty {
|
||||
color: var(--ui-muted); font-size: 13px; text-align: center;
|
||||
padding: 28px 10px; line-height: 1.9;
|
||||
}
|
||||
.chat-empty b { color: var(--ui-text); }
|
||||
.msg { display: flex; }
|
||||
.msg.user { justify-content: flex-end; }
|
||||
.msg .bubble {
|
||||
max-width: 90%; padding: 9px 13px; border-radius: 14px;
|
||||
font-size: 13px; line-height: 1.65; word-break: break-word;
|
||||
}
|
||||
.msg.user .bubble { background: var(--ui-primary); color: #fff; border-bottom-right-radius: 4px; }
|
||||
.msg.ai .bubble { background: var(--ui-hover); color: var(--ui-text); border-bottom-left-radius: 4px; }
|
||||
.msg.system .bubble { background: transparent; color: var(--ui-muted); font-size: 12px; font-style: italic; }
|
||||
.msg.ai .bubble.error { background: #fff1f2; color: var(--ui-danger); }
|
||||
.msg.ai .bubble.success { background: #f0fdf4; color: var(--ui-success); }
|
||||
.msg .bubble .diff-tag { display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 99px; margin-bottom: 6px; background: rgba(5,150,105,.12); color: var(--ui-success); font-weight: 600; }
|
||||
|
||||
.msg .bubble .stream-text { white-space: pre-wrap; }
|
||||
|
||||
/* 消息中的代码块 */
|
||||
.msg .msg-code {
|
||||
margin: 6px 0; padding: 10px 12px;
|
||||
background: rgba(15,23,42,.06); border-radius: 8px;
|
||||
overflow-x: auto; max-width: 100%;
|
||||
font-size: 12px; line-height: 1.5;
|
||||
font-family: 'Consolas','Monaco','Courier New',monospace;
|
||||
}
|
||||
.msg.user .msg-code { background: rgba(255,255,255,.15); }
|
||||
.msg .msg-code code { font-family: inherit; white-space: pre; }
|
||||
/* JSON 语法着色 */
|
||||
.msg .msg-code .jk { color: #4f46e5; font-weight: 600; } /* key */
|
||||
.msg .msg-code .js { color: #059669; } /* string value */
|
||||
.msg .msg-code .jn { color: #d97706; } /* number */
|
||||
.msg .msg-code .jb { color: #e11d48; font-weight: 600; } /* boolean/null */
|
||||
|
||||
.cursor {
|
||||
display: inline-block; width: 7px; height: 1em;
|
||||
background: currentColor; vertical-align: -2px; margin-left: 2px;
|
||||
animation: blink 1s steps(2, start) infinite;
|
||||
}
|
||||
@keyframes blink { 50% { opacity: 0; } }
|
||||
|
||||
/* 输入栏 */
|
||||
.chat-input-bar {
|
||||
border-top: 1px solid var(--ui-border); padding-top: 10px; margin-top: 4px;
|
||||
display: flex; flex-direction: column; gap: 8px; flex-shrink: 0;
|
||||
}
|
||||
#chatInput { resize: none; line-height: 1.5; }
|
||||
.chat-input-bar .btns { display: flex; gap: 8px; justify-content: flex-end; }
|
||||
Reference in New Issue
Block a user