选择视频、课件组件重构

This commit is contained in:
unknown
2023-07-31 10:44:32 +08:00
parent 8e5c072634
commit 2ce6292f44
8 changed files with 247 additions and 306 deletions

View File

@@ -1,16 +1,9 @@
import { useEffect, useState } from "react";
import { Button, Row, Modal, message, Tabs } from "antd";
import { Row, Modal, Tabs } from "antd";
import styles from "./index.module.less";
import { UploadVideoSub } from "../../compenents";
import type { TabsProps } from "antd";
interface VideoItem {
id: number;
category_id: number;
name: string;
duration: number;
}
interface PropsInterface {
defaultKeys: any[];
open: boolean;
@@ -24,6 +17,10 @@ export const SelectResource = (props: PropsInterface) => {
const [selectKeys, setSelectKeys] = useState<any>([]);
const [selectVideos, setSelectVideos] = useState<any>([]);
useEffect(() => {
setRefresh(!refresh);
}, [props.open]);
const items: TabsProps["items"] = [
{
key: "1",