refactor: 修复标签管理功能、优化数据选择项显示、屏蔽开发中功能 (#12)

* refactor: clean up tag management and dataset handling, update API endpoints

* feat: add showTime prop to DevelopmentInProgress component across multiple pages

* refactor: update component styles and improve layout with new utility classes
This commit is contained in:
chenghh-9609
2025-10-22 16:09:03 +08:00
committed by GitHub
parent 1c97afed7d
commit e8e2c1a96b
41 changed files with 224 additions and 238 deletions

View File

@@ -56,7 +56,7 @@ export default function DatasetCreate() {
</div>
{/* form */}
<div className="h-full flex flex-col flex-1 overflow-auto bg-white border-gray-200 rounded shadow-sm">
<div className="flex-overflow-auto border-card">
<div className="flex-1 p-6 overflow-auto">
<Form
form={form}
@@ -67,7 +67,7 @@ export default function DatasetCreate() {
<BasicInformation data={newDataset} setData={setNewDataset} />
</Form>
</div>
<div className="flex gap-2 justify-end p-6 border-t border-gray-200">
<div className="flex gap-2 justify-end p-6 border-top">
<Button onClick={() => navigate("/data/management")}></Button>
<Button type="primary" onClick={handleSubmit}>

View File

@@ -2,7 +2,6 @@ import RadioCard from "@/components/RadioCard";
import { Input, Select, Form } from "antd";
import { datasetTypes } from "../../dataset.const";
import { useEffect, useState } from "react";
import { mockPreparedTags } from "@/components/TagManagement";
import { queryDatasetTagsUsingGet } from "../../dataset.api";
export default function BasicInformation({
@@ -26,26 +25,11 @@ export default function BasicInformation({
const fetchTags = async () => {
try {
const { data } = await queryDatasetTagsUsingGet();
const preparedTags = mockPreparedTags.map((tag) => ({
label: tag.name,
value: tag.name,
}));
const customTags = data.map((tag) => ({
label: tag.name,
value: tag.name,
}));
setTagOptions([
{
label: <span></span>,
title: "prepared",
options: preparedTags,
},
{
label: <span></span>,
title: "custom",
options: customTags,
},
]);
setTagOptions(customTags);
} catch (error) {
console.error("Error fetching tags: ", error);
}