antDesign 中input如何使用ref获取内容


其他input使用ref,获取输入框内容为:

 

const image = this.refs.image.value;
console.log(image);

文件内容

const image_urls = this.refs.image_urls.files[0];
console.log(image_urls);

 

而antD中是这样的:

const image = this.refs.image.input.value;
console.log(image);

文件内容
const image_url = this.refs.image_url.input.files[0];
console.log(image_url);



免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM