index.jsx 727 Bytes
import React from 'react';


const Filedetail = ({ files }) => {
    return <div style={{ display: "flex", flexFlow: "row wrap", width: "100%" }}>
        {
            files && typeof (files) == "string" ?
                <a href={files} download={files} style={{ margin: '0 20px 0 0', display: 'block' }}>{urlName ? urlName : "下载"}</a>
                : files && Array.isArray(files) && files?.length ?
                    files?.map(el => {
                        return <a title={el.name} key={el.url} href={el.url} download={el.name} style={{ margin: '0 20px 0 0', display: 'block' }}>{el.name}</a>
                    })
                    :
                    "-"
        }
    </div>
}
export default Filedetail;