You've already forked DataMate
refactor(DataManagement): 移除不必要的数据集类型过滤逻辑
- 删除了对数据集类型的过滤操作 - 移除了不再使用的 textDatasetTypeOptions 变量 - 简化了 BasicInformation 组件的数据传递逻辑 - 减少了代码冗余,提高了组件性能
This commit is contained in:
@@ -4,14 +4,9 @@ import { ArrowLeft } from "lucide-react";
|
||||
import { Button, Form, App } from "antd";
|
||||
import { Link, useLocation, useNavigate } from "react-router";
|
||||
import { createDatasetUsingPost } from "../dataset.api";
|
||||
import { datasetTypes } from "../dataset.const";
|
||||
import { DatasetType } from "../dataset.model";
|
||||
import BasicInformation from "./components/BasicInformation";
|
||||
|
||||
const textDatasetTypeOptions = datasetTypes.filter(
|
||||
(type) => type.value === DatasetType.TEXT
|
||||
);
|
||||
|
||||
export default function DatasetCreate() {
|
||||
const navigate = useNavigate();
|
||||
const location = useLocation();
|
||||
@@ -87,7 +82,6 @@ export default function DatasetCreate() {
|
||||
data={newDataset}
|
||||
setData={setNewDataset}
|
||||
hidden={["dataSource"]}
|
||||
datasetTypeOptions={textDatasetTypeOptions}
|
||||
/>
|
||||
</Form>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user