基础组件

WeUI 包含了大量常用的组件:按钮,表单,列表,对话框等。这里的组件全部都是官方的样式。

九宫格

<div class="weui-grids">
  <a href="" class="weui-grid js_grid">
    <div class="weui-grid__icon">
      <img src="images/icon_nav_button.png" alt="">
    </div>
    <p class="weui-grid__label">
      Button
    </p>
  </a>
  <a href="" class="weui-grid js_grid">
    <div class="weui-grid__icon">
      <img src="images/icon_nav_cell.png" alt="">
    </div>
    <p class="weui-grid__label">
      List
    </p>
  </a>
  ...
</div>

Flex

使用 Flex 实现的栅格

<div class="weui-flex">
  <div class="weui-flex__item">weui</div>
  <div class="weui-flex__item">weui</div>
</div>

按钮

按钮可以使用 a 或者 button 标签。wap上要触发按钮的 active态,必须触发 ontouchstart事件,可以在 body 上加上 ontouchstart="" 全局触发。

按钮常见的操作场景:确定、取消、警示,分别对应class:weui-btn_primaryweui-btn_defaultweui-btn_warn,每种场景都有自己的置灰态 weui-btn_disabled,除此外还有一种镂空按钮 weui-btn_plain-xxx,客户端webview里的按钮尺寸有两类,默认宽度100%,小型按钮宽度自适应,两边边框与文本间距0.75em:

<a href="javascript:;" class="weui-btn weui-btn_primary">按钮</a>
<a href="javascript:;" class="weui-btn weui-btn_disabled weui-btn_primary">按钮</a>
<a href="javascript:;" class="weui-btn weui-btn_warn">确认</a>
<a href="javascript:;" class="weui-btn weui-btn_disabled weui-btn_warn">确认</a>
<a href="javascript:;" class="weui-btn weui-btn_default">按钮</a>
<a href="javascript:;" class="weui-btn weui-btn_disabled weui-btn_default">按钮</a>
<a href="javascript:;" class="weui-btn weui-btn_plain-default">按钮</a>
<a href="javascript:;" class="weui-btn weui-btn_plain-primary">按钮</a>

Loading状态

.weui-btn_loading 可以使按钮变为loading状态

列表

Cell,列表视图,用于将信息以列表的结构显示在页面上,是wap上最常用的内容结构。Cell由多个section组成,每个section包括section header weui-cells_title 以及 weui-cells

cell由 thumbnailweui-cell__hdbodyweui-cell__bdaccessoryweui-cell__ft三部分组成,cell采用自适应布局:

简单列表

<div class="weui-cells">
  <div class="weui-cell">
    <div class="weui-cell__bd">
      <p>标题文字</p>
    </div>
    <div class="weui-cell__ft">说明文字</div>
  </div>
</div>

带图标的列表

<div class="weui-cells">
  <div class="weui-cell">
    <div class="weui-cell__hd"><img src=""></div>
    <div class="weui-cell__bd">
      <p>标题文字</p>
    </div>
    <div class="weui-cell__ft">说明文字</div>
  </div>
  <div class="weui-cell">
    <div class="weui-cell__hd"><img src=""></div>
    <div class="weui-cell__bd">
      <p>标题文字</p>
    </div>
    <div class="weui-cell__ft">说明文字</div>
  </div>
</div>

带链接的列表

<div class="weui-cells">
  <a class="weui-cell weui-cell_access" href="javascript:;">
    <div class="weui-cell__bd">
      <p>cell standard</p>
    </div>
    <div class="weui-cell__ft">
    </div>
  </a>
  <a class="weui-cell weui-cell_access" href="javascript:;">
    <div class="weui-cell__bd">
      <p>cell standard</p>
    </div>
    <div class="weui-cell__ft">
    </div>
  </a>
</div>

单选列表

<div class="weui-cells weui-cells_radio">
  <label class="weui-cell weui-check__label" for="x11">
    <div class="weui-cell__bd">
      <p>cell standard</p>
    </div>
    <div class="weui-cell__ft">
      <input type="radio" class="weui-check" name="radio1" id="x11">
      <span class="weui-icon-checked"></span>
    </div>
  </label>
  <label class="weui-cell weui-check__label" for="x12">

    <div class="weui-cell__bd">
      <p>cell standard</p>
    </div>
    <div class="weui-cell__ft">
      <input type="radio" name="radio1" class="weui-check" id="x12" checked="checked">
      <span class="weui-icon-checked"></span>
    </div>
  </label>
  <a href="javascript:void(0);" class="weui-cell weui-cell_link">
    <div class="weui-cell__bd">添加更多</div>
  </a>
</div>

复选列表

<div class="weui-cells weui-cells_checkbox">
  <label class="weui-cell weui-check__label" for="s11">
    <div class="weui-cell__hd">
      <input type="checkbox" class="weui-check" name="checkbox1" id="s11" checked="checked">
      <i class="weui-icon-checked"></i>
    </div>
    <div class="weui-cell__bd">
      <p>standard is dealt for u.</p>
    </div>
  </label>
  <label class="weui-cell weui-check__label" for="s12">
    <div class="weui-cell__hd">
      <input type="checkbox" name="checkbox1" class="weui-check" id="s12">
      <i class="weui-icon-checked"></i>
    </div>
    <div class="weui-cell__bd">
      <p>standard is dealicient for u.</p>
    </div>
  </label>
  <a href="javascript:void(0);" class="weui-cell weui-cell_link">
    <div class="weui-cell__bd">添加更多</div>
  </a>
</div>

表单

表单是基于列表的布局实现的.包括很多常用的表单控件:

<div class="weui-cells weui-cells_form">
  <div class="weui-cell">
    <div class="weui-cell__hd"><label class="weui-label">qq</label></div>
    <div class="weui-cell__bd">
      <input class="weui-input" type="number" pattern="[0-9]*" placeholder="请输入qq号">
    </div>
  </div>
  <div class="weui-cell weui-cell_vcode">
    <div class="weui-cell__hd">
      <label class="weui-label">手机号</label>
    </div>
    <div class="weui-cell__bd">
      <input class="weui-input" type="tel" placeholder="请输入手机号">
    </div>
    <div class="weui-cell__ft">
      <button class="weui-vcode-btn">获取验证码</button>
    </div>
  </div>
  <div class="weui-cell">
    <div class="weui-cell__hd"><label for="" class="weui-label">日期</label></div>
    <div class="weui-cell__bd">
      <input class="weui-input" type="date" value="">
    </div>
  </div>
  <div class="weui-cell">
    <div class="weui-cell__hd"><label for="" class="weui-label">时间</label></div>
    <div class="weui-cell__bd">
      <input class="weui-input" type="datetime-local" value="" placeholder="">
    </div>
  </div>
  <div class="weui-cell weui-cell_vcode">
    <div class="weui-cell__hd"><label class="weui-label">验证码</label></div>
    <div class="weui-cell__bd">
      <input class="weui-input" type="number" placeholder="请输入验证码">
    </div>
    <div class="weui-cell__ft">
      <img class="weui-vcode-img" src="./images/vcode.jpg">
    </div>
  </div>
</div>
<div class="weui-cells__tips">底部说明文字底部说明文字</div>

<div class="weui-cells__title">表单报错</div>
<div class="weui-cells weui-cells_form">
  <div class="weui-cell weui-cell_warn">
    <div class="weui-cell__hd"><label for="" class="weui-label">卡号</label></div>
    <div class="weui-cell__bd">
      <input class="weui-input" type="number" pattern="[0-9]*" value="weui input error" placeholder="请输入卡号">
    </div>
    <div class="weui-cell__ft">
      <i class="weui-icon-warn"></i>
    </div>
  </div>
</div>


<div class="weui-cells__title">开关</div>
<div class="weui-cells weui-cells_form">
  <div class="weui-cell weui-cell_switch">
    <div class="weui-cell__bd">标题文字</div>
    <div class="weui-cell__ft">
      <input class="weui-switch" type="checkbox">
    </div>
  </div>
  <div class="weui-cell weui-cell_switch">
    <div class="weui-cell__bd">兼容IE Edge的版本</div>
    <div class="weui-cell__ft">
      <label for="switchCP" class="weui-switch-cp">
        <input id="switchCP" class="weui-switch-cp__input" type="checkbox" checked="checked">
        <div class="weui-switch-cp__box"></div>
      </label>
    </div>
  </div>
</div>

<div class="weui-cells__title">文本框</div>
<div class="weui-cells">
  <div class="weui-cell">
    <div class="weui-cell__bd">
      <input class="weui-input" type="text" placeholder="请输入文本">
    </div>
  </div>
</div>

<div class="weui-cells__title">文本域</div>
<div class="weui-cells weui-cells_form">
  <div class="weui-cell">
    <div class="weui-cell__bd">
      <textarea class="weui-textarea" placeholder="请输入文本" rows="3"></textarea>
      <div class="weui-textarea-counter"><span>0</span>/200</div>
    </div>
  </div>
</div>

文件上传

目前文件上传仅有CSS样式,并没有对应的JS插件。

<div class="weui-cells weui-cells_form">
  <div class="weui-cell">
    <div class="weui-cell__bd">
      <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" style="background-image:url(./images/pic_160.png)"></li>
            <li class="weui-uploader__file" style="background-image:url(./images/pic_160.png)"></li>
            <li class="weui-uploader__file" style="background-image:url(./images/pic_160.png)"></li>
            <li class="weui-uploader__file weui-uploader__file_status" style="background-image:url(./images/pic_160.png)">
              <div class="weui-uploader__file-content">
                <i class="weui-icon-warn"></i>
              </div>
            </li>
            <li class="weui-uploader__file weui-uploader__file_status" style="background-image:url(./images/pic_160.png)">
              <div class="weui-uploader__file-content">50%</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>
  </div>
</div>

Slider

用来显示和输入百分比数据,如果没有用JS进行初始化,则为只读。

<div class="weui-slider">
  <div class="weui-slider__inner">
    <div style="width: 30%;" class="weui-slider__track"></div>
    <div style="left: 30%;" class="weui-slider__handler"></div>
  </div>
</div>

JS初始化

使用 $('#slider').slider() 进行初始化。

初始化的时候可以传入一个回调函数,当用户进行滑动操作的时候会触发这个回调函数。

<div class="weui-slider-box" id="slider1">
  <div class="weui-slider">
    <div id="sliderInner" class="weui-slider__inner">
      <div id="sliderTrack" style="width: 75%;" class="weui-slider__track"></div>
      <div id="sliderHandler" style="left: 75%;" class="weui-slider__handler"></div>
    </div>
  </div>
  <div id="sliderValue" class="weui-slider-box__value">75</div>
</div>
<script>
  $('#slide1').slider(function (percent) {
    console.log(percent)
  })
</script>

消息页面

结果页通常来说可以认为进行一系列操作步骤后,作为流程结束的总结性页面。结果页的作用主要是告知用户操作处理结果以及必要的相关细节(可用于确认之前的操作是否有误)等信息;若该流程用于开启或关闭某些重要功能,可在结果页增加与该功能相关的描述性内容;除此之外,结果页也可以承载一些附加价值操作,例如提供抽奖、关注公众号等功能入口。

<div class="weui-msg">
  <div class="weui-msg__icon-area"><i class="weui-icon-success weui-icon_msg"></i></div>
  <div class="weui-msg__text-area">
    <h2 class="weui-msg__title">操作成功</h2>
    <p class="weui-msg__desc">内容详情,可根据实际需要安排,如果换行则不超过规定长度,居中展现<a href="javascript:void(0);">文字链接</a></p>
  </div>
  <div class="weui-msg__opr-area">
    <p class="weui-btn-area">
      <a href="javascript:;" class="weui-btn weui-btn_primary">推荐操作</a>
      <a href="javascript:;" class="weui-btn weui-btn_default">辅助操作</a>
    </p>
  </div>
  <div class="weui-msg__extra-area">
    <div class="weui-footer">
      <p class="weui-footer__links">
        <a href="javascript:void(0);" class="weui-footer__link">底部链接文本</a>
      </p>
      <p class="weui-footer__text">Copyright © 2008-2016 weui.io</p>
    </div>
  </div>
</div>

进度条

progress用于上传、下载等耗时并且需要显示进度的场景,用户可以随时中断该操作。

<div class="weui-progress">
  <div class="weui-progress__bar">
    <div class="weui-progress__inner-bar js_progress" style="width: 50%;"></div>
  </div>
  <a href="javascript:;" class="weui-progress__opr">
    <i class="weui-icon-cancel"></i>
  </a>
</div>
<br>
<div class="weui-progress">
  <div class="weui-progress__bar">
    <div class="weui-progress__inner-bar js_progress" style="width: 80%;"></div>
  </div>
  <a href="javascript:;" class="weui-progress__opr">
    <i class="weui-icon-cancel"></i>
  </a>
</div>

对话框

若系统的alert窗体无法满足网页的临时视图内容需求,则可以自定义实现与alert形式相似的dialog,并且在dialog中可以自定义地使用各种控件,来满足需求。

对话框只能通过 JavaScript 进行调用,我们提供了三种常用的对话框 Alert, Confirm, Prompt 和 Login. 你也可以通过 $.modal 来自定义对话框

实际上, Alert, Confirm, Prompt 和 Login 都是 Modal 的一种定制而已。

Alert

显示一段警告消息,有一个确认按钮。

$.alert("自定义的消息内容");
$.alert("自定义的消息内容", "自定义的标题");
$.alert("自定义的消息内容", function() {
  //点击确认后的回调函数
});
$.alert("自定义的消息内容", "标题", function() {
  //点击确认后的回调函数
});

//如果参数过多,通过 object 方式传入
$.alert({
  title: '标题',
  text: '内容文案',
  onOK: function () {
    //点击确认
  }
});

Confirm

显示一段确认消息,有一个确认按钮和一个取消按钮

$.confirm("自定义的消息内容");
$.confirm("自定义的消息内容", "自定义的标题");
$.confirm("自定义的消息内容", function() {
  //点击确认后的回调函数
  }, function() {
  //点击取消后的回调函数
  });


//如果参数过多,建议通过 object 方式传入
$.confirm({
  title: '标题',
  text: '内容文案',
  onOK: function () {
    //点击确认
  },
  onCancel: function () {
  }
});

Prompt

显示一个带有输入框的对话框,可以让用户输入信息

$.prompt("自定义的消息内容", function(text) {
  //点击确认后的回调函数
  //text 是用户输入的内容
}, function() {
  //点击取消后的回调函数
});

//如果参数过多,建议通过 object 方式传入
$.prompt({
  title: '标题',
  text: '内容文案',
  input: '输入框默认值',
  empty: false, // 是否允许为空
  onOK: function (input) {
    //点击确认
  },
  onCancel: function () {
    //点击取消
  }
});

Login

显示一个登录框:

$.login("自定义的消息内容", function(username, password) {
  // 这里进行登录操作
}, function() {
});

//如果参数过多,建议通过 object 方式传入
$.login({
  title: '标题',
  text: '内容文案',
  username: 'tom',  // 默认用户名
  password: 'tom',  // 默认密码
  onOK: function (username, password) {
    //点击确认
  },
  onCancel: function () {
    //点击取消
  }
});

登录框从 V0.8.0 版本可用。

自定义对话框

上述的三种对话框都是 $.modal 的一种特殊形式。你可以通过 $.modal 来定制对话框:

$.modal({
  title: "Hello",
  text: "我是自定义的modal",
  buttons: [
    { text: "支付宝", onClick: function(){ console.log(1)} },
    { text: "微信支付", onClick: function(){ console.log(2)} },
    { text: "取消", className: "default", onClick: function(){ console.log(3)} },
  ]
});

关闭对话框

默认情况下,点击对话框的按钮都会先关闭对话框再触发回调函数。

你可以通过JS来关闭任何正在显示的对话框:

$.closeModal();

默认配置

对话框的默认是 $.modal.prototype.defaults,默认配置如下:

defaults = $.modal.prototype.defaults = {
  title: "提示",
  text: undefined,
  buttonOK: "确定",
  buttonCancel: "取消",
  buttons: [{
    text: "确定",
    className: "primary"
  }],
  autoClose: true //点击按钮自动关闭对话框,如果你不希望点击按钮就关闭对话框,可以把这个设置为false
};

Loading

纯静态,显示一个正在加载的提示。

<div class="weui-loadmore">
  <i class="weui-loading"></i>
  <span class="weui-loadmore__tips">正在加载</span>
</div>
<div class="weui-loadmore weui-loadmore_line">
  <span class="weui-loadmore__tips">暂无数据</span>
</div>
<div class="weui-loadmore weui-loadmore_line weui-loadmore_dot">
  <span class="weui-loadmore__tips"></span>
</div>

ActionSheet

ActionSheet用于显示包含一系列可交互的动作集合,包括说明、跳转等。由底部弹出,一般用于响应用户对页面的点击。

ActionSheet 只能通过 JavaScript 进行调用:

$.actions({
  actions: [{
    text: "编辑",
    onClick: function() {
      //do something
    }
  },{
    text: "删除",
    onClick: function() {
      //do something
    }
  }]
});

参数说明

通过 $.actions(params) 方法打开 ActionSheet。可用参数如下:

参数名 说明
actions 菜单项,关于每一个菜单项的配置请参见下文
title 可以给弹层设置一个标题,如果不设置则不会显示标题
onClose 关闭弹层的回调函数

actions 参数是一个数组,数组中的每一项都是一个菜单。

对每一个菜单的可用配置如下:

参数名 说明
text 菜单显示的文案
className 菜单上额外追加的class
onClick 点击之后的回调函数

颜色配置

V0.7.0 开始, 可以通过 className 参数配置不同的颜色或者背景,可以参考右侧的demo用法如下:

$.actions({
  actions: [
    {
      text: "发布",
      className: "color-primary",
    },
  ...
});

所有可用配置如下:

color-primary color-success color-danger color-warning
bg-primary bg-success bg-danger bg-warning

Toast

Toast 用于临时显示某些信息,并且会在数秒后自动消失。这些信息通常是轻量级操作的成功、失败或等待状态信息。

Toast 只能通过 JavaScript 进行调用:

$.toast();
$.toast("操作成功");

Toast 有三种模式可以选择,默认是 成功 模式,还有 取消禁止 两种模式:

V0.7.1 版本开始,新增了一个纯文本模式。

$.toast("取消操作", "cancel");
$.toast("禁止操作", "forbidden");
$.toast("纯文本", "text");
// 第二个参数可以是时间,单位毫秒
$.toast("消息", 20000);

参数

Toast 默认时间是 2000 毫秒,可以通过 $.toast.prototype.defaults.duration 来设置这个值。

回调函数

toast可以指定一个回调函数,当toast关闭的时候会调用此函数。

$.toast("取消操作", function() {
  console.log("cancel");
});
$.toast("禁止操作", "forbidden", function() {
  //do something
});

Toptip

显示在页面顶部的轻量级提示,一般用来反馈用户的操作结果,比如表单校验失败等。

JS方法定义如下:

$.toptip(text, [duration, type]);

示例:

$.toptip('操作成功', 'success');
$.toptip('操作失败', 'error');
$.toptip('警告', 'warning');

$.toptip('操作成功', 2000, 'success');  //设置显示时间

注意,此组件从 V0.7.2 版本开始才可以使用。

Tabbar

tabbar,底部导航,通常用作 Web 应用的主界面底部导航,类似于微信主界面的底部“微信”、“通讯录”、“发现”和“我”的导航区。每个功能包含一个图标和该功能简洁的文字描述。

<div class="weui-tab">
  <div class="weui-navbar">
    <div class="weui-navbar__item weui-bar__item--on">
      选项一
    </div>
    <div class="weui-navbar__item">
      选项二
    </div>
    <div class="weui-navbar__item">
      选项三
    </div>
  </div>
  <div class="weui-tab__bd">

    <input type="text" id="a">

  </div>

  <div class="weui-tabbar">
    <a href="javascript:;" class="weui-tabbar__item weui-bar__item--on">
      <span class="weui-badge" style="position: absolute;top: -.4em;right: 1em;">8</span>
      <div class="weui-tabbar__icon">
        <img src="./images/icon_nav_button.png" alt="">
      </div>
      <p class="weui-tabbar__label">微信</p>
    </a>
    <a href="javascript:;" class="weui-tabbar__item">
      <div class="weui-tabbar__icon">
        <img src="./images/icon_nav_msg.png" alt="">
      </div>
      <p class="weui-tabbar__label">通讯录</p>
    </a>
    <a href="javascript:;" class="weui-tabbar__item">
      <div class="weui-tabbar__icon">
        <img src="./images/icon_nav_article.png" alt="">
      </div>
      <p class="weui-tabbar__label">发现</p>
    </a>
    <a href="javascript:;" class="weui-tabbar__item">
      <div class="weui-tabbar__icon">
        <img src="./images/icon_nav_cell.png" alt="">
      </div>
      <p class="weui-tabbar__label"></p>
    </a>
  </div>
</div>

.weui-tab 作为外层容器,高度撑满它的父容器的高度,.weui-tab__bd 作为 tab 的主体内容,占据除了 .weui-tabbar 以外的全部父容器的高度,.weui-tabbar 则为底部的导航栏。而 .weui-tabbar__item.weui-tabbar 的子元素,表示一个导航区,建议不超过 5 个。

图标 .weui-tabbar__icon 约定尺寸为 27px * 27px ,二倍即 54px * 54px。

关于 active 态,开发者根据需要,给当前激活的 .weui-tabbar__item 添加标示的 .weui-bar__item--on 类名,然后控制文字颜色和图标变化。

自动切换

在正确的HTML结构前提下,给 .weui-tabbar__item 或者 .weui-navbar__item 加上 href="#id" 指向一个 .weui-tab__bd-item,即可实现点击的时候自动切换。但是请自行确保初始状态的一致。

基本结构如下所示:

<!-- 容器 -->
<div class="weui-tab">
  <div class="weui-tab__bd">
    <div id="tab1" class="weui-tab__bd-item weui-tab__bd-item--active">
      <h1>页面一</h1>
    </div>
    <div id="tab2" class="weui-tab__bd-item">
      <h1>页面二</h1>
    </div>
    ...
  </div>

  <div class="weui-tabbar">
    <a href="#tab1" class="weui-tabbar__item weui-bar__item--on">
      ...
    </a>
    <a href="#tab2" class="weui-tabbar__item">
      ...
    </a>
    ...
  </div>
</div>

面板

<div class="weui-panel weui-panel_access">
  <div class="weui-panel__hd">图文组合列表</div>
  <div class="weui-panel__bd">
    <a href="javascript:void(0);" class="weui-media-box weui-media-box_appmsg">
      <div class="weui-media-box__hd">
        <img class="weui-media-box__thumb" src="">
      </div>
      <div class="weui-media-box__bd">
        <h4 class="weui-media-box__title">标题一</h4>
        <p class="weui-media-box__desc">由各种物质组成的巨型球状天体,叫做星球。星球有一定的形状,有自己的运行轨道。</p>
      </div>
    </a>
    <a href="javascript:void(0);" class="weui-media-box weui-media-box_appmsg">
      <div class="weui-media-box__hd">
        <img class="weui-media-box__thumb" src="">
      </div>
      <div class="weui-media-box__bd">
        <h4 class="weui-media-box__title">标题二</h4>
        <p class="weui-media-box__desc">由各种物质组成的巨型球状天体,叫做星球。星球有一定的形状,有自己的运行轨道。</p>
      </div>
    </a>
  </div>
  <div class="weui-panel__ft">
    <a href="javascript:void(0);" class="weui-cell weui-cell_access weui-cell_link">
      <div class="weui-cell__bd">查看更多</div>
      <span class="weui-cell__ft"></span>
    </a>    
  </div>
</div>

Preview

<div class="weui-form-preview">
  <div class="weui-form-preview__hd">
    <label class="weui-form-preview__label">付款金额</label>
    <em class="weui-form-preview__value">¥2400.00</em>
  </div>
  <div class="weui-form-preview__bd">
    <div class="weui-form-preview__item">
      <label class="weui-form-preview__label">商品</label>
      <span class="weui-form-preview__value">电动打蛋机</span>
    </div>
    <div class="weui-form-preview__item">
      <label class="weui-form-preview__label">标题标题</label>
      <span class="weui-form-preview__value">名字名字名字</span>
    </div>
    <div class="weui-form-preview__item">
      <label class="weui-form-preview__label">标题标题</label>
      <span class="weui-form-preview__value">很长很长的名字很长很长的名字很长很长的名字很长很长的名字很长很长的名字</span>
    </div>
  </div>
  <div class="weui-form-preview__ft">
    <a class="weui-form-preview__btn weui-form-preview__btn_default" href="javascript:">辅助操作</a>
    <button type="submit" class="weui-form-preview__btn weui-form-preview__btn_primary" href="javascript:">操作</button>
  </div>
</div>

loadmore

一个纯静态展示的组件

如果想使用滚动加载,请使用 infinite

<div class="weui-loadmore">
  <i class="weui-loading"></i>
  <span class="weui-loadmore__tips">正在加载</span>
</div>
<div class="weui-loadmore weui-loadmore_line">
  <span class="weui-loadmore__tips">暂无数据</span>
</div>
<div class="weui-loadmore weui-loadmore_line weui-loadmore_dot">
  <span class="weui-loadmore__tips"></span>
</div>

图标

<i class="weui-icon-success weui-icon_msg"></i>
<i class="weui-icon-info weui-icon_msg"></i>
<i class="weui-icon-warn weui-icon_msg-primary"></i>
<i class="weui-icon-warn weui-icon_msg"></i>
<i class="weui-icon-waiting weui-icon_msg"></i>

<i class="weui-icon-success"></i>
<i class="weui-icon-success-no-circle"></i>
<i class="weui-icon-circle"></i>
<i class="weui-icon-warn"></i>
<i class="weui-icon-download"></i>
<i class="weui-icon-info-circle"></i>
<i class="weui-icon-cancel"></i>
<i class="weui-icon-search"></i>