javascript - How to upload images to vue on the mobile phone
PHP中文网
PHP中文网 2017-07-05 11:01:18
0
3
3426

is an input. After clicking it, you can open the gallery and select the picture I want. After that, I can get the picture address he selected and pass the data to the interface. I can write it myself, but I don’t know how to accept the picture address he selected. I hope God can tell me how to write

<template>
 <input accept="image/*" type="file" >、
</template>

 export default {
    data{
        retrun{
        }
    },
    mounted{
    
    },
    
    methods{
    //在这里获取到上传的图片就可以
    }
}
PHP中文网
PHP中文网

认证高级PHP讲师

reply all(3)
巴扎黑

Can you write native JS?

typecho

Use Baidu’s plug-in webuploader

世界只因有你

https://github.com/ElemeFE/el...

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template