Upload files locally to generate a temporary url
<input type="file" name="file" accept="image/png, image/jpeg, image/jpg" @change="change" style="margin-top: 30px"/>
You can use URL.createObjectURL to generate a temporary url from the uploaded file
change() {
//生成的临时url
const url = URL.createObjectURL(document.querySelector('input[type=file]').files[0]);
this.recognize(url);
},