Welink ui组件介绍Uploader

举报
云会议运营喵大人 发表于 2020/02/19 19:01:52 2020/02/19
【摘要】 Uploader上传组件。Uploader UI 提供与WeLink规范一致的视图。 组件提供了两种上传类型、多个上传状态、删除图片的样式。上传类型:单张图片上传、多张图片上传。上传状态:正在等待上传、上传中、上传成功、上传失败。 <div class="weui-cells__title">样例1</div> <div class="weui-uploader"> ...

Uploader


上传组件。Uploader UI 提供与WeLink规范一致的视图。 组件提供了两种上传类型、多个上传状态、删除图片的样式。

  • 上传类型:单张图片上传、多张图片上传。

  • 上传状态:正在等待上传、上传中、上传成功、上传失败。

    <div class="weui-cells__title">样例1</div>
    <div class="weui-uploader">
        <div class="weui-uploader__hd">
            <p class="weui-uploader__title">上传图片</p>
            <div class="weui-uploader__info">0/2</div>
        </div>
        <div class="weui-uploader__bd">
            <ul class="weui-uploader__files" id="uploaderFiles">
                <li class="weui-uploader__file">
                    <i class="icon-16 icon-16-clearImage"></i>
                    <div class="weui-uploader__file-image" style="background-image:url(./images/pic_160.png)"></div>
                </li>
                <li class="weui-uploader__file">
                    <i class="icon-16 icon-16-clearImage"></i>
                    <div class="weui-uploader__file-image" style="background-image:url(./images/pic_160.png)"></div>
                </li>
                <li class="weui-uploader__file">
                    <i class="icon-16 icon-16-clearImage"></i>
                    <div class="weui-uploader__file-image" style="background-image:url(./images/pic_160.png)"></div>
                </li>
                <li class="weui-uploader__file weui-uploader__file_status">
                    <i class="icon-16 icon-16-clearImage"></i>
                    <div class="weui-uploader__file-image" style="background-image:url(./images/pic_160.png)">
                        <div class="weui-uploader__file-content">上传失败</div>
                    </div>
                </li>
                <li class="weui-uploader__file weui-uploader__file_status">
                    <i class="icon-16 icon-16-clearImage"></i>
                    <div class="weui-uploader__file-image" style="background-image:url(./images/pic_160.png)">
                        <div class="weui-uploader__file-content">50%</div>
                    </div>
                </li>
            </ul>
            <div class="weui-uploader__input-box">
                <input id="uploaderInput" class="weui-uploader__input" type="file" accept="image/*" multiple/>
            </div>
        </div>
    </div>
    <div class="weui-cells__title">样例2</div>
    <div class="weui-uploader">
        <div class="weui-uploader__hd">
            <p class="weui-uploader__title">附件</p>
        </div>
        <div class="weui-uploader__bd2">
            <ul>
                <li class="weui-uploader__attachment">
                    <div class="weui-uploader__attachment-type">
                        <i class="weui-icons-filetype icon-40-folder" data-type="pdf"></i>
                    </div>
                    <div class="weui-uploader__attachment_bd">
                        <p class="weui-uploader__attachment-title">便携工作站1.pdf</p>
                        <p class="weui-uploader__attachment-size">1.1M</p>
                    </div>
                </li>
                <li class="weui-uploader__attachment">
                    <div class="weui-uploader__attachment-type">
                        <i class="weui-icons-filetype icon-40-folder" data-type="ppt"></i>
                    </div>
                    <div class="weui-uploader__attachment_bd">
                        <p class="weui-uploader__attachment-title">2016年华为全联接大会,现场照....ppt</p>
                        <p class="weui-uploader__attachment-size">1.1M</p>
                    </div>
                </li>
            </ul>
        </div>
    </div>
    <br />
    <div class="weui-uploader">
        <div class="weui-uploader__hd">
            <p class="weui-uploader__title">附件</p>
            <div class="weui-uploader__info">0/2</div>
            <div class="weui-uploader__icon">
                <i class="icon-24 icon-24-uploadfile"></i>
            </div>
        </div>
        <div class="weui-uploader__bd2">
            <ul>
                <li class="weui-uploader__attachment">
                    <div class="weui-uploader__attachment-type">
                        <i class="weui-icons-filetype icon-40-folder" data-type="jpg"></i>
                    </div>
                    <div class="weui-uploader__attachment_bd">
                        <p class="weui-uploader__attachment-title">便携工作站1.JPG</p>
                        <p class="weui-uploader__attachment-size">1.1M</p>
                    </div>
                    <div class="weui-uploader__attachment-clear icon-24 icon-24-delete"></div>
                </li>
                <li class="weui-uploader__attachment">
                    <div class="weui-uploader__attachment-type">
                        <i class="weui-icons-filetype icon-40-folder"></i>
                    </div>
                    <div class="weui-uploader__attachment_bd">
                        <p class="weui-uploader__attachment-title">2016年华为全联接大会,现场照....</p>
                        <p class="weui-uploader__attachment-size">1.1M</p>
                        <i class="weui-uploader__file-progress">
                            <span class="weui-uploader__file-progress_percent" style="width: 60%;"></span>
                        </i>
                    </div>
                </li>
            </ul>
        </div>
    </div>

【版权声明】本文为华为云社区用户原创内容,未经允许不得转载,如需转载请自行联系原作者进行授权。如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱: cloudbbs@huaweicloud.com
  • 点赞
  • 收藏
  • 关注作者

评论(0

0/1000
抱歉,系统识别当前为高风险访问,暂不支持该操作

全部回复

上滑加载中

设置昵称

在此一键设置昵称,即可参与社区互动!

*长度不超过10个汉字或20个英文字符,设置后3个月内不可修改。

*长度不超过10个汉字或20个英文字符,设置后3个月内不可修改。