diff --git a/web/src/components/doc/SlimTabBar.tsx b/web/src/components/doc/SlimTabBar.tsx index 252762b9..0d322fd5 100644 --- a/web/src/components/doc/SlimTabBar.tsx +++ b/web/src/components/doc/SlimTabBar.tsx @@ -92,7 +92,10 @@ export const SlimTabBar: React.FC = ({ }; }, []); - const getStatusDot = (state: DocLifecycleState) => { + const getStatusDot = (state: DocLifecycleState, isTemplateOnly?: boolean) => { + if (isTemplateOnly || state === 'template') { + return { color: '#0284c7', label: '初始模板' }; + } switch (state) { case 'approved': return { color: 'var(--success)', label: '已生效受控' }; @@ -149,7 +152,7 @@ export const SlimTabBar: React.FC = ({ }; const currentCatInfo = categoryConfig[activeCategory] || categoryConfig.workflow; - const docStatus = activeDoc ? getStatusDot(activeDoc.lifecycleState) : null; + const docStatus = activeDoc ? getStatusDot(activeDoc.lifecycleState, activeDoc.isTemplateOnly) : null; const isCompact = containerWidth < 460; return ( @@ -326,6 +329,22 @@ export const SlimTabBar: React.FC = ({ {activeDoc ? activeDoc.title : '请选择文档'} + {activeDoc?.isTemplateOnly && ( + + 模板 + + )} + @@ -362,7 +381,7 @@ export const SlimTabBar: React.FC = ({ ) : ( visibleTabs.map((doc) => { const isCur = doc.docId === activeDocId; - const st = getStatusDot(doc.lifecycleState); + const st = getStatusDot(doc.lifecycleState, doc.isTemplateOnly); return ( );