在 before 回调里面 执行追加 隐藏input的操作,里面放你的参数 $('.layui-upload-file').after( '' );
在 before 回调里面 执行追加 隐藏input的操作,里面放你的参数 $('.layui-upload-file').after( '' );
这种方式只能传递静态参数,对于select的值好像获取不到
通过data传递的参数,是通过post传递的
layui.use('upload', function () {
var upload = layui.upload;
upload.render({
elem: '#uploadData',
url: 'uploadUrl',
accept: 'file', //普通文件
exts: 'xlsx',
data: {
'id': 123456
},
done: function (res) {
layer.msg(res.msg);
}
})
})