batch-file-upload
v1.0.2
Published
vue upload img
Downloads
6
Readme
ali-oss-file-upload
###对plupload再封装 进行图片上传
举例
JS代码
let upload = new imgUpload({
id:'upload',//点击这个dom元素 进行上传图片操作
url:url,//服务器地址
imgLoadResult: function callBack(res) {
console.log('callback+++',res)
}//上传成功后 返回的图片地址
})
upload.init()//进行初始化
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<div id="upload" >上传图片</div>
</body>
<script src='/dist/main.bundle.js' type="text/javascript"></script>
<script src='main.js'>
</script>
</html>
##vue
import { imgUpload} from 'ali-oss-file-upload/dist/main.bundle.js'