From 7ea111794ecbe5cf0df825947438c6550d75a6d7 Mon Sep 17 00:00:00 2001 From: "Mr.X" Date: Mon, 4 Jun 2018 21:19:29 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E5=AD=97=E4=BD=93=E5=9B=BE?= =?UTF-8?q?=E6=A0=87=E9=A1=B5=E9=9D=A2=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- css/okadmin.css | 16 +++++++++++++++- font-iconfont.html | 37 +++++++++++++++++++++++++++++++++++++ font-layui.html | 37 +++++++++++++++++++++++++++++++++++++ index.html | 6 +++--- js/okadmin.js | 38 ++++++++++++++++++++++++++++++++++---- user.html | 12 ++++-------- welcome.html | 26 +++----------------------- 7 files changed, 133 insertions(+), 39 deletions(-) create mode 100644 font-iconfont.html create mode 100644 font-layui.html diff --git a/css/okadmin.css b/css/okadmin.css index f882b82..c03b775 100644 --- a/css/okadmin.css +++ b/css/okadmin.css @@ -16,6 +16,10 @@ left: 235px; } +.layui-tab-title li:first-child .layui-tab-close { + display: none; +} + /*顶部导航菜单结束*/ .menu-switch { @@ -69,10 +73,20 @@ .ok-body-breadcrumb { position: relative; line-height: 39px; - height: 39px; + height: 41px; border-bottom: 1px solid rgb(229, 229, 229); } +.ok-body-breadcrumb .layui-btn { + line-height: 2.4em; + margin-top: 3px; + float: right +} + +.ok-body-breadcrumb .layui-btn .layui-icon { + line-height: 40px +} + /* .ok-search { text-align: center; diff --git a/font-iconfont.html b/font-iconfont.html new file mode 100644 index 0000000..87fe925 --- /dev/null +++ b/font-iconfont.html @@ -0,0 +1,37 @@ + + + + + 阿里巴巴图标库 + + + +
+ + +
+
+ 图标选择:点我跳转 +
+
+ 使用方法 +
+
+// 挑选相应图标并获取类名,应用于页面:
+
+      
+
+ + + + + \ No newline at end of file diff --git a/font-layui.html b/font-layui.html new file mode 100644 index 0000000..6ce04f2 --- /dev/null +++ b/font-layui.html @@ -0,0 +1,37 @@ + + + + + Layui内置图标库 + + + +
+ + +
+
+ 图标选择:点我跳转 +
+
+ 使用方法 +
+
+// 从 layui 2.3.0 开始,支持 font-class 的形式定义图标:
+
+      
+
+ + + + + \ No newline at end of file diff --git a/index.html b/index.html index 6a63903..7b0c139 100644 --- a/index.html +++ b/index.html @@ -77,11 +77,11 @@
  • - 图标字体 + 字体图标
    -
    Layui内置图标
    -
    阿里图标库
    +
    Layui内置图标库
    +
    阿里巴巴图标库
  • diff --git a/js/okadmin.js b/js/okadmin.js index 245e86e..03ce261 100644 --- a/js/okadmin.js +++ b/js/okadmin.js @@ -1,6 +1,8 @@ -layui.use(['element', 'jquery'], function () { +layui.use(['element', 'jquery', 'code'], function () { var element = layui.element; var $ = layui.jquery; + // 引用code方法 + layui.code({about: false}); /** * 左边菜单显示/隐藏功能 @@ -28,7 +30,7 @@ layui.use(['element', 'jquery'], function () { // 去重复选项卡 for (var i = 0; i < $('.ok-frame').length; i++) { if ($('.ok-frame').eq(i).attr('tab-id') == tabId) { - tab.tabChange(tabId); + element.tabChange("ok-tab", tabId); event.stopPropagation(); return; } @@ -36,10 +38,38 @@ layui.use(['element', 'jquery'], function () { // 添加选项卡 element.tabAdd("ok-tab", { title: title, - content: "", + content: "", id: tabId }); // 切换选项卡 element.tabChange("ok-tab", tabId); }); -}); \ No newline at end of file +}); + + +/** + * 获取当前时间 + */ +var nowDate1 = ""; + +function setDate() { + var date = new Date(); + var year = date.getFullYear(); + nowDate1 = year + "-" + addZero((date.getMonth() + 1)) + "-" + addZero(date.getDate()) + " "; + nowDate1 += addZero(date.getHours()) + ":" + addZero(date.getMinutes()) + ":" + addZero(date.getSeconds()); + document.getElementById("nowTime").innerHTML = nowDate1; + setTimeout('setDate()', 1000); +} + +/** + * 年月日是分秒为10以下的数字则添加0字符串 + * @param time + * @returns {number | *} + */ +function addZero(time) { + var i = parseInt(time); + if (i / 10 < 1) { + i = "0" + i; + } + return i; +} \ No newline at end of file diff --git a/user.html b/user.html index b0f4670..7eef4a5 100644 --- a/user.html +++ b/user.html @@ -8,14 +8,15 @@ - + \ No newline at end of file diff --git a/welcome.html b/welcome.html index 119f842..da98f3a 100644 --- a/welcome.html +++ b/welcome.html @@ -126,32 +126,12 @@
  • + + + \ No newline at end of file