我无法从项目框中删除上传图标。当我点击"发送"我想上传所有图片。按钮。 谢谢
var btns = '<input type="hidden" id= "<?= $csrf['name'] ?>" name="<?= $csrf['name'] ?>" value="<?= $csrf['hash'] ?>">';
$("#images").fileinput({
uploadExtraData: {<?= $csrf['name'] ?>: "<?= $csrf['hash'] ?>", id_specie: "<?= $specie[0]['id_specie'] ?>"},
deleteExtraData: {<?= $csrf['name'] ?>: "<?= $csrf['hash'] ?>", id_specie: "<?= $specie[0]['id_specie'] ?>"},
initialPreview: <?= $immagini ?>,
initialPreviewConfig: <?= $galleria_immagini ?>,
initialPreviewAsData: true,
showCaption: true,
showUpload: false,
showRemove: false,
previewFileType: "image",
removeLabel: "Elimina",
uploadLabel: "Carica",
overwriteInitial: false,
maxFileSize: 10240,
uploadUrl: '<?= base_url() ?>specie/do_upload',
initialCaption: "Carica le immagini",
uploadAsync: true,
maxFileCount: 10,
allowedFileExtensions: ['png', 'jpg' ]
});
$("#send").click(function () {
// $("#images").fileinput({'uploadUrl': '<?= base_url() ?>specie/do_upload'});
$("#images").fileinput("upload");
});
答案 0 :(得分:1)
language: 'en',
showCaption: true,
showPreview: true,
showRemove: true,
showUpload: false, // <------ just set this from true to false
showCancel: true,
showUploadedThumbs: true
如果这不起作用,请尝试: -
你可以用简单的方式做到这一点,也可以简单地写一个属性data-show-upload="false"
而且我也会工作!!
答案 1 :(得分:0)
<强>解强>
我添加了这个
.kv-file-upload{
color:#fff !important;
visibility: hidden !important;
}
backend\assets\css\colors.css
中的
答案 2 :(得分:0)
<script>
$("#images").fileinput({
fileActionSettings: {
showUpload: false,
});
</script>
答案 3 :(得分:0)
更好地使用:
fileActionSettings: {
showRemove: true,
showUpload: false, //This remove the upload button
showZoom: true,
showDrag: false
},