You've already forked DataMate
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:
@@ -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}>
|
||||
确定
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user