mirror of https://github.com/layui/layui
更新 upload 用例
parent
7ee1d8aedf
commit
17adc4346f
|
@ -98,7 +98,7 @@ layui.use(['upload', 'element'], function(){
|
||||||
|
|
||||||
var uploadInst = upload.render({
|
var uploadInst = upload.render({
|
||||||
elem: '#test1',
|
elem: '#test1',
|
||||||
url: 'https://httpbin.org/post',
|
url: '',
|
||||||
// size: 2000, //限制文件大小,单位 KB
|
// size: 2000, //限制文件大小,单位 KB
|
||||||
// accept: 'file',
|
// accept: 'file',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
|
@ -161,7 +161,7 @@ layui.use(['upload', 'element'], function(){
|
||||||
// 演示多图片上传
|
// 演示多图片上传
|
||||||
upload.render({
|
upload.render({
|
||||||
elem: '#test2',
|
elem: '#test2',
|
||||||
url: 'https://httpbin.org/post',
|
url: '',
|
||||||
multiple: true, // 多文件
|
multiple: true, // 多文件
|
||||||
unified: true, // 一起上传 --- 2.8.8+
|
unified: true, // 一起上传 --- 2.8.8+
|
||||||
accept: 'images',
|
accept: 'images',
|
||||||
|
@ -188,7 +188,7 @@ layui.use(['upload', 'element'], function(){
|
||||||
var demoListView = $('#demoList');
|
var demoListView = $('#demoList');
|
||||||
var uploadListIns = upload.render({
|
var uploadListIns = upload.render({
|
||||||
elem: '#testList',
|
elem: '#testList',
|
||||||
url: 'https://httpbin.org/post',
|
url: '',
|
||||||
accept: 'file',
|
accept: 'file',
|
||||||
multiple: true,
|
multiple: true,
|
||||||
number: 5,
|
number: 5,
|
||||||
|
@ -328,7 +328,7 @@ layui.use(['upload', 'element'], function(){
|
||||||
|
|
||||||
upload.render({
|
upload.render({
|
||||||
elem: '#test8',
|
elem: '#test8',
|
||||||
url: 'https://httpbin.org/post',
|
url: '',
|
||||||
done: function(res){
|
done: function(res){
|
||||||
console.log(res);
|
console.log(res);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue