• SUI Mobile


    <header class="bar bar-nav">
      <h1 class='title'>只有图标的表单</h1>
    </header>
    <div class="content">
      <div class="list-block">
        <ul>
          <!-- Text inputs -->
          <li>
            <div class="item-content">
              <div class="item-media"><i class="icon icon-form-name"></i></div>
              <div class="item-inner">
                <div class="item-input">
                  <input type="text" placeholder="Your name">
                </div>
              </div>
            </div>
          </li>
          <li>
            <div class="item-content">
              <div class="item-media"><i class="icon icon-form-email"></i></div>
              <div class="item-inner">
                <div class="item-input">
                  <input type="email" placeholder="E-mail">
                </div>
              </div>
            </div>
          </li>
    
          <!-- Select -->
          <li>
            <div class="item-content">
              <div class="item-media"><i class="icon icon-form-gender"></i></div>
              <div class="item-inner">
                <div class="item-input">
                  <select>
                    <option>Male</option>
                    <option>Female</option>
                  </select>
                </div>
              </div>
            </div>
          </li>
        </ul>
      </div>
    </div>




    <header class="bar bar-nav">
      <h1 class='title'>表单</h1>
    </header>
    <div class="content">
      <div class="list-block">
        <ul>
          <!-- Text inputs -->
          <li>
            <div class="item-content">
              <div class="item-media"><i class="icon icon-form-name"></i></div>
              <div class="item-inner">
                <div class="item-title label">姓名</div>
                <div class="item-input">
                  <input type="text" placeholder="Your name">
                </div>
              </div>
            </div>
          </li>
          <li>
            <div class="item-content">
              <div class="item-media"><i class="icon icon-form-email"></i></div>
              <div class="item-inner">
                <div class="item-title label">邮箱</div>
                <div class="item-input">
                  <input type="email" placeholder="E-mail">
                </div>
              </div>
            </div>
          </li>
          <li>
            <div class="item-content">
              <div class="item-media"><i class="icon icon-form-password"></i></div>
              <div class="item-inner">
                <div class="item-title label">密码</div>
                <div class="item-input">
                  <input type="password" placeholder="Password" class="">
                </div>
              </div>
            </div>
          </li>
          <li>
            <div class="item-content">
              <div class="item-media"><i class="icon icon-form-gender"></i></div>
              <div class="item-inner">
                <div class="item-title label">性别</div>
                <div class="item-input">
                  <select>
                    <option>Male</option>
                    <option>Female</option>
                  </select>
                </div>
              </div>
            </div>
          </li>
          <!-- Date -->
          <li>
            <div class="item-content">
              <div class="item-media"><i class="icon icon-form-calendar"></i></div>
              <div class="item-inner">
                <div class="item-title label">生日</div>
                <div class="item-input">
                  <input type="date" placeholder="Birth day" value="2014-04-30">
                </div>
              </div>
            </div>
          </li>
          <!-- Switch (Checkbox) -->
          <li>
            <div class="item-content">
              <div class="item-media"><i class="icon icon-form-toggle"></i></div>
              <div class="item-inner">
                <div class="item-title label">开关</div>
                <div class="item-input">
                  <label class="label-switch">
                    <input type="checkbox">
                    <div class="checkbox"></div>
                  </label>
                </div>
              </div>
            </div>
          </li>
          <li class="align-top">
            <div class="item-content">
              <div class="item-media"><i class="icon icon-form-comment"></i></div>
              <div class="item-inner">
                <div class="item-title label">文本域</div>
                <div class="item-input">
                  <textarea></textarea>
                </div>
              </div>
            </div>
          </li>
        </ul>
      </div>
      <div class="content-block">
        <div class="row">
          <div class="col-50"><a href="#" class="button button-big button-fill button-danger">取消</a></div>
          <div class="col-50"><a href="#" class="button button-big button-fill button-success">提交</a></div>
        </div>
      </div>
    </div>
     
    <header class="bar bar-nav">
      <h1 class='title'>搜索栏</h1>
    </header>
    <div class="bar bar-header-secondary">
      <div class="searchbar">
        <a class="searchbar-cancel">取消</a>
        <div class="search-input">
          <label class="icon icon-search" for="search"></label>
          <input type="search" id='search' placeholder='输入关键字...'/>
        </div>
      </div>
    </div>


    <header class="bar bar-nav">
      <h1 class='title'>表单</h1>
    </header>
    <div class="content">
      <div class="list-block">
        <ul>
          <!-- Text inputs -->
          <li>
            <div class="item-content">
              <div class="item-media"><i class="icon icon-form-name"></i></div>
              <div class="item-inner">
                <div class="item-title label">姓名</div>
                <div class="item-input">
                  <input type="text" placeholder="Your name">
                </div>
              </div>
            </div>
          </li>
          <li>
            <div class="item-content">
              <div class="item-media"><i class="icon icon-form-email"></i></div>
              <div class="item-inner">
                <div class="item-title label">邮箱</div>
                <div class="item-input">
                  <input type="email" placeholder="E-mail">
                </div>
              </div>
            </div>
          </li>
          <li>
            <div class="item-content">
              <div class="item-media"><i class="icon icon-form-password"></i></div>
              <div class="item-inner">
                <div class="item-title label">密码</div>
                <div class="item-input">
                  <input type="password" placeholder="Password" class="">
                </div>
              </div>
            </div>
          </li>
          <li>
            <div class="item-content">
              <div class="item-media"><i class="icon icon-form-gender"></i></div>
              <div class="item-inner">
                <div class="item-title label">性别</div>
                <div class="item-input">
                  <select>
                    <option>Male</option>
                    <option>Female</option>
                  </select>
                </div>
              </div>
            </div>
          </li>
          <!-- Date -->
          <li>
            <div class="item-content">
              <div class="item-media"><i class="icon icon-form-calendar"></i></div>
              <div class="item-inner">
                <div class="item-title label">生日</div>
                <div class="item-input">
                  <input type="date" placeholder="Birth day" value="2014-04-30">
                </div>
              </div>
            </div>
          </li>
          <!-- Switch (Checkbox) -->
          <li>
            <div class="item-content">
              <div class="item-media"><i class="icon icon-form-toggle"></i></div>
              <div class="item-inner">
                <div class="item-title label">开关</div>
                <div class="item-input">
                  <label class="label-switch">
                    <input type="checkbox">
                    <div class="checkbox"></div>
                  </label>
                </div>
              </div>
            </div>
          </li>
          <li class="align-top">
            <div class="item-content">
              <div class="item-media"><i class="icon icon-form-comment"></i></div>
              <div class="item-inner">
                <div class="item-title label">文本域</div>
                <div class="item-input">
                  <textarea></textarea>
                </div>
              </div>
            </div>
          </li>
        </ul>
      </div>
      <div class="content-block">
        <div class="row">
          <div class="col-50"><a href="#" class="button button-big button-fill button-danger">取消</a></div>
          <div class="col-50"><a href="#" class="button button-big button-fill button-success">提交</a></div>
        </div>
      </div>
    </div>
     

    <header class="bar bar-nav">
      <h1 class="title">视图列表</h1>
    </header>
    <div class="content">
      <div class="content-block-title">图标、标题和副标题</div>
      <div class="list-block">
        <ul>
          <li class="item-content">
            <div class="item-media"><i class="icon icon-f7"></i></div>
            <div class="item-inner">
              <div class="item-title">商品名称</div>
              <div class="item-after">杜蕾斯</div>
            </div>
          </li>
          <li class="item-content">
            <div class="item-media"><i class="icon icon-f7"></i></div>
            <div class="item-inner">
              <div class="item-title">型号</div>
              <div class="item-after">极致超薄型</div>
            </div>
          </li>
        </ul>
      </div>
      <div class="content-block-title">标题和副标题</div>
      <div class="list-block">
        <ul>
          <li class="item-content">
            <div class="item-inner">
              <div class="item-title">商品名称</div>
              <div class="item-after">杜蕾斯</div>
            </div>
          </li>
          <li class="item-content">
            <div class="item-inner">
              <div class="item-title">型号</div>
              <div class="item-after">极致超薄型</div>
            </div>
          </li>
        </ul>
      </div>
      <div class="content-block-title">带箭头</div>
      <div class="list-block">
        <ul>
          <li class="item-content item-link">
            <div class="item-media"><i class="icon icon-f7"></i></div>
            <div class="item-inner">
              <div class="item-title">商品名称</div>
              <div class="item-after">杜蕾斯</div>
            </div>
          </li>
          <li class="item-content item-link">
            <div class="item-media"><i class="icon icon-f7"></i></div>
            <div class="item-inner">
              <div class="item-title">型号</div>
              <div class="item-after">极致超薄型</div>
            </div>
          </li>
        </ul>
      </div>
    </div>
     

    预加载 Modal 用来提示一些后台活动(像Ajax请求)和阻止在这个活动期间的任何用户操作。 打开预加载 modal 我们也需要调用适当的App方法: $.show预加载([title])- 显示 预加载 modal

    • title - string. Optional. 预加载 modal 标题. 默认(没有指定)的时候,它等同于 "Loading...". 你可以在App初始化时通过 modal预加载Title 参数改变默认的 预加载 标题。

    该方法返回动态创建的modal的HTML元素。

    $.hide预加载() - 隐藏/关闭 预加载 modal. 因为 预加载 modal 没有任何按钮, 它应该用 JavaScript 来关闭

    <header class="bar bar-nav">
        <h1 class="title">预加载 Modal (Preloader Modal)</h1>
      </header>
      ...
      <div class="content">
        <div class="content-block">
          <p><a href="#" class="open-preloader">Open Preloader</a></p>
          <p><a href="#" class="open-preloader-title">Open Preloader with custom title</a></p>
        </div>
      </div>
      ...
    $(document).on('click', '.open-preloader', function () {
        $.showPreloader();
        setTimeout(function () {
            $.hidePreloader();
        }, 2000);
      });
      $(document).on('click','.open-preloader-title', function () {
        $.showPreloader('Custom Title')
        setTimeout(function () {
            $.hidePreloader();
        }, 2000);
      });

    迷你指示器

    如果你不需要用像预加载Modal这样如此大的modal 窗口去指示活动, 你可以使用简单并且小的指示器modal:

    $.showIndicator() - 显示指示器 modal

    $.hideIndicator() - 隐藏/关闭指示器 modal. 因为指示器modal没有任何按钮, 它需要用JavaScript来关闭

    <header class="bar bar-nav">
          <h1 class="title">指示器(indicator)</h1>
      </header>
      ...
      <div class="content">
        <div class="content-block">
          <p><a href="#" class="open-indicator">Open Indicator</a></p>
        </div>
      </div>
      ...
    $(document).on('click','.open-indicator', function () {
          $.showIndicator();
          setTimeout(function () {
              $.hideIndicator();
          }, 2000);
      });




    Alert

    我们需要调用以下任一一种App方法来打开Alert modal :$.alert(text, [title, callbackOk]) 
    或者
    $.alert(text, [callbackOk])

    • text - string. Alert文本
    • title - string. Optional. Alert modal 标题
    • callbackOk - function. Optional.在Alert modal下,当用户点击“Ok”按钮时,回调函数将被执行。

    该方法返回动态创建的modal的HTML元素。

    <header class="bar bar-nav">
        <h1 class="title">Alert</h1>
      </header>
      ...
      <div class="content">
        <div class="content-block">
          <p><a href="#" class="alert-text">Alert With Text</a></p>
          <p><a href="#" class="alert-text-title">Alert With Text and Title</a></p>
          <p><a href="#" class="alert-text-title-callback">Alert With Text and Title and Callback</a></p>
          <p><a href="#" class="alert-text-callback">Alert With Text and Callback</a></p>
        </div>
      </div>
       ...
    $(function(){
         $(document).on('click','.alert-text',function () {
            $.alert('Here goes alert text');
         });
    
        $(document).on('click','.alert-text-title', function () {
            $.alert('Here goes alert text', 'Custom Title!');
        });
    
        $(document).on('click', '.alert-text-title-callback',function () {
            $.alert('Here goes alert text', 'Custom Title!', function () {
                $.alert('Button clicked!')
            });
        });
    
        $(document).on('click', '.alert-text-callback',function () {
            $.alert('Here goes alert text', function () {
                $.alert('Button clicked!')
            });
        });
      })
     
    
      $(document).on('click', '.confirm-ok-cancel',function () {
          $.confirm('Are you sure?',
            function () {
              $.alert('You clicked Ok button');
            },
            function () {
              $.alert('You clicked Cancel button');
            }
          );
      });
  • 相关阅读:
    Splay 详解
    莫队套值域分块
    浅谈区间众数
    回滚莫队分块
    带修莫队分块
    微服务规划准则
    mysql查询包含逗号的数据,并逗号拆分为多行展现
    python mysql 单连接和连接池简单示例
    代理模式八:装饰者模式
    代理模式七:迭代器模式
  • 原文地址:https://www.cnblogs.com/huaqiqi/p/5881340.html
Copyright © 2020-2023  润新知