Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
3.5k views
in Technique[技术] by (71.8m points)

如何修改el-upload组件的多张上传图片垂直滚动显示?

已在.el-upload-list修改添加样式,无效

<style scoped>
>>> .el-upload-list{
    height: 126px;
    flex-wrap: wrap;
    overflow-y: auto;
    }
</style>
<el-upload action="#" list-type="picture-card" :auto-upload="false">
    <i slot="default" class="el-icon-plus"></i>
    <div slot="file" slot-scope="{file}">
        <img
        class="el-upload-list__item-thumbnail"
        :src="file.url" alt=""
      >
  <span class="el-upload-list__item-actions">
    <span
      class="el-upload-list__item-preview"
      @click="handlePictureCardPreview(file)"
    >
      <i class="el-icon-zoom-in"></i>
    </span>
    <span
      v-if="!disabled"
      class="el-upload-list__item-delete"
      @click="handleDownload(file)"
    >
      <i class="el-icon-download"></i>
    </span>
    <span
      v-if="!disabled"
      class="el-upload-list__item-delete"
      @click="handleRemove(file)"
    >
      <i class="el-icon-delete"></i>
    </span>
  </span>
</div>
    </el-upload>
<el-dialog :visible.sync="dialogVisible">
    <img width="100%" :src="dialogImageUrl" alt="">
</el-dialog>
![image.png](/img/bVcLszF)

如何修改让上传的图片滚动显示并显示滚动条?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

已解决,单独定义class样式,设置宽高,设置滚动条


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

56.5k users

...