feat(web): Ontology support import & export;
docs(web): add comments to the src/views/Ontology directory
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
/*
|
||||
* @Author: ZhaoYing
|
||||
* @Date: 2026-02-03 14:10:24
|
||||
* @Last Modified by: ZhaoYing
|
||||
* @Last Modified time: 2026-02-03 14:10:56
|
||||
*/
|
||||
import { type FC, type ReactNode } from 'react';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import { Layout, Button } from 'antd';
|
||||
@@ -6,11 +12,23 @@ import logoutIcon from '@/assets/images/logout_hover.svg'
|
||||
|
||||
const { Header } = Layout;
|
||||
|
||||
/**
|
||||
* Props for PageHeader component
|
||||
*/
|
||||
interface ConfigHeaderProps {
|
||||
/** Page title/name */
|
||||
name?: string;
|
||||
/** Subtitle content displayed below the title */
|
||||
subTitle?: ReactNode | string;
|
||||
/** Extra content displayed on the right side */
|
||||
extra?: ReactNode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Page header component for ontology pages
|
||||
* Displays title, subtitle, back button and extra actions
|
||||
* @param props - Component props
|
||||
*/
|
||||
const PageHeader: FC<ConfigHeaderProps> = ({
|
||||
name,
|
||||
subTitle,
|
||||
@@ -19,6 +37,9 @@ const PageHeader: FC<ConfigHeaderProps> = ({
|
||||
const { t } = useTranslation();
|
||||
const navigate = useNavigate();
|
||||
|
||||
/**
|
||||
* Navigate back to previous page
|
||||
*/
|
||||
const goBack = () => {
|
||||
navigate(-1)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user