Uploader

Uploader上传组件。

  1. <div class="weui-uploader">
  2. <div class="weui-uploader__hd">
  3. <p class="weui-uploader__title">图片上传</p>
  4. <div class="weui-uploader__info">0/2</div>
  5. </div>
  6. <div class="weui-uploader__bd">
  7. <ul class="weui-uploader__files" id="uploaderFiles">
  8. <li class="weui-uploader__file" style="background-image:url(./images/pic_160.png)"></li>
  9. <li class="weui-uploader__file" style="background-image:url(./images/pic_160.png)"></li>
  10. <li class="weui-uploader__file" style="background-image:url(./images/pic_160.png)"></li>
  11. <li class="weui-uploader__file weui-uploader__file_status" style="background-image:url(./images/pic_160.png)">
  12. <div class="weui-uploader__file-content">
  13. <i class="weui-icon-warn"></i>
  14. </div>
  15. </li>
  16. <li class="weui-uploader__file weui-uploader__file_status" style="background-image:url(./images/pic_160.png)">
  17. <div class="weui-uploader__file-content">50%</div>
  18. </li>
  19. </ul>
  20. <div class="weui-uploader__input-box">
  21. <input id="uploaderInput" class="weui-uploader__input" type="file" accept="image/*" multiple />
  22. </div>
  23. </div>
  24. </div>

原文: https://github.com/Tencent/weui/wiki/Uploader