Merge pull request #254 from SuanmoSuanyangTechnology/feature/prompt_zy

Feature/prompt zy
This commit is contained in:
yingzhao
2026-01-30 14:23:00 +08:00
committed by GitHub
17 changed files with 798 additions and 8 deletions

View File

@@ -19,6 +19,7 @@ interface RbMarkdownProps {
showHtmlComments?: boolean; // 是否显示 HTML 注释,默认为 false隐藏
editable?: boolean; // 是否可编辑,默认为 false
onContentChange?: (content: string) => void; // 内容变化回调
className?: string;
}
const components = {
@@ -98,6 +99,7 @@ const RbMarkdown: FC<RbMarkdownProps> = ({
showHtmlComments = false,
editable = false,
onContentChange,
className
}) => {
const [editContent, setEditContent] = useState(content)
const textareaRef = useRef<any>(null)
@@ -162,7 +164,7 @@ const RbMarkdown: FC<RbMarkdownProps> = ({
// 预览模式
return (
<div className="rb:relative" onKeyDown={handleKeyDown} tabIndex={0}>
<div className={`rb:relative ${className || ''}`} onKeyDown={handleKeyDown} tabIndex={0}>
<style>{`
.html-comment {
color: #999;

View File

@@ -42,6 +42,8 @@ import pricingIcon from '@/assets/images/menu/pricing.svg'
import pricingActiveIcon from '@/assets/images/menu/pricing_active.svg'
import spaceConfigIcon from '@/assets/images/menu/spaceConfig.svg'
import spaceConfigActiveIcon from '@/assets/images/menu/spaceConfig_active.svg'
import promptIcon from '@/assets/images/menu/prompt.svg'
import promptActiveIcon from '@/assets/images/menu/prompt_active.svg'
// 图标路径映射表
const iconPathMap: Record<string, string> = {
@@ -73,6 +75,8 @@ const iconPathMap: Record<string, string> = {
'pricingActive': pricingActiveIcon,
'spaceConfig': spaceConfigIcon,
'spaceConfigActive': spaceConfigActiveIcon,
'prompt': promptIcon,
'promptActive': promptActiveIcon,
};
const { Sider } = Layout;