来自:https://github.com/ElemeFE/element/issues/3367#issuecomment-376402380 侵删

el-upload里面绑定一个占位class:

:class="{hide:hideUpload}"

data里面初始值:

hideUpload: false,
limitCount:1

onChange里面(添加文件、上传成功和上传失败时都会被调用的那个):

this.hideUpload = fileList.length >= this.limitCount;

handleRemove里面(删除文件被调用的那个):

this.hideUpload = fileList.length >= this.limitCount;

style,把scoped去掉(或者外部引入样式文件,主要目的是为了修改element-ui自带的样式)

<style>
.hide .el-upload--picture-card {
display: none;
}
</style>

最新文章

  1. 记一次log4j日志文件输出错误的解决
  2. C# HTTP上传文件
  3. LeetCode #303. Range Sum Query
  4. 0050 Linux VIM 命令
  5. SURF算法与源码分析、上
  6. Shell | grep with n following lines
  7. JS全局变量VAR和THIS
  8. C++类的大小
  9. jquery第一期:运行第一个jquery
  10. CSharp设计模式读书笔记(6):建造者模式(学习难度:★★★★☆,使用频率:★★☆☆☆)
  11. Collection和Map
  12. java 中 printf()语句的理解
  13. Storm入门(二)集群环境安装
  14. python基础概念(转)
  15. JavaScript判断苹果 iPhone X Series 机型
  16. jQuery汇总
  17. 80端口被占用 导致apach无法启动问题
  18. PGSQL 获取数据库大小以及表达小等的SQL
  19. Android Sensor——传感器
  20. GMM实战

热门文章

  1. flutter SnackBar 底部消息提示
  2. Sword cjson库函数使用
  3. matlab基本函数randperm end数组索引
  4. 报错:Sqoop2 Error message: Class not found JDBC Driver Class: com.mysql.jdbc.Driver
  5. Python - Django - 添加首页尾页上一页下一页
  6. AI佳作解读系列(六) - 生成对抗网络(GAN)综述精华
  7. jenkins安装插件一直不动
  8. Golang中的Map(集合)
  9. 13点睛Spring4.1-Spring EL
  10. linux如何找回已经删除的文件?lsof