'use client' import { useRef } from 'react' import cn from '@/utils/classnames' import { useTabSearchParams } from '@/hooks/use-tab-searchparams' import TabSliderNew from '@/app/components/base/tab-slider-new' import CorpusIndex from '@/app/components/skill/corpus' import IntentIndex from '@/app/components/skill/intent' import LogIndex from '@/app/components/skill/log' const SkillIndex = () => { const containerRef = useRef(null) const [activeTab, setActiveTab] = useTabSearchParams({ defaultTab: 'corpus', }) const options = [ { value: 'corpus', text: '训练语料' }, { value: 'intent', text: '意图识别' }, { value: 'log', text: '训练日志' }, ] return ( <>
{ setActiveTab(state) }} options={options} />
{ activeTab === 'corpus' && } { activeTab === 'intent' && } { activeTab === 'log' && }
) } SkillIndex.displayName = 'SkillIndex' export default SkillIndex