import React , { forwardRef , useImperativeHandle , createRef } from 'react' ; import Upload from '@/component/upload' ; import { getValueByRef } from '@/utils/functions' ; import styles from './styles.less' ; export default forwardRef ( ( { value , } , ref ) => { const uploadRefOne = createRef ( ) ; useImperativeHandle ( ref , ( ) => ( { getValue : ( ) => { const imgs = [ ] ; const img1 = getValueByRef ( uploadRefOne ) ; if ( img1 ) imgs . push ( img1 ) ; return imgs ; } , } ) ) ; return ( < div className = { styles . item } > < h1 > Screenshot < i className = "iconjietu iconfont" / > < /h1> < p > 站点截图 ， 建议pc端截图 < /p> < div className = { styles . con } > < div className = { styles . box } > < Upload text = "站点截图" ref = { uploadRefOne } value = { value && value [ 0 ] } /> < /div> { } < /div> < /div>); } ) ;