import React, { useState, useEffect, useCallback, memo } from 'react'; import { Select, Table, Button, Modal, message, Card, Form, DatePicker } from 'antd'; import { Menu } from '../service'; export interface AddOrEditMenuProps { visible: boolean; menu: Menu | null; onClose: () => void; onConfirm: (obj: any) => void; list: any[] } const SubDtrict: React.FC<any> = (props: AddOrEditMenuProps) => { const { menu, visible } = props const onOk = useCallback(() => { // form.validateFields().then(res => { // const values = res as AddOrEditMenuFormProps; // const info: any = { // ...menu, // ...values, // }; // const flag = props.list.find((item)=>{ // return item.styleId == info.styleTypeId.value // }) // if(flag){ // message.warning('此尺码已存在!') // }else{ // values.list = props.list // props.onConfirm({...values}) // } // }); }, []); return ( <Modal maskClosable={false} visible={visible} title={`分包原则`} onCancel={props.onClose} onOk={onOk}> <p>Some contents...</p> <p>Some contents...</p> <p>Some contents...</p> </Modal> ) } export default SubDtrict