mirror of https://github.com/layui/layui
剔除 upload 文档中的 httpbin 模拟接口
parent
2606dfabcd
commit
e8ce00af96
|
@ -15,7 +15,7 @@ layui.use(function(){
|
|||
// 渲染
|
||||
upload.render({
|
||||
elem: '#ID-upload-demo-drag',
|
||||
url: 'https://httpbin.org/post', // 此处用的是第三方的 http 请求演示,实际使用时改成您自己的上传接口即可。
|
||||
url: '', // 实际使用时改成您自己的上传接口即可。
|
||||
done: function(res){
|
||||
layer.msg('上传成功');
|
||||
$('#ID-upload-demo-preview').removeClass('layui-hide')
|
||||
|
@ -24,4 +24,4 @@ layui.use(function(){
|
|||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
|
|
|
@ -31,7 +31,7 @@ layui.use(function(){
|
|||
var uploadListIns = upload.render({
|
||||
elem: '#ID-upload-demo-files',
|
||||
elemList: $('#ID-upload-demo-files-list'), // 列表元素对象
|
||||
url: 'https://httpbin.org/post', // 此处用的是第三方的 http 请求演示,实际使用时改成您自己的上传接口即可。
|
||||
url: '', // 实际使用时改成您自己的上传接口即可。
|
||||
accept: 'file',
|
||||
multiple: true,
|
||||
number: 3,
|
||||
|
@ -96,4 +96,4 @@ layui.use(function(){
|
|||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
|
|
|
@ -32,7 +32,7 @@ layui.use(function(){
|
|||
// 单图片上传
|
||||
var uploadInst = upload.render({
|
||||
elem: '#ID-upload-demo-btn',
|
||||
url: 'https://httpbin.org/post', // 此处用的是第三方的 http 请求演示,实际使用时改成您自己的上传接口即可。
|
||||
url: '', // 实际使用时改成您自己的上传接口即可。
|
||||
before: function(obj){
|
||||
// 预读本地文件示例,不支持ie8
|
||||
obj.preview(function(index, file, result){
|
||||
|
@ -71,7 +71,7 @@ layui.use(function(){
|
|||
// 多图片上传
|
||||
upload.render({
|
||||
elem: '#ID-upload-demo-btn-2',
|
||||
url: 'https://httpbin.org/post', // 此处用的是第三方的 http 请求演示,实际使用时改成您自己的上传接口即可。
|
||||
url: '', // 实际使用时改成您自己的上传接口即可。
|
||||
multiple: true,
|
||||
before: function(obj){
|
||||
// 预读本地文件示例,不支持ie8
|
||||
|
@ -84,4 +84,4 @@ layui.use(function(){
|
|||
// …
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue