Why is the style different when uploading pictures on element?

chrome

<el-upload
  class="upload-demo"
  action="https://jsonplaceholder.typicode.com/posts/"
  :on-preview="handlePreview"
  :on-remove="handleRemove"
  :before-remove="beforeRemove"
  multiple
  :limit="3"
  :on-exceed="handleExceed"
  :file-list="fileList">
  <el-button size="small" type="primary"></el-button>
  <div slot="tip" class="el-upload__tip">jpg/png500kb</div>
</el-upload>
Oct.10,2021

if you say this official example,
http://element-cn.eleme.io/-sharp/.
has a style that you didn't add

.
.el-upload__input {
    display: none!important;
}

do not add scoped, if it is written in another style tag, it is best to add a class class name in front to avoid future css conflicts

Menu