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);


未闻花名
原文地址:https://www.cnblogs.com/duokexiao/p/12438800.html