import { useEffect, useState } from "react"; import { Button, Row, Col, Modal, message, 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 { open: boolean; onSelected: (arr: any[], label: any[]) => void; onCancel: () => void; } export const SelectResource = (props: PropsInterface) => { const [refresh, setRefresh] = useState(true); const [tabKey, setTabKey] = useState(1); const [selectKeys, setSelectKeys] = useState([]); const [selectLabel, setSelectLabel] = useState([]); const items: TabsProps["items"] = [ { key: "1", label: `视频`, children: (
{ setSelectKeys(arr); setSelectLabel(label); }} />
), }, ]; const onChange = (key: string) => { setTabKey(Number(key)); }; return ( <> { setSelectKeys([]); props.onCancel(); }} open={props.open} width={800} maskClosable={false} onOk={() => props.onSelected(selectKeys, selectLabel)} > ); };