基本信息
源码名称:layuiAdmin - iframe版本
源码大小:3.62M
文件格式:.zip
开发语言:CSS
更新时间:2019-11-27
   友情提示:(无需注册或充值,赞助后即可获取资源下载链接)

     嘿,亲!知识可是无价之宝呢,但咱这精心整理的资料也耗费了不少心血呀。小小地破费一下,绝对物超所值哦!如有下载和支付问题,请联系我们QQ(微信同号):813200300

本次赞助数额为: 6 元 
   源码介绍


  • 所谓“iframe版”,即基于 iframe 容器跳转的多页面开发模式,视图层通常由服务端输出,每一个页面都在一个完全独立的空间中运行,因此一般适用于规模相对庞大的应用系统,它可以避免不同界面之间的冲突,但如果打开的 iframe 元素过多,浏览器负荷会相对较高。
一般对于大多数服务端程序员来说,“iframe版” 的上手难度要远低于“单页版”



<!-- 主题设置模板 -->

<script type="text/html" template lay-done="layui.data.theme();">
  {{# 
    var local = layui.data(layui.setter.tableName)
    ,theme = local.theme || {}
    ,themeColorIndex =  parseInt((theme && theme.color) ? theme.color.index : 0) || 0;
  }}

  <div class="layui-card-header">
    配色方案
  </div>
  <div class="layui-card-body layadmin-setTheme">
    <ul class="layadmin-setTheme-color">
      {{# layui.each(layui.setter.theme.color, function(index, item){ }}
        <li layadmin-event="setTheme" data-index="{{ index }}" data-alias="{{ item.alias }}" 
        {{ index === themeColorIndex ? 'class="layui-this"' : '' }} title="{{ item.alias }}">
          <div class="layadmin-setTheme-header"></div>
          <div class="layadmin-setTheme-side" style="background-color: {{ item.main }};">
            <div class="layadmin-setTheme-logo" style="background-color: {{ item.logo }};"></div>
          </div>
        </li>
      {{# }); }}
    </ul>
  </div>
</script>

<script>
layui.data.theme = function(){
  layui.use('form', function(){
    var form = layui.form
    ,admin = layui.admin;
    
    //监听隐藏开关
    form.on('switch(system-theme-sideicon)', function(){
      admin.theme({
        hideSideIcon: this.checked
      })
    });
  });
};
</script>