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