原版 jasnybootstrap无法进行多张图片上传后的预览,所以借鉴了一些别的方法。


HTML

class="manage-file" id="manage-file" ref="form">

             type="hidden" name="pubprojectid" :value="project.id">

             class="form-group">

                 class="col-xs-3 control-label">项目图片

                 class="col-xs-8">

                     class="fileinput fileinput-new" data-provides="fileinput">

                        

                             class="btn btn-default btn-file">

                             class="fileinput-new">选择文件

                             class="fileinput-exists">修改文件

                             type="file" multiple name="files" @change="filesChange">

                            

                             @click="delFiles" class="btn btn-default fileinput-exists" data-dismiss="fileinput">删除文件

                        

                    

                     class="col-xs-12 padding-0">

                         class="fileinput" data-provides="fileinput" v-for="(fileItem, index) in files" style="margin-right: 5px; width: 150px;">

                             class="fileinput-new thumbnail" style="width: 150px;">

                                 class="file" style="width: 100%; margin-bottom: 0;">

                                    

                                     class="corner">

                                    

                                         :src="picSrc[index]" style="height:120px">