我已经创建了添加汽车功能,可以在其中成功提交。我调用了ajax请求以获取拖放区表单,并将其添加到引导模态中。但是放置区不起作用。它被称为,但是选择和放置功能不起作用。
Dropzone.options.mDropzoneAdd = {
paramName: "file",
maxFiles: 10,
maxFilesize: 10,
addRemoveLinks: true,
acceptedFiles: "image/*,application/pdf,.psd",
accept: function (e, o) {
o();
if(e.status) toastr.success("Car Image Added Successfully");
this.on("success", function(file, responseText) {
$('.dz-details .dz-filename span').each(function(index) {
if($(this).html() == file.upload.filename) {
$(this).parents('.dz-preview.dz-processing').attr('id', responseText.data.id);
$(this).html(responseText.data.name);
}
});
});
}
和Ajax通话:
$.ajax({
url: '/admin/getaddcarimage/' + data.carData.car_id,
type: 'GET',
success: function (data) {
$('#add_car_images').html(data);
}
});