Element Ui 圖片預覽, 的使用


點擊圖片,彈出預覽彈窗,顯示圖片
首頁定義data:
1.data() {
  return {
  imgs: "",
  imgsVisible: false //默認彈窗屬性是隱藏的
    }
}
2.<el-dialog title="圖片查看" :visible.sync="imgsVisible" width="40%">
      <div style="  display: flex;justify-content: center;">
        <el-image :src="imgs" fit="scale-down" lazy style="margin: 20px auto;">
          <div slot="error" class="image-slot">
            <i class="el-icon-picture-outline"></i>
          </div>
        </el-image>
      </div>
      <div style=" display: flex;justify-content: center;">
        <el-button  @click="imgsVisible = false" type="primary" style="width: 6vw; ">確 定</el-button>
      </div>
 </el-dialog>


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM