2.2.0
This commit is contained in:
@@ -21,7 +21,7 @@ pre{white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; w
|
||||
|
||||
/** 初始化全局标签 **/
|
||||
body{line-height: 24px; font: 14px Helvetica Neue,Helvetica,PingFang SC,\5FAE\8F6F\96C5\9ED1,Tahoma,Arial,sans-serif;}
|
||||
hr{height: 1px; margin: 10px 0; border: 0; background-color: #e2e2e2; clear: both;}
|
||||
hr{height: 1px; margin: 10px 0; border: 0; clear: both;}
|
||||
a{color: #333; text-decoration:none; }
|
||||
a:hover{color: #777;}
|
||||
a cite{font-style: normal; *cursor:pointer;}
|
||||
@@ -32,7 +32,11 @@ a cite{font-style: normal; *cursor:pointer;}
|
||||
.layui-clear{clear: both; *zoom: 1;}
|
||||
.layui-clear:after{content:'\20'; clear:both; *zoom:1; display:block; height:0;}
|
||||
.layui-inline{position: relative; display: inline-block; *display:inline; *zoom:1; vertical-align: middle;}
|
||||
/* 三角形 */.layui-edge{position: absolute; width: 0; height: 0; border-style: dashed; border-color: transparent; overflow: hidden;}
|
||||
/* 三角形 */.layui-edge{position: relative; display: inline-block; vertical-align: middle; width: 0; height: 0; border-width: 6px; border-style: dashed; border-color: transparent; overflow: hidden;}
|
||||
.layui-edge-top{top: -4px; border-bottom-color: #999; border-bottom-style: solid;}
|
||||
.layui-edge-right{border-left-color: #999; border-left-style: solid;}
|
||||
.layui-edge-bottom{top: 2px; border-top-color: #999; border-top-style: solid;}
|
||||
.layui-edge-left{border-right-color: #999; border-right-style: solid;}
|
||||
/* 单行溢出省略 */.layui-elip{text-overflow: ellipsis; overflow: hidden; white-space: nowrap;}
|
||||
/* 屏蔽选中 */.layui-unselect,.layui-icon, .layui-disabled{-moz-user-select: none; -webkit-user-select: none; -ms-user-select: none;}
|
||||
/* 禁用 */.layui-disabled,.layui-disabled:hover{color: #d2d2d2 !important; cursor: not-allowed !important;}
|
||||
@@ -57,143 +61,6 @@ a cite{font-style: normal; *cursor:pointer;}
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
.layui-icon-duihua:before{content:"\e611"}
|
||||
.layui-icon-shezhi:before{content:"\e614"}
|
||||
.layui-icon-yinshenim:before{content:"\e60f"}
|
||||
.layui-icon-search:before{content:"\e615"}
|
||||
.layui-icon-fenxiang1:before{content:"\e641"}
|
||||
.layui-icon-shezhi1:before{content:"\e620"}
|
||||
.layui-icon-yinqing:before{content:"\e628"}
|
||||
.layui-icon-yuejuancuohao:before{content:"\1006"}
|
||||
.layui-icon-cuo:before{content:"\1007"}
|
||||
.layui-icon-baobiao:before{content:"\e629"}
|
||||
.layui-icon-star:before{content:"\e600"}
|
||||
.layui-icon-yuandian:before{content:"\e617"}
|
||||
.layui-icon-kefu:before{content:"\e606"}
|
||||
.layui-icon-logo:before{content:"\e609"}
|
||||
.layui-icon-list:before{content:"\e60a"}
|
||||
.layui-icon-tubiao:before{content:"\e62c"}
|
||||
.layui-icon-right:before{content:"\1005"}
|
||||
.layui-icon-huanfu2:before{content:"\e61b"}
|
||||
.layui-icon-On-line:before{content:"\e610"}
|
||||
.layui-icon-biaoge:before{content:"\e62d"}
|
||||
.layui-icon-youyou:before{content:"\e602"}
|
||||
.layui-icon-zuozuo:before{content:"\e603"}
|
||||
.layui-icon-cart:before{content:"\e698"}
|
||||
.layui-icon-cry:before{content:"\e69c"}
|
||||
.layui-icon-smile:before{content:"\e6af"}
|
||||
.layui-icon-survey:before{content:"\e6b2"}
|
||||
.layui-icon-icon5:before{content:"\e62e"}
|
||||
.layui-icon-iconfont17:before{content:"\e62f"}
|
||||
.layui-icon-tianjia:before{content:"\e61f"}
|
||||
.layui-icon-xiazai:before{content:"\e601"}
|
||||
.layui-icon-xuanzemoban48:before{content:"\e630"}
|
||||
.layui-icon-gongju:before{content:"\e631"}
|
||||
.layui-icon-tishilian:before{content:"\e664"}
|
||||
.layui-icon-bianji:before{content:"\e642"}
|
||||
.layui-icon-xiaoxi:before{content:"\e645"}
|
||||
.layui-icon-xiangxia:before{content:"\e61a"}
|
||||
.layui-icon-wenjian:before{content:"\e621"}
|
||||
.layui-icon-layouts:before{content:"\e632"}
|
||||
.layui-icon-duigou:before{content:"\e618"}
|
||||
.layui-icon-tianjia1:before{content:"\e608"}
|
||||
.layui-icon-yaoyaozhibofanye:before{content:"\e633"}
|
||||
.layui-icon-office:before{content:"\e705"}
|
||||
.layui-icon-404:before{content:"\e61c"}
|
||||
.layui-icon-lunbozutu:before{content:"\e634"}
|
||||
.layui-icon-help:before{content:"\e607"}
|
||||
.layui-icon-daima1:before{content:"\e635"}
|
||||
.layui-icon-jinshui:before{content:"\e636"}
|
||||
.layui-icon-faxian:before{content:"\e670"}
|
||||
.layui-icon-guanyu:before{content:"\e60b"}
|
||||
.layui-icon-map:before{content:"\e715"}
|
||||
.layui-icon-xiangshang:before{content:"\e619"}
|
||||
.layui-icon-bofang:before{content:"\e651"}
|
||||
.layui-icon-riqi:before{content:"\e637"}
|
||||
.layui-icon-uploadfile:before{content:"\e61d"}
|
||||
.layui-icon-delete:before{content:"\e640"}
|
||||
.layui-icon-bofangzanting02:before{content:"\e652"}
|
||||
.layui-icon-top:before{content:"\e604"}
|
||||
.layui-icon-haoyouqingqiu:before{content:"\e612"}
|
||||
.layui-icon-weibiaoti1:before{content:"\e605"}
|
||||
.layui-icon-chuangkou:before{content:"\e638"}
|
||||
.layui-icon-comiisbiaoqing:before{content:"\e60c"}
|
||||
.layui-icon-zhengque:before{content:"\e616"}
|
||||
.layui-icon-money:before{content:"\e659"}
|
||||
.layui-icon-iconfontwodehaoyou:before{content:"\e613"}
|
||||
.layui-icon-wenjianxiazai:before{content:"\e61e"}
|
||||
.layui-icon-tupian:before{content:"\e60d"}
|
||||
.layui-icon-lianjie:before{content:"\e64c"}
|
||||
.layui-icon-creditlevel:before{content:"\e735"}
|
||||
.layui-icon-jilu:before{content:"\e60e"}
|
||||
.layui-icon-liucheng:before{content:"\e622"}
|
||||
.layui-icon-fontstrikethrough:before{content:"\e64f"}
|
||||
.layui-icon-unlink:before{content:"\e64d"}
|
||||
.layui-icon-bianjiwenzi:before{content:"\e639"}
|
||||
.layui-icon-sanjiao:before{content:"\e623"}
|
||||
.layui-icon-danxuankuanghouxuan:before{content:"\e63f"}
|
||||
.layui-icon-danxuankuangxuanzhong:before{content:"\e643"}
|
||||
.layui-icon-juzhongduiqi:before{content:"\e647"}
|
||||
.layui-icon-youduiqi:before{content:"\e648"}
|
||||
.layui-icon-zuoduiqi:before{content:"\e649"}
|
||||
.layui-icon-gongsisvgtubiaozongji22:before{content:"\e626"}
|
||||
.layui-icon-gongsisvgtubiaozongji23:before{content:"\e627"}
|
||||
.layui-icon-shuaxin:before{content:"\1002"}
|
||||
.layui-icon-loading2:before{content:"\e63e"}
|
||||
.layui-icon-flow:before{content:"\e65c"}
|
||||
.layui-icon-jiacu:before{content:"\e62b"}
|
||||
.layui-icon-uploading:before{content:"\e67c"}
|
||||
.layui-icon-liaotianduihuaimgoutong:before{content:"\e63a"}
|
||||
.layui-icon-shipin1:before{content:"\e6ed"}
|
||||
.layui-icon-yinpin:before{content:"\e6fc"}
|
||||
.layui-icon-wenjianjiafan:before{content:"\e624"}
|
||||
.layui-icon-shouji:before{content:"\e63b"}
|
||||
.layui-icon-tianjia2:before{content:"\e654"}
|
||||
.layui-icon-wenjianjia:before{content:"\e7a0"}
|
||||
.layui-icon-biaoqing:before{content:"\e650"}
|
||||
.layui-icon-html:before{content:"\e64b"}
|
||||
.layui-icon-biaodan:before{content:"\e63c"}
|
||||
.layui-icon-goumai:before{content:"\e657"}
|
||||
.layui-icon-xiangjicopy2x:before{content:"\e65d"}
|
||||
.layui-icon-25:before{content:"\e62a"}
|
||||
.layui-icon-emwdaima:before{content:"\e64e"}
|
||||
.layui-icon-hot:before{content:"\e756"}
|
||||
.layui-icon-shezhi11:before{content:"\e716"}
|
||||
.layui-icon-zitixiahuaxian:before{content:"\e646"}
|
||||
.layui-icon-sanjiao1:before{content:"\e625"}
|
||||
.layui-icon-tupian-copy-copy:before{content:"\e64a"}
|
||||
.layui-icon-caidan:before{content:"\e671"}
|
||||
.layui-icon-zhuti2:before{content:"\e66c"}
|
||||
.layui-icon-loading1:before{content:"\e63d"}
|
||||
.layui-icon-xieti:before{content:"\e644"}
|
||||
.layui-icon-shuaxin-copy:before{content:"\e666"}
|
||||
.layui-icon-jine:before{content:"\e65e"}
|
||||
.layui-icon-zhuye:before{content:"\e68e"}
|
||||
.layui-icon-yonghu:before{content:"\e770"}
|
||||
.layui-icon-xiaoxi2:before{content:"\e667"}
|
||||
.layui-icon-yuyin:before{content:"\e688"}
|
||||
.layui-icon-download:before{content:"\e681"}
|
||||
.layui-icon-yemian1:before{content:"\e655"}
|
||||
.layui-icon-moban:before{content:"\e663"}
|
||||
.layui-icon-yibiaopan:before{content:"\e665"}
|
||||
.layui-icon-pindao:before{content:"\e653"}
|
||||
.layui-icon-xiayiye:before{content:"\e65a"}
|
||||
.layui-icon-huaban:before{content:"\e7ae"}
|
||||
.layui-icon-xiayiye1:before{content:"\e65b"}
|
||||
.layui-icon-yingyong:before{content:"\e857"}
|
||||
.layui-icon-more:before{content:"\e65f"}
|
||||
.layui-icon-xiangji:before{content:"\e660"}
|
||||
.layui-icon-refresh:before{content:"\e669"}
|
||||
.layui-icon-nv:before{content:"\e661"}
|
||||
.layui-icon-nan:before{content:"\e662"}
|
||||
.layui-icon-gaoji:before{content:"\e674"}
|
||||
.layui-icon-fengge:before{content:"\e66a"}
|
||||
.layui-icon-cai:before{content:"\e6c5"}
|
||||
.layui-icon-zan:before{content:"\e6c6"}
|
||||
.layui-icon-shoucang:before{content:"\e658"}
|
||||
.layui-icon-shuaxin2:before{content:"\e66b"}
|
||||
.layui-icon-moban1:before{content:"\e656"}
|
||||
.layui-icon-shuaxin3:before{content:"\e66d"}
|
||||
|
||||
/* 基本布局 */
|
||||
.layui-main{position: relative; width: 1140px; margin: 0 auto;}
|
||||
@@ -214,9 +81,6 @@ a cite{font-style: normal; *cursor:pointer;}
|
||||
.layui-layout-left{position: absolute !important; left: 200px; top: 0;}
|
||||
.layui-layout-right{position: absolute !important; right: 0; top: 0;}
|
||||
|
||||
/* 响应式类 */
|
||||
|
||||
|
||||
/* 栅格布局 */
|
||||
.layui-container{position: relative; margin: 0 auto; padding: 0 15px; box-sizing: border-box;}
|
||||
.layui-fluid{position: relative; margin: 0 auto; padding: 0 15px;}
|
||||
@@ -395,16 +259,16 @@ a cite{font-style: normal; *cursor:pointer;}
|
||||
.layui-btn, .layui-input, .layui-textarea, .layui-upload-button, .layui-select{outline: none; -webkit-appearance: none; transition: all .3s; -webkit-transition: all .3s; box-sizing: border-box;}
|
||||
|
||||
/* 引用 */.layui-elem-quote{margin-bottom: 10px; padding: 15px; line-height: 22px; border-left: 5px solid #009688; border-radius: 0 2px 2px 0; background-color: #f2f2f2;}
|
||||
.layui-quote-nm{border-color: #e2e2e2; border-style: solid; border-width: 1px; border-left-width: 5px; background: none;}
|
||||
/* 字段集合 */.layui-elem-field{margin-bottom: 10px; padding: 0; border: 1px solid #e2e2e2;}
|
||||
.layui-quote-nm{border-style: solid; border-width: 1px; border-left-width: 5px; background: none;}
|
||||
/* 字段集合 */.layui-elem-field{margin-bottom: 10px; padding: 0; border-width: 1px; border-style: solid;}
|
||||
.layui-elem-field legend{margin-left: 20px; padding: 0 10px; font-size: 20px; font-weight: 300;}
|
||||
.layui-field-title{margin: 10px 0 20px; border: none; border-top: 1px solid #e2e2e2;}
|
||||
.layui-field-title{margin: 10px 0 20px; border-width: 0; border-top-width: 1px;}
|
||||
.layui-field-box{padding: 10px 15px;}
|
||||
.layui-field-title .layui-field-box{padding: 10px 0;}
|
||||
|
||||
/* 进度条 */
|
||||
.layui-progress{position: relative; height: 6px; border-radius: 20px; background-color: #e2e2e2;}
|
||||
.layui-progress-bar{position: absolute; width: 0; max-width: 100%; height: 6px; border-radius: 20px; text-align: right; background-color: #5FB878; transition: all .3s; -webkit-transition: all .3s;}
|
||||
.layui-progress-bar{position: absolute; left: 0; top: 0; width: 0; max-width: 100%; height: 6px; border-radius: 20px; text-align: right; background-color: #5FB878; transition: all .3s; -webkit-transition: all .3s;}
|
||||
.layui-progress-big,
|
||||
.layui-progress-big .layui-progress-bar{height: 18px; line-height: 18px;}
|
||||
.layui-progress-text{position: relative; top: -18px; line-height: 18px; font-size: 12px; color: #666}
|
||||
@@ -412,19 +276,21 @@ a cite{font-style: normal; *cursor:pointer;}
|
||||
|
||||
/* 卡片面板 */
|
||||
.layui-card{margin-bottom: 15px; border-radius: 2px; background-color: #fff; box-shadow: 0 1px 2px 0 rgba(0,0,0,.05);}
|
||||
.layui-card-header{position: relative; height: 42px; line-height: 42px; padding: 0 15px; border-bottom: 1px dotted #E9E9E9; color: #333; border-radius: 2px 2px 0 0; font-size: 14px;}
|
||||
.layui-card-body{padding: 10px 15px; line-height: 24px;}
|
||||
.layui-card:last-child{margin-bottom: 0;}
|
||||
.layui-card-header{position: relative; height: 42px; line-height: 42px; padding: 0 15px; border-bottom: 1px solid #f6f6f6; color: #333; border-radius: 2px 2px 0 0; font-size: 14px;}
|
||||
.layui-card-body{position: relative; padding: 10px 15px; line-height: 24px;}
|
||||
.layui-card-body .layui-table{margin: 5px 0;}
|
||||
.layui-card .layui-tab{margin: 0;}
|
||||
|
||||
/* 折叠面板 */
|
||||
.layui-collapse{border: 1px solid #e2e2e2; border-radius: 2px;}
|
||||
.layui-colla-item{border-top: 1px solid #e2e2e2}
|
||||
.layui-collapse{border-width: 1px; border-style: solid; border-radius: 2px;}
|
||||
.layui-colla-item,
|
||||
.layui-colla-content{border-top-width: 1px; border-top-style: solid;}
|
||||
.layui-colla-item:first-child{border-top: none;}
|
||||
.layui-colla-title{position: relative; height: 42px; line-height: 42px; padding: 0 15px 0 35px; color: #333; background-color: #f2f2f2; cursor: pointer;}
|
||||
.layui-colla-content{display: none; padding: 10px 15px; line-height: 22px; border-top: 1px solid #e2e2e2; color: #666;}
|
||||
.layui-colla-content{display: none; padding: 10px 15px; line-height: 22px; color: #666;}
|
||||
.layui-colla-icon{position: absolute; left: 15px; top: 0; font-size: 14px;}
|
||||
|
||||
|
||||
/* 背景颜色 */
|
||||
.layui-bg-red{background-color: #FF5722 !important; color: #fff!important;} /*赤*/
|
||||
.layui-bg-orange{background-color: #FFB800!important; color: #fff!important;} /*橙*/
|
||||
@@ -434,6 +300,31 @@ a cite{font-style: normal; *cursor:pointer;}
|
||||
.layui-bg-black{background-color: #393D49!important; color: #fff!important;} /*黑*/
|
||||
.layui-bg-gray{background-color: #eee!important; color: #666!important;} /*灰*/
|
||||
|
||||
/*
|
||||
|
||||
默认主题
|
||||
|
||||
*/
|
||||
|
||||
/* 边框 */
|
||||
.layui-quote-nm,
|
||||
.layui-elem-field,
|
||||
.layui-collapse,
|
||||
.layui-colla-item,
|
||||
.layui-colla-content,
|
||||
.layui-badge-rim,
|
||||
.layui-tab-title,
|
||||
.layui-tab-title .layui-this:after,
|
||||
.layui-tab-bar,
|
||||
.layui-tab-card,
|
||||
|
||||
.layui-input, .layui-textarea, .layui-select,
|
||||
.layui-form-pane .layui-form-label,
|
||||
.layui-form-pane .layui-form-item[pane],
|
||||
.layui-layedit, .layui-layedit-tool{border-color: #e6e6e6}
|
||||
|
||||
/* 背景边框 */
|
||||
hr, .layui-timeline-item:before{background-color: #e6e6e6;}
|
||||
|
||||
/* 文本区域 */
|
||||
.layui-text{line-height: 22px; font-size: 14px; color: #666;}
|
||||
@@ -465,11 +356,11 @@ a cite{font-style: normal; *cursor:pointer;}
|
||||
/* 警告 */.layui-btn-danger{background-color: #FF5722;}
|
||||
/* 禁用 */.layui-btn-disabled,.layui-btn-disabled:hover,.layui-btn-disabled:active{border: 1px solid #e6e6e6; background-color: #FBFBFB; color: #C9C9C9; cursor: not-allowed; opacity: 1;}
|
||||
|
||||
/* 大型 */.layui-btn-big{height: 44px; line-height: 44px; padding: 0 25px; font-size: 16px;}
|
||||
/* 小型 */.layui-btn-small{height: 30px; line-height: 30px; padding: 0 10px; font-size: 12px;}
|
||||
.layui-btn-small i{font-size: 16px !important;}
|
||||
/* 迷你 */.layui-btn-mini{height: 22px; line-height: 22px; padding: 0 5px; font-size: 12px;}
|
||||
.layui-btn-mini i{font-size: 14px !important;}
|
||||
/* 大型 */.layui-btn-lg{height: 44px; line-height: 44px; padding: 0 25px; font-size: 16px;}
|
||||
/* 小型 */.layui-btn-sm{height: 30px; line-height: 30px; padding: 0 10px; font-size: 12px;}
|
||||
.layui-btn-sm i{font-size: 16px !important;}
|
||||
/* 超小 */.layui-btn-xs{height: 22px; line-height: 22px; padding: 0 5px; font-size: 12px;}
|
||||
.layui-btn-xs i{font-size: 14px !important;}
|
||||
/* 按钮组 */.layui-btn-group{display: inline-block; vertical-align: middle; font-size: 0;}
|
||||
.layui-btn-group .layui-btn{margin-left: 0!important; margin-right: 0!important; border-left: 1px solid rgba(255,255,255,.5); border-radius: 0;}
|
||||
.layui-btn-group .layui-btn-primary{border-left: none;}
|
||||
@@ -481,7 +372,7 @@ a cite{font-style: normal; *cursor:pointer;}
|
||||
.layui-btn-group+.layui-btn-group{margin-left: 10px;}
|
||||
|
||||
/** 表单 **/
|
||||
.layui-input, .layui-textarea, .layui-select{height: 38px; line-height: 1.3; line-height: 38px\9; border: 1px solid #e6e6e6; background-color: #fff; border-radius: 2px;}
|
||||
.layui-input, .layui-textarea, .layui-select{height: 38px; line-height: 1.3; line-height: 38px\9; border-width: 1px; border-style: solid; background-color: #fff; border-radius: 2px;}
|
||||
.layui-input::-webkit-input-placeholder,
|
||||
.layui-textarea::-webkit-input-placeholder,
|
||||
.layui-select::-webkit-input-placeholder{line-height: 1.3;}
|
||||
@@ -506,7 +397,7 @@ a cite{font-style: normal; *cursor:pointer;}
|
||||
|
||||
/* 分割块 */.layui-form-mid{position: relative; float: left; display: block; padding: 8px 0 !important; line-height: 20px; margin-right: 10px;}
|
||||
/* 警告域 */.layui-form-danger:focus
|
||||
,.layui-form-danger+.layui-form-select .layui-input{border: 1px solid #FF5722 !important;}
|
||||
,.layui-form-danger+.layui-form-select .layui-input{border-color: #FF5722 !important;}
|
||||
|
||||
|
||||
/* 下拉选择 */.layui-form-select{position: relative;}
|
||||
@@ -549,7 +440,7 @@ a cite{font-style: normal; *cursor:pointer;}
|
||||
.layui-form-checkbox[lay-skin="primary"] i{position: relative; top: 0; width: 16px; height: 16px; line-height: 16px; border: 1px solid #d2d2d2; font-size: 12px; border-radius: 2px; background-color: #fff; -webkit-transition: .1s linear; transition: .1s linear;}
|
||||
.layui-form-checkbox[lay-skin="primary"]:hover i{border-color: #5FB878; color: #fff;}
|
||||
.layui-form-checked[lay-skin="primary"] i{border-color: #5FB878; background-color: #5FB878; color: #fff;}
|
||||
.layui-checkbox-disbaled[lay-skin="primary"] span{background: none!important;}
|
||||
.layui-checkbox-disbaled[lay-skin="primary"] span{background: none!important; color: #c2c2c2;}
|
||||
.layui-checkbox-disbaled[lay-skin="primary"]:hover i{border-color: #d2d2d2;}
|
||||
.layui-form-item .layui-form-checkbox[lay-skin="primary"]{margin-top: 10px;}
|
||||
|
||||
@@ -572,18 +463,18 @@ a cite{font-style: normal; *cursor:pointer;}
|
||||
.layui-form-radioed i,.layui-form-radio i:hover{color: #5FB878;}
|
||||
.layui-radio-disbaled i{color: #e2e2e2 !important;}
|
||||
|
||||
/* 表单方框风格 */.layui-form-pane .layui-form-label{width: 110px; padding: 8px 15px; height: 38px; line-height: 20px; border: 1px solid #e6e6e6; border-radius: 2px 0 0 2px; text-align: center; background-color: #FBFBFB; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; box-sizing: border-box;}
|
||||
/* 表单方框风格 */.layui-form-pane .layui-form-label{width: 110px; padding: 8px 15px; height: 38px; line-height: 20px; border-width: 1px; border-style: solid; border-radius: 2px 0 0 2px; text-align: center; background-color: #FBFBFB; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; box-sizing: border-box;}
|
||||
.layui-form-pane .layui-input-inline{margin-left: -1px;}
|
||||
.layui-form-pane .layui-input-block{margin-left: 110px; left: -1px;}
|
||||
.layui-form-pane .layui-input{border-radius: 0 2px 2px 0;}
|
||||
.layui-form-pane .layui-form-text .layui-form-label{float: none; width: 100%; border-right: 1px solid #e6e6e6; border-radius: 2px; box-sizing: border-box; text-align: left;}
|
||||
.layui-form-pane .layui-form-text .layui-form-label{float: none; width: 100%; border-radius: 2px; box-sizing: border-box; text-align: left;}
|
||||
.layui-form-pane .layui-form-text .layui-input-inline{display: block; margin: 0; top: -1px; clear: both;}
|
||||
.layui-form-pane .layui-form-text .layui-input-block{margin: 0; left: 0; top: -1px;}
|
||||
.layui-form-pane .layui-form-text .layui-textarea{min-height: 100px; border-radius: 0 0 2px 2px;}
|
||||
.layui-form-pane .layui-form-checkbox{margin: 4px 0 4px 10px;}
|
||||
.layui-form-pane .layui-form-switch,
|
||||
.layui-form-pane .layui-form-radio{margin-top: 6px; margin-left: 10px; }
|
||||
.layui-form-pane .layui-form-item[pane]{position: relative; border: 1px solid #e6e6e6;}
|
||||
.layui-form-pane .layui-form-item[pane]{position: relative; border-width: 1px; border-style: solid;}
|
||||
.layui-form-pane .layui-form-item[pane] .layui-form-label{position: absolute; left: 0; top: 0; height: 100%; border-width: 0px; border-right-width: 1px;}
|
||||
.layui-form-pane .layui-form-item[pane] .layui-input-inline{margin-left: 110px;}
|
||||
|
||||
@@ -598,8 +489,8 @@ a cite{font-style: normal; *cursor:pointer;}
|
||||
}
|
||||
|
||||
/** 富文本编辑器 **/
|
||||
.layui-layedit{border: 1px solid #d2d2d2; border-radius: 2px;}
|
||||
.layui-layedit-tool{padding: 3px 5px; border-bottom: 1px solid #e2e2e2; font-size: 0;}
|
||||
.layui-layedit{border-width: 1px; border-style: solid; border-radius: 2px;}
|
||||
.layui-layedit-tool{padding: 3px 5px; border-bottom-width: 1px; border-bottom-style: solid; font-size: 0;}
|
||||
.layedit-tool-fixed{position: fixed; top: 0; border-top: 1px solid #e2e2e2;}
|
||||
.layui-layedit-tool .layedit-tool-mid,
|
||||
.layui-layedit-tool .layui-icon{display: inline-block; vertical-align: middle; text-align: center; font-size: 14px;}
|
||||
@@ -656,7 +547,7 @@ a cite{font-style: normal; *cursor:pointer;}
|
||||
.layui-laypage .layui-laypage-limits{vertical-align: top;}
|
||||
.layui-laypage select{height: 22px; padding: 3px; border-radius: 2px; cursor: pointer;}
|
||||
.layui-laypage .layui-laypage-skip{height: 30px; line-height: 30px; color: #999;}
|
||||
.layui-laypage input, .layui-laypage button{height: 30px; line-height: 30px; border:1px solid #e2e2e2; border-radius: 2px; vertical-align: top; background-color: #fff; box-sizing: border-box;}
|
||||
.layui-laypage input, .layui-laypage button{height: 30px; line-height: 30px; border-radius: 2px; vertical-align: top; background-color: #fff; box-sizing: border-box;}
|
||||
.layui-laypage input{display: inline-block; width: 40px; margin: 0 10px; padding: 0 3px; text-align: center;}
|
||||
.layui-laypage input:focus,
|
||||
.layui-laypage select:focus{border-color: #009688!important;}
|
||||
@@ -671,15 +562,15 @@ a cite{font-style: normal; *cursor:pointer;}
|
||||
.layui-flow-more a i{font-size: 30px; color: #737383;}
|
||||
|
||||
/** 表格 **/
|
||||
.layui-table{width: 100%; margin: 10px 0; background-color: #fff;}
|
||||
.layui-table{width: 100%; margin: 10px 0; background-color: #fff; color: #666;}
|
||||
.layui-table tr{transition: all .3s; -webkit-transition: all .3s;}
|
||||
.layui-table th{text-align: left; font-weight: 400;}
|
||||
|
||||
.layui-table thead tr,
|
||||
.layui-table-header,
|
||||
.layui-table-fixed-l tr,
|
||||
.layui-table-tool,
|
||||
.layui-table-patch,
|
||||
.layui-table-mend{background-color: #f2f2f2;}
|
||||
.layui-table th{text-align: left; font-weight: 400;}
|
||||
.layui-table-mend{background-color: #f8f8f8;}
|
||||
|
||||
.layui-table th,
|
||||
.layui-table td,
|
||||
@@ -687,12 +578,15 @@ a cite{font-style: normal; *cursor:pointer;}
|
||||
.layui-table[lay-skin="row"],
|
||||
.layui-table-view,
|
||||
.layui-table-header,
|
||||
.layui-table-tool{border: 1px solid #e2e2e2}
|
||||
.layui-table-tool,
|
||||
.layui-table-page,
|
||||
.layui-table-fixed-r,
|
||||
.layui-table-tips-main{border-width: 1px; border-style: solid; border-color: #eee;}
|
||||
|
||||
.layui-table th, .layui-table td{position: relative; padding: 9px 15px; min-height: 20px; line-height: 20px; font-size: 14px;}
|
||||
.layui-table[lay-even] tr:nth-child(even){background-color: #f8f8f8;}
|
||||
.layui-table tbody tr:hover,
|
||||
.layui-table-hover{background-color: #f2f2f2!important;}
|
||||
.layui-table-hover{background-color: #f8f8f8!important;}
|
||||
.layui-table-click{background-color: #FFEEE8!important;}
|
||||
|
||||
.layui-table[lay-skin="line"] th, .layui-table[lay-skin="line"] td{border-width: 0; border-bottom-width: 1px;}
|
||||
@@ -710,7 +604,9 @@ a cite{font-style: normal; *cursor:pointer;}
|
||||
|
||||
/* 数据表格 */
|
||||
.layui-table[lay-data]{display: none;}
|
||||
.layui-table-view{position: relative; margin: 10px 0; overflow: hidden;}
|
||||
.layui-table-view,
|
||||
.layui-table-box{position: relative; overflow: hidden;}
|
||||
.layui-table-view{margin: 10px 0;}
|
||||
.layui-table-view .layui-table{position: relative; width: auto; margin: 0;}
|
||||
.layui-table-view .layui-table[lay-skin="line"]{border-width: 0; border-right-width: 1px;}
|
||||
.layui-table-view .layui-table[lay-skin="row"]{border-width: 0; border-bottom-width: 1px;}
|
||||
@@ -721,49 +617,62 @@ a cite{font-style: normal; *cursor:pointer;}
|
||||
.layui-table-header{border-width: 0; border-bottom-width: 1px; overflow: hidden;}
|
||||
.layui-table-header .layui-table{margin-bottom: -1px;}
|
||||
.layui-table-sort{width: 20px; height: 20px; margin-left: 5px; cursor: pointer!important;}
|
||||
.layui-table-sort .layui-edge{left: 5px; border-width: 5px;}
|
||||
.layui-table-sort .layui-edge{position: absolute; left: 5px; border-width: 5px;}
|
||||
.layui-table-sort .layui-table-sort-asc{top: 4px; border-top: none; border-bottom-style: solid; border-bottom-color: #b2b2b2;}
|
||||
.layui-table-sort .layui-table-sort-asc:hover{border-bottom-color: #666;}
|
||||
.layui-table-sort .layui-table-sort-desc{bottom: 4px; border-bottom: none; border-top-style: solid; border-top-color: #b2b2b2;}
|
||||
.layui-table-sort .layui-table-sort-desc:hover{border-top-color: #666;}
|
||||
.layui-table-sort[lay-sort="asc"] .layui-table-sort-asc{border-bottom-color: #000;}
|
||||
.layui-table-sort[lay-sort="desc"] .layui-table-sort-desc{border-top-color: #000;}
|
||||
.layui-table-cell{height: 28px; line-height: 28px; padding: 0 15px; position: relative; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; box-sizing: border-box;}
|
||||
.layui-table-cell .layui-form-checkbox{top: -1px;}
|
||||
.layui-table-cell{height: 28px; line-height: 28px; padding: 0 15px; position: relative; overflow: hidden; /*text-overflow: ellipsis;*/ white-space: nowrap; box-sizing: border-box;}
|
||||
.layui-table-cell .layui-form-checkbox[lay-skin="primary"]{top: -1px; vertical-align: middle;}
|
||||
.layui-table-cell .layui-table-link{color: #01AAED;}
|
||||
.laytable-cell-space{width: 15px; padding: 0; text-align: center;}
|
||||
|
||||
.laytable-cell-checkbox,
|
||||
.laytable-cell-space,
|
||||
.laytable-cell-numbers{padding: 0; text-align: center;}
|
||||
|
||||
.layui-table-body{position: relative; overflow: auto; margin-right: -1px; margin-bottom: -1px;}
|
||||
.layui-table-body .layui-none{line-height: 40px; text-align: center; color: #999;}
|
||||
.layui-table-fixed{position: absolute; left: 0; top: 0;}
|
||||
.layui-table-fixed .layui-table-body{overflow: hidden;}
|
||||
.layui-table-fixed-r{left: auto; right: -1px; border-left: 1px solid #e2e2e2; box-shadow: -1px 0 8px rgba(0,0,0,.1);}
|
||||
.layui-table-fixed-l{box-shadow: 0 -1px 8px rgba(0,0,0,.06);}
|
||||
.layui-table-fixed-r{left: auto; right: -1px; border-width: 0; border-left-width: 1px; box-shadow: -1px 0 8px rgba(0,0,0,.06);}
|
||||
.layui-table-fixed-r .layui-table-header{position: relative; overflow: visible;}
|
||||
.layui-table-mend{position: absolute; right: -49px; top: 0; height: 100%; width: 50px;}
|
||||
.layui-table-tool{position: relative; width: 100%; padding: 7px 10px 0 0; border-width: 0; border-top-width: 1px; height: 41px; margin-bottom: -1px; font-size: 12px; white-space: nowrap;}
|
||||
.layui-table-tool:hover{overflow-x: auto;}
|
||||
|
||||
.layui-table-page{height: 26px;}
|
||||
.layui-table-tool .layui-laypage{margin: 0;}
|
||||
.layui-table-tool .layui-laypage span,
|
||||
.layui-table-tool .layui-laypage a{height: 26px; line-height: 26px; border: none; background: none; padding: 0 12px}
|
||||
.layui-table-tool .layui-laypage .layui-laypage-count,
|
||||
.layui-table-tool .layui-laypage .layui-laypage-limits,
|
||||
.layui-table-tool .layui-laypage .layui-laypage-skip{margin-left: 0; padding: 0;}
|
||||
.layui-table-tool .layui-laypage .layui-laypage-total{padding: 0 10px;}
|
||||
.layui-table-tool .layui-laypage .layui-laypage-spr{padding: 0;}
|
||||
.layui-table-tool .layui-laypage input,
|
||||
.layui-table-tool .layui-laypage button{height: 26px; line-height: 26px; }
|
||||
.layui-table-tool .layui-laypage input{width: 40px;}
|
||||
.layui-table-tool .layui-laypage button{padding: 0 10px;}
|
||||
.layui-table-tool{position: relative; width: 100%; height: 50px; line-height: 30px; padding: 10px 15px; border-width: 0; border-bottom-width: 1px;}
|
||||
|
||||
.layui-table-page{position: relative; width: 100%; padding: 7px 10px 0 0; border-width: 0; border-top-width: 1px; height: 41px; margin-bottom: -1px; font-size: 12px; white-space: nowrap;}
|
||||
.layui-table-page:hover{overflow-x: auto;}
|
||||
.layui-table-page>div{height: 26px;}
|
||||
.layui-table-page .layui-laypage{margin: 0;}
|
||||
.layui-table-page .layui-laypage a,
|
||||
.layui-table-page .layui-laypage span{height: 26px; line-height: 26px; border: none; background: none;}
|
||||
.layui-table-page .layui-laypage a,
|
||||
.layui-table-page .layui-laypage span.layui-laypage-curr{padding: 0 12px;}
|
||||
.layui-table-page .layui-laypage span{margin-left: 0; padding: 0;}
|
||||
.layui-table-page .layui-laypage .layui-laypage-curr .layui-laypage-em{left: 0; top: 0; padding: 0;}
|
||||
.layui-table-page .layui-laypage input,
|
||||
.layui-table-page .layui-laypage button{height: 26px; line-height: 26px; }
|
||||
.layui-table-page .layui-laypage input{width: 40px;}
|
||||
.layui-table-page .layui-laypage button{padding: 0 10px;}
|
||||
.layui-table-view select[lay-ignore]{display: inline-block;}
|
||||
.layui-table-tool select{height: 18px;}
|
||||
.layui-table-page select{height: 18px;}
|
||||
|
||||
.layui-table-patch .layui-table-cell{padding: 0; width: 30px;}
|
||||
.layui-table-edit{position: absolute; left: 0; top: 0; width: 100%; height: 100%; padding: 0 15px 1px; border: none;}
|
||||
.layui-table-edit:focus{background-color: #F0F9F2;}
|
||||
|
||||
.layui-table-edit{position: absolute; left: 0; top: 0; width: 100%; height: 100%; padding: 0 14px 1px; border-radius: 0; box-shadow: 1px 1px 20px rgba(0,0,0,.15)}
|
||||
.layui-table-edit:focus{border-color: #5FB878!important;}
|
||||
select.layui-table-edit{padding: 0 0 0 10px; border-color: #C9C9C9;}
|
||||
.layui-table-view .layui-form-switch,
|
||||
.layui-table-view .layui-form-checkbox,
|
||||
.layui-table-view .layui-form-radio{top: 0; margin: 0; box-sizing: content-box;}
|
||||
.layui-table-view .layui-form-checkbox{height: 26px; line-height: 26px; vertical-align: top;}
|
||||
|
||||
|
||||
body .layui-table-tips .layui-layer-content{background: none; padding: 0; box-shadow: 0 1px 6px rgba(0,0,0,.1);}
|
||||
.layui-table-tips-main{margin: -44px 0 0 -1px; max-height: 150px; padding: 8px 15px; font-size: 14px; overflow-y: scroll; background-color: #fff; color: #333; border: 1px solid #e2e2e2}
|
||||
.layui-table-tips-main{margin: -44px 0 0 -1px; max-height: 150px; padding: 8px 15px; font-size: 14px; overflow-y: scroll; background-color: #fff; color: #333;}
|
||||
.layui-table-tips-c{position: absolute; right: -3px; top: -12px; width: 18px; height: 18px; padding: 3px; text-align: center; font-weight: 700; border-radius: 100%; font-size: 14px; cursor: pointer; background-color: #666;}
|
||||
.layui-table-tips-c:hover{background-color: #999;}
|
||||
|
||||
@@ -781,12 +690,11 @@ body .layui-table-tips .layui-layer-content{background: none; padding: 0; box-sh
|
||||
.layui-upload-wrap .layui-upload-file{display: block!important; position: absolute; left: 0; top: 0; z-index: 10; font-size: 100px; width: 100%; height: 100%; opacity: .01; filter: Alpha(opacity=1); cursor: pointer;}
|
||||
|
||||
|
||||
|
||||
/** 代码修饰器 **/
|
||||
.layui-code{position: relative; margin: 10px 0; padding: 15px; line-height: 20px; border: 1px solid #ddd; border-left-width: 6px; background-color: #F2F2F2; color: #333; font-family: Courier New; font-size: 12px;}
|
||||
|
||||
|
||||
/** 树组件 **/
|
||||
/** 树组件(重写中) **/
|
||||
.layui-tree{line-height: 26px;}
|
||||
.layui-tree li{text-overflow: ellipsis; overflow:hidden; white-space: nowrap;}
|
||||
.layui-tree li a,
|
||||
@@ -867,23 +775,23 @@ body .layui-table-tips .layui-layer-content{background: none; padding: 0; box-sh
|
||||
|
||||
/** 面包屑 **/
|
||||
.layui-breadcrumb{visibility: hidden; font-size: 0;}
|
||||
.layui-breadcrumb a{padding-right: 8px; line-height: 22px; font-size: 14px; color: #333 !important;}
|
||||
.layui-breadcrumb a:hover{color: #01AAED !important;}
|
||||
.layui-breadcrumb a span,
|
||||
.layui-breadcrumb a cite{ color: #666; cursor: text; font-style: normal;}
|
||||
.layui-breadcrumb a span{padding-left: 8px; font-family: Sim sun;}
|
||||
.layui-breadcrumb>*{font-size: 14px;}
|
||||
.layui-breadcrumb a{color: #999 !important;}
|
||||
.layui-breadcrumb a:hover{color: #5FB878 !important;}
|
||||
.layui-breadcrumb a cite{color: #666; font-style: normal;}
|
||||
.layui-breadcrumb span[lay-separator]{margin: 0 10px; color: #999;}
|
||||
|
||||
/** Tab选项卡 **/
|
||||
.layui-tab{margin: 10px 0; text-align: left !important;}
|
||||
.layui-tab[overflow]>.layui-tab-title{overflow: hidden;}
|
||||
.layui-tab-title{position: relative; left: 0; height: 40px; white-space: nowrap; font-size: 0; border-bottom: 1px solid #e2e2e2; transition: all .2s; -webkit-transition: all .2s;}
|
||||
.layui-tab-title{position: relative; left: 0; height: 40px; white-space: nowrap; font-size: 0; border-bottom-width: 1px; border-bottom-style: solid; transition: all .2s; -webkit-transition: all .2s;}
|
||||
.layui-tab-title li{display: inline-block; *display: inline; *zoom: 1; vertical-align: middle; font-size: 14px; transition: all .2s; -webkit-transition: all .2s;}
|
||||
.layui-tab-title li{position: relative; line-height: 40px; min-width: 65px; padding: 0 15px; text-align: center; cursor: pointer;}
|
||||
.layui-tab-title li a{display: block;}
|
||||
.layui-tab-title .layui-this{color: #000;}
|
||||
|
||||
.layui-tab-title .layui-this:after{position: absolute; left:0; top: 0; content: ''; width:100%; height: 41px; border: 1px solid #e2e2e2; border-bottom-color: #fff; border-radius: 2px 2px 0 0; box-sizing: border-box; pointer-events: none;}
|
||||
.layui-tab-bar{position: absolute; right: 0; top: 0; z-index: 10; width: 30px; height: 39px; line-height: 39px; border: 1px solid #e2e2e2; border-radius: 2px; text-align: center; background-color: #fff; cursor: pointer;}
|
||||
.layui-tab-title .layui-this:after{position: absolute; left:0; top: 0; content: ''; width:100%; height: 41px; border-width: 1px; border-style: solid; border-bottom-color: #fff; border-radius: 2px 2px 0 0; box-sizing: border-box; pointer-events: none;}
|
||||
.layui-tab-bar{position: absolute; right: 0; top: 0; z-index: 10; width: 30px; height: 39px; line-height: 39px; border-width: 1px; border-style: solid; border-radius: 2px; text-align: center; background-color: #fff; cursor: pointer;}
|
||||
.layui-tab-bar .layui-icon{position: relative; display: inline-block; top: 3px; transition: all .3s; -webkit-transition: all .3s;}
|
||||
.layui-tab-item{display: none;}
|
||||
.layui-tab-more{padding-right: 30px; height: auto !important; white-space: normal !important;}
|
||||
@@ -901,7 +809,7 @@ body .layui-table-tips .layui-layer-content{background: none; padding: 0; box-sh
|
||||
,.layui-tab-brief > .layui-tab-more li.layui-this:after{border: none; border-radius: 0; border-bottom: 2px solid #5FB878;}
|
||||
.layui-tab-brief[overflow] > .layui-tab-title .layui-this:after{top: -1px;}
|
||||
|
||||
/* Tab卡片风格 */.layui-tab-card{border: 1px solid #e2e2e2; border-radius: 2px; box-shadow: 0 2px 5px 0 rgba(0,0,0,.1);}
|
||||
/* Tab卡片风格 */.layui-tab-card{border-width: 1px; border-style: solid; border-radius: 2px; box-shadow: 0 2px 5px 0 rgba(0,0,0,.1);}
|
||||
.layui-tab-card > .layui-tab-title{ background-color: #f2f2f2;}
|
||||
.layui-tab-card > .layui-tab-title li{margin-right: -1px; margin-left: -1px;}
|
||||
.layui-tab-card > .layui-tab-title .layui-this{background-color: #fff; }
|
||||
@@ -915,7 +823,7 @@ body .layui-table-tips .layui-layer-content{background: none; padding: 0; box-sh
|
||||
.layui-timeline-item{position: relative; padding-bottom: 20px;}
|
||||
.layui-timeline-axis{position: absolute; left: -5px; top: 0; z-index: 10; width: 20px; height: 20px; line-height: 20px; background-color: #fff; color: #5FB878; border-radius: 50%; text-align: center; cursor: pointer;}
|
||||
.layui-timeline-axis:hover{color: #FF5722;}
|
||||
.layui-timeline-item:before{content: ''; position: absolute; left: 5px; top: 0; z-index: 0; width: 1px; height: 100%; background-color: #e2e2e2;}
|
||||
.layui-timeline-item:before{content: ''; position: absolute; left: 5px; top: 0; z-index: 0; width: 1px; height: 100%;}
|
||||
.layui-timeline-item:last-child:before{display: none;}
|
||||
.layui-timeline-item:first-child:before{display: block;}
|
||||
.layui-timeline-content{padding-left: 25px;;}
|
||||
@@ -924,10 +832,10 @@ body .layui-table-tips .layui-layer-content{background: none; padding: 0; box-sh
|
||||
/* 小徽章 */
|
||||
.layui-badge,
|
||||
.layui-badge-dot,
|
||||
.layui-badge-rim{position:relative; display: inline-block; font-size: 12px; background-color: #FF5722; color: #fff;}
|
||||
.layui-badge{min-width: 8px; height: 18px; line-height: 18px; padding: 0 5px; text-align: center; border-radius: 2px;}
|
||||
.layui-badge-dot{width: 8px; height: 8px; border-radius: 50%;}
|
||||
.layui-badge-rim{height: 18px; line-height: 18px; padding: 0 5px; border: 1px solid #e2e2e2; border-radius: 3px; background-color: #fff; color: #666;}
|
||||
.layui-badge-rim{position:relative; display: inline-block; padding: 0 6px; font-size: 12px; text-align: center; background-color: #FF5722; color: #fff; border-radius: 2px;}
|
||||
.layui-badge{height: 18px; line-height: 18px;}
|
||||
.layui-badge-dot{width: 8px; height: 8px; padding: 0; border-radius: 50%;}
|
||||
.layui-badge-rim{height: 18px; line-height: 18px; border-width: 1px; border-style: solid; background-color: #fff; color: #666;}
|
||||
|
||||
.layui-btn .layui-badge,
|
||||
.layui-btn .layui-badge-dot{margin-left: 5px;}
|
||||
@@ -937,10 +845,10 @@ body .layui-table-tips .layui-layer-content{background: none; padding: 0; box-sh
|
||||
.layui-tab-title .layui-badge-dot{left: 5px; top: -2px;}
|
||||
|
||||
/* carousel 轮播 */
|
||||
.layui-carousel{position: relative; left: 0; top: 0; background-color: #f2f2f2;}
|
||||
.layui-carousel{position: relative; left: 0; top: 0; background-color: #f8f8f8;}
|
||||
.layui-carousel>*[carousel-item]{position: relative; width: 100%; height: 100%; overflow: hidden;}
|
||||
.layui-carousel>*[carousel-item]:before{position: absolute; content: '\e63d'; left: 50%; top: 50%; width: 100px; line-height: 20px; margin: -10px 0 0 -50px; text-align: center; color: #999; font-family:"layui-icon" !important; font-size: 20px; font-style:normal; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;}
|
||||
.layui-carousel>*[carousel-item] > *{display: none; position: absolute; left: 0; top: 0; width: 100%; height: 100%; background-color: #f2f2f2; transition-duration: .3s; -webkit-transition-duration: .3s;}
|
||||
.layui-carousel>*[carousel-item]:before{position: absolute; content: '\e63d'; left: 50%; top: 50%; width: 100px; line-height: 20px; margin: -10px 0 0 -50px; text-align: center; color: #c2c2c2; font-family:"layui-icon" !important; font-size: 30px; font-style: normal; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;}
|
||||
.layui-carousel>*[carousel-item] > *{display: none; position: absolute; left: 0; top: 0; width: 100%; height: 100%; background-color: #f8f8f8; transition-duration: .3s; -webkit-transition-duration: .3s;}
|
||||
.layui-carousel-updown > *{-webkit-transition: .3s ease-in-out up; transition: .3s ease-in-out up;}
|
||||
.layui-carousel-arrow{display: none\0; opacity: 0; position: absolute; left: 10px; top: 50%; margin-top: -18px; width: 36px; height: 36px; line-height: 36px; text-align: center; font-size: 20px; border: none 0; border-radius: 50%; background-color: rgba(0,0,0,.2); color: #fff; -webkit-transition-duration: .3s; transition-duration: .3s; cursor: pointer;}
|
||||
.layui-carousel-arrow[lay-type="add"]{left: auto!important; right: 10px;}
|
||||
@@ -1045,17 +953,6 @@ body .layui-util-face .layui-layer-content{padding:0; background-color:#fff; co
|
||||
}
|
||||
.layui-anim-upbit{-webkit-animation-name: layui-upbit; animation-name: layui-upbit;}
|
||||
|
||||
@-webkit-keyframes layui-movey{ /* 垂直位移 */
|
||||
0% {-webkit-transform: translate3d(0, 50px, 0);}
|
||||
50% {-webkit-transform: translate3d(0, -50px, 0);}
|
||||
100% {-webkit-transform: translate3d(0, 50px, 0);}
|
||||
}
|
||||
@keyframes layui-movey{
|
||||
0% {transform: translate3d(0, 50px, 0);}
|
||||
50% {transform: translate3d(0, -50px, 0);}
|
||||
100% {transform: translate3d(0, 50px, 0);}
|
||||
}
|
||||
.layui-anim-movey{-webkit-animation-name: layui-movey; animation-name: layui-movey;}
|
||||
|
||||
@-webkit-keyframes layui-scale { /* 放大 */
|
||||
0% {opacity: 0.3; -webkit-transform: scale(.5);}
|
||||
|
||||
@@ -114,7 +114,7 @@ html #layuicss-laydate{display: none; position: absolute; width: 1989px;}
|
||||
.layui-laydate-content .laydate-day-prev,
|
||||
.layui-laydate-content .laydate-day-next{color: #d2d2d2;}
|
||||
.laydate-selected.laydate-day-prev,
|
||||
.laydate-selected.laydate-day-next{color: #fff !important;}
|
||||
.laydate-selected.laydate-day-next{background-color: #f8f8f8 !important;}
|
||||
.layui-laydate-footer{border-top: 1px solid #e2e2e2;}
|
||||
.layui-laydate-hint{color: #FF5722;}
|
||||
.laydate-day-mark::after{background-color: #5FB878;}
|
||||
|
||||
Binary file not shown.
@@ -339,6 +339,9 @@ t9.5 -10.5t21.5 -4h37h67h81h80h64h36q23 0 34 12t2 38q-5 13 -9.5 30.5t-9.5 34.5q-
|
||||
<glyph glyph-name="sanjiao1" unicode="" d="M773.128299 88.652342M889.696178 575.195553 158.862147 575.195553 524.357446 209.647043 889.696178 575.195553Z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="tips" unicode="" d="M967.280184 578.537671c-24.915459 58.887178-60.544935 111.76755-105.96745 157.161413-45.393863 45.393863-98.273211 81.051991-157.160389 105.96745-60.988026 25.803689-125.735679 38.853913-192.494129 38.853913-66.729797 0-131.504056-13.0799-192.494129-38.853913-58.887178-24.916483-111.766526-60.544935-157.160389-105.96745-45.393863-45.393863-81.051991-98.274234-105.96745-157.161413-25.803689-60.988026-38.884612-125.734656-38.884612-192.464453s13.0799-131.50508 38.884612-192.464453c24.915459-58.887178 60.544935-111.737874 105.96745-157.161413 45.393863-45.393863 98.273211-81.051991 157.160389-105.96745 60.988026-25.803689 125.735679-38.853913 192.494129-38.853913 66.729797 0 131.504056 13.0799 192.494129 38.853913 58.887178 24.916483 111.766526 60.544935 157.160389 105.96745 45.393863 45.393863 81.051991 98.274234 105.96745 157.161413 25.803689 60.988026 38.853913 125.734656 38.853913 192.464453S993.084896 517.549645 967.280184 578.537671zM511.687892-55.138552000000004c-243.302305 0-441.241446 197.909465-441.241446 441.21177S268.385587 827.284989 511.687892 827.284989c243.273652-0.029676 441.210747-197.938118 441.210747-441.21177S754.990197-55.138552000000004 511.687892-55.138552000000004zM511.657192 573.565427m-45.511543 0a44.475 44.475 0 1 1 91.023086 0 44.475 44.475 0 1 1-91.023086 0ZM542.729885 184.14011300000004c0-17.162892-13.906731-31.071669-31.070646-31.071669l0 0c-17.163915 0-31.070646 13.907755-31.070646 31.071669L480.588593 426.998303c0 17.162892 13.906731 31.071669 31.070646 31.071669l0 0c17.163915 0 31.070646-13.907755 31.070646-31.071669L542.729885 184.14011300000004z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="tupian-copy-copy" unicode="" d="M765.376 615.424c0 0 103.040 1.024 103.040-100.992 0 0 9.536-98.752-103.040-100.928 0 0-100.864-2.176-99.84 100.928 0 0.064-1.088 91.456 99.84 100.992zM968.32 770.56c0 0 54.208-4.224 54.208-52.032v-712.832c0 0-3.2-51.008-54.208-52.096v816.96zM1.472 5.632c0 0 2.176-52.096 52.096-52.096h914.752v150.848h-99.712l-203.072 206.144-153.024-153.984-208.192 257.024-205.056-307.072-45.632-1.024-1.152 612.992h-51.008v-712.832zM968.32 770.56h-914.752c0 0-52.096 1.088-52.096-52.032h966.848v52.032z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
@@ -405,6 +408,9 @@ t9.5 -10.5t21.5 -4h37h67h81h80h64h36q23 0 34 12t2 38q-5 13 -9.5 30.5t-9.5 34.5q-
|
||||
<glyph glyph-name="xiangji" unicode="" d="M884.3 648.6H704.2L679.5 698l-0.2 0.4c-1.9 3.6-3.6 6.9-5.1 9.9-12 23.4-21.5 41.9-54.1 41.9H416.7c-32.9 0-43.7-21.3-55.1-43.8-1.3-2.6-2.7-5.3-4.2-8.1l-24.8-49.7H152.4c-34 0-61.7-27.7-61.7-61.7v-488c0-34 27.7-61.7 61.7-61.7h731.9c34 0 61.7 27.7 61.7 61.7v488c0 34-27.7 61.7-61.7 61.7zM904 98.9c0-10.8-8.8-19.7-19.7-19.7H152.4c-10.8 0-19.7 8.8-19.7 19.7v488c0 10.8 8.8 19.7 19.7 19.7h206.1l36.2 72.5c1.5 2.9 2.9 5.7 4.3 8.3 10.6 20.8 11.1 20.8 17.7 20.8H620c4.6 0 5.8-0.6 5.8-0.6 2-1.2 7.2-11.2 10.9-18.5 1.6-3.1 3.3-6.5 5.3-10.1l36.2-72.4h206.1c10.8 0 19.7-8.8 19.7-19.7v-488zM525.5 565.5c-123.5 0-223.6-100.1-223.6-223.6S402 118.2 525.5 118.2s223.7 100.1 223.7 223.7c0 123.5-100.2 223.6-223.7 223.6z m0-402.5c-98.8 0-178.9 80.1-178.9 178.9 0 98.8 80.1 178.9 178.9 178.9 98.8 0 178.9-80.1 178.9-178.9 0-98.8-80.1-178.9-178.9-178.9z m246 402.5v-44.7H861v44.7h-89.5z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="note" unicode="" d="M987.2 384.36L512.43 859.13a84.75 84.75 0 0 1-65 24.71L111.55 864.09a84.83 84.83 0 0 1-79.65-79.65L12.15 448.57a84.57 84.57 0 0 1 24.69-65l474.8-474.8a84.91 84.91 0 0 1 119.93 0L987.2 264.41999999999996a84.9 84.9 0 0 1 0 119.94z m-39.28-80.66L592.29-51.91999999999996a29.31 29.31 0 0 0-41.37 0L76.1 422.9a29.22 29.22 0 0 0-8.49 22.38l19.74 335.88a29.29 29.29 0 0 0 27.48 27.48l335.9 19.75a29.32 29.32 0 0 0 22.38-8.52l474.8-474.8a29.31 29.31 0 0 0 0.01-41.37zM236.86 659.14c-50.92-50.95-50.92-133.8 0-184.72a130.61 130.61 0 1 1 184.71 184.72c-50.89 50.86-133.77 50.86-184.71 0zM382.29 513.7c-28.38-28.38-77.78-28.38-106.15 0a75.08 75.08 0 1 0 106.15 0z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="refresh" unicode="" d="M928 810.666667c-18.133333 0-32-13.866667-32-32v-164.266667C816 747.733333 669.866667 832 512 832 264.533333 832 64 631.4666669999999 64 384s200.533333-448 448-448c230.4 0 422.4 172.8 445.866667 402.133333 2.133333 17.066667-10.666667 33.066667-28.8 35.2-17.066667 2.133333-33.066667-10.666667-35.2-28.8C873.6 148.26666699999998 709.333333 0 512 0c-212.266667 0-384 171.733333-384 384s171.733333 384 384 384c137.6 0 264.533333-74.666667 332.8-192H693.333333c-18.133333 0-32-13.866667-32-32s13.866667-32 32-32h266.666667V778.666667c0 18.133333-14.933333 32-32 32z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
@@ -429,9 +435,6 @@ t9.5 -10.5t21.5 -4h37h67h81h80h64h36q23 0 34 12t2 38q-5 13 -9.5 30.5t-9.5 34.5q-
|
||||
<glyph glyph-name="shoucang" unicode="" d="M752-43.2c-9.6 0-20.8 3.2-30.4 8l-208 104-209.6-104c-20.8-11.2-48-9.6-67.2 4.8-19.2 14.4-30.4 40-25.6 64l43.2 224L89.6 411.2C72 428.8 65.6 456 72 478.4c8 24 27.2 41.6 52.8 44.8l228.8 41.6 102.4 208c11.2 22.4 33.6 36.8 57.6 36.8s48-14.4 57.6-36.8l102.4-208 228.8-40c24-3.2 44.8-20.8 51.2-44.8 8-24 1.6-49.6-16-67.2L772.8 257.6l41.6-224c4.8-25.6-6.4-49.6-25.6-64-9.6-8-22.4-12.8-36.8-12.8z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="shuaxin2" unicode="" d="M854 560.7l-0.3-0.2c-5.6 9.3-15.9 15.6-27.6 15.6-17.8 0-32.2-14.4-32.2-32.1 0-5.3 1.3-10.3 3.6-14.7h-0.1c22-43.4 34.4-92.5 34.4-144.5C831.8 208.2 688.6 65 512 65S192.2 208.1 192.2 384.8c0 152.4 106.5 279.2 249.1 311.2l-33.6-43.7c-10.8-14-8.1-34.2 5.9-45 14-10.8 34.2-8.1 45 5.9l75.3 97.8c6.5 5.9 10.6 14.4 10.6 23.8 0 11.3-5.9 21.2-14.7 27L429.3 838.9c-13.8 10.6-33.8 8-44.4-5.7l-0.6-0.8c-10.6-13.8-8-33.7 5.8-44.3l38.4-29.5C257 720.1 128.9 566.9 128.9 383.8c0-212.1 172-384.1 384.1-384.1s384.1 172 384.1 384.1c0 63.8-15.5 124-43.1 176.9zM708.9 637.9a32.2 32.1 0 1 1 64.4 0 32.2 32.1 0 1 1-64.4 0Z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="moban1" unicode="" d="M512 384zM43.52 601.6l409.6-176.64c58.88-30.72 110.08 0 110.08 0l414.72 174.08 2.56 2.56c10.24 5.12 15.36 15.36 15.36 28.16 0 15.36-10.24 28.16-23.04 30.72L563.2 837.12c-56.32 23.04-97.28 0-97.28 0L46.08 660.48c-12.8-5.12-20.48-17.92-20.48-30.72s7.68-23.04 17.92-28.16z m0 0M512 222.72c-2.56 0-7.68 0-10.24 2.56l-486.4 215.04c-12.8 5.12-17.92 20.48-12.8 33.28 5.12 12.8 20.48 17.92 33.28 12.8L512 276.48 988.16 486.4c12.8 5.12 28.16 0 33.28-12.8 5.12-12.8 0-28.16-12.8-33.28l-486.4-215.04c-2.56-2.56-7.68-2.56-10.24-2.56zM512 71.68c-2.56 0-7.68 0-10.24 2.56l-486.4 215.04c-12.8 5.12-17.92 20.48-12.8 33.28 5.12 10.24 20.48 17.92 33.28 10.24L512 125.44 988.16 332.8c12.8 5.12 28.16 0 33.28-12.8 5.12-12.8 0-28.16-12.8-33.28l-486.4-215.04H512zM512-79.36c-2.56 0-7.68 0-10.24 2.56l-486.4 215.04c-12.8 5.12-17.92 20.48-12.8 33.28 5.12 12.8 20.48 17.92 33.28 12.8L512-25.6l476.16 209.92c12.8 5.12 28.16 0 33.28-12.8 5.12-12.8 0-28.16-12.8-33.28l-486.4-215.04c-2.56-2.56-7.68-2.56-10.24-2.56z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 221 KiB After Width: | Height: | Size: 222 KiB |
Binary file not shown.
Binary file not shown.
@@ -88,10 +88,10 @@ layui.define('jquery', function(exports){
|
||||
|
||||
//初始焦点状态
|
||||
that.elemItem.eq(options.index).addClass(THIS);
|
||||
|
||||
|
||||
//指示器等动作
|
||||
that.indicator();
|
||||
if(that.elemItem.length <= 1) return;
|
||||
that.indicator();
|
||||
that.arrow();
|
||||
that.autoplay();
|
||||
that.events();
|
||||
|
||||
@@ -359,12 +359,13 @@ layui.define('jquery', function(exports){
|
||||
|
||||
$(ELEM + elemFilter).each(function(){
|
||||
var othis = $(this)
|
||||
,separator = othis.attr('lay-separator') || '>'
|
||||
,ATTE_SPR = 'lay-separator'
|
||||
,separator = othis.attr(ATTE_SPR) || '/'
|
||||
,aNode = othis.find('a');
|
||||
if(aNode.find('.layui-box')[0]) return;
|
||||
if(aNode.next('span['+ ATTE_SPR +']')[0]) return;
|
||||
aNode.each(function(index){
|
||||
if(index === aNode.length - 1) return;
|
||||
$(this).append('<span class="layui-box">'+ separator +'</span>');
|
||||
$(this).after('<span '+ ATTE_SPR +'>'+ separator +'</span>');
|
||||
});
|
||||
othis.css('visibility', 'visible');
|
||||
});
|
||||
|
||||
@@ -195,15 +195,14 @@ layui.define('layer', function(exports){
|
||||
dl.find('.'+NONE).remove();
|
||||
}
|
||||
};
|
||||
|
||||
if(isSearch){
|
||||
input.on('keyup', search).on('blur', function(e){
|
||||
thatInput = input;
|
||||
initValue = dl.find('.'+THIS).html();
|
||||
initValue = dl.find('.' + THIS).html();
|
||||
setTimeout(function(){
|
||||
notOption(input.val(), function(none){
|
||||
if(none && !initValue){
|
||||
input.val('');
|
||||
}
|
||||
initValue || input.val(''); //none && !initValue
|
||||
}, 'blur');
|
||||
}, 200);
|
||||
});
|
||||
@@ -410,22 +409,36 @@ layui.define('layer', function(exports){
|
||||
|
||||
//开始校验
|
||||
layui.each(verifyElem, function(_, item){
|
||||
var othis = $(this), ver = othis.attr('lay-verify').split('|');
|
||||
var tips = '', value = othis.val();
|
||||
var othis = $(this)
|
||||
,vers = othis.attr('lay-verify').split('|')
|
||||
,verType = othis.attr('lay-verType') //提示方式
|
||||
,value = othis.val();
|
||||
|
||||
othis.removeClass(DANGER);
|
||||
layui.each(ver, function(_, thisVer){
|
||||
var isFn = typeof verify[thisVer] === 'function';
|
||||
if(verify[thisVer] && (isFn ? tips = verify[thisVer](value, item) : !verify[thisVer][0].test(value)) ){
|
||||
layer.msg(tips || verify[thisVer][1], {
|
||||
icon: 5
|
||||
,shift: 6
|
||||
});
|
||||
//非移动设备自动定位焦点
|
||||
if(!device.android && !device.ios){
|
||||
item.focus();
|
||||
layui.each(vers, function(_, thisVer){
|
||||
var isTrue //是否命中校验
|
||||
,errorText = '' //错误提示文本
|
||||
,isFn = typeof verify[thisVer] === 'function';
|
||||
|
||||
//匹配验证规则
|
||||
if(verify[thisVer]){
|
||||
var isTrue = isFn ? errorText = verify[thisVer](value, item) : !verify[thisVer][0].test(value);
|
||||
errorText = errorText || verify[thisVer][1];
|
||||
|
||||
//如果是必填项或者非空命中校验,则阻止提交,弹出提示
|
||||
if((isTrue && thisVer === 'required') || (isTrue && value)){
|
||||
//提示层风格
|
||||
if(verType === 'tips'){
|
||||
layer.tips(errorText, othis, {tips: 1});
|
||||
} else if(verType === 'alert') {
|
||||
layer.alert(errorText, {title: '提示', shadeClose: true});
|
||||
} else {
|
||||
layer.msg(errorText, {icon: 5, shift: 6});
|
||||
}
|
||||
if(!device.android && !device.ios) item.focus(); //非移动设备自动定位焦点
|
||||
othis.addClass(DANGER);
|
||||
return stop = true;
|
||||
}
|
||||
othis.addClass(DANGER);
|
||||
return stop = true;
|
||||
}
|
||||
});
|
||||
if(stop) return stop;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
|
||||
@Name : layDate 5.0.8 日期时间控件
|
||||
@Name : layDate 5.0.85 日期时间控件
|
||||
@Author: 贤心
|
||||
@Site:http://www.layui.com/laydate/
|
||||
@License:MIT
|
||||
@@ -55,7 +55,7 @@
|
||||
}
|
||||
|
||||
,laydate = {
|
||||
v: '5.0.8'
|
||||
v: '5.0.85'
|
||||
,config: {} //全局配置项
|
||||
,index: (window.laydate && window.laydate.v) ? 100000 : 0
|
||||
,path: ready.getPath
|
||||
|
||||
@@ -58,10 +58,12 @@ layui.define(['laytpl', 'laypage', 'layer', 'form'], function(exports){
|
||||
//字符常量
|
||||
,MOD_NAME = 'table', ELEM = '.layui-table', THIS = 'layui-this', SHOW = 'layui-show', HIDE = 'layui-hide', DISABLED = 'layui-disabled', NONE = 'layui-none'
|
||||
|
||||
,ELEM_VIEW = 'layui-table-view', ELEM_HEADER = '.layui-table-header', ELEM_BODY = '.layui-table-body', ELEM_MAIN = '.layui-table-main', ELEM_FIXED = '.layui-table-fixed', ELEM_FIXL = '.layui-table-fixed-l', ELEM_FIXR = '.layui-table-fixed-r', ELEM_TOOL = '.layui-table-tool', ELEM_SORT = '.layui-table-sort', ELEM_EDIT = 'layui-table-edit', ELEM_HOVER = 'layui-table-hover'
|
||||
,ELEM_VIEW = 'layui-table-view', ELEM_HEADER = '.layui-table-header', ELEM_BODY = '.layui-table-body', ELEM_MAIN = '.layui-table-main', ELEM_FIXED = '.layui-table-fixed', ELEM_FIXL = '.layui-table-fixed-l', ELEM_FIXR = '.layui-table-fixed-r', ELEM_TOOL = '.layui-table-tool', ELEM_PAGE = '.layui-table-page', ELEM_SORT = '.layui-table-sort', ELEM_EDIT = 'layui-table-edit', ELEM_HOVER = 'layui-table-hover'
|
||||
|
||||
//thead区域模板
|
||||
,TPL_HEADER = function(options){
|
||||
var rowCols = '{{#if(item2.colspan){}} colspan="{{item2.colspan}}"{{#} if(item2.rowspan){}} rowspan="{{item2.rowspan}}"{{#}}}';
|
||||
|
||||
options = options || {};
|
||||
return ['<table cellspacing="0" cellpadding="0" border="0" class="layui-table" '
|
||||
,'{{# if(d.data.skin){ }}lay-skin="{{d.data.skin}}"{{# } }} {{# if(d.data.size){ }}lay-size="{{d.data.size}}"{{# } }} {{# if(d.data.even){ }}lay-even{{# } }}>'
|
||||
@@ -80,26 +82,27 @@ layui.define(['laytpl', 'laypage', 'layer', 'form'], function(exports){
|
||||
}
|
||||
return '';
|
||||
}()
|
||||
,'{{# if(item2.checkbox){ }}'
|
||||
,'<th data-field="{{ item2.field||i2 }}" data-type="checkbox" {{#if(item2.colspan){}} colspan="{{item2.colspan}}"{{#} if(item2.rowspan){}} rowspan="{{item2.rowspan}}"{{#}}} unresize="true"><div class="layui-table-cell laytable-cell-checkbox"><input type="checkbox" name="layTableCheckbox" lay-skin="primary" lay-filter="layTableAllChoose" {{# if(item2[d.data.checkName]){ }}checked{{# }; }}></div></th>'
|
||||
,'{{# } else if(item2.space){ }}'
|
||||
,'<th data-field="{{ item2.field||i2 }}" {{#if(item2.colspan){}} colspan="{{item2.colspan}}"{{#} if(item2.rowspan){}} rowspan="{{item2.rowspan}}"{{#}}} unresize="true"><div class="layui-table-cell laytable-cell-space"></div></th>'
|
||||
,'{{# } else { }}'
|
||||
,'<th data-field="{{ item2.field||i2 }}" {{#if(item2.colspan){}} colspan="{{item2.colspan}}"{{#} if(item2.rowspan){}} rowspan="{{item2.rowspan}}"{{#}}} {{# if(item2.unresize){ }}unresize="true"{{# } }}>'
|
||||
,'<th data-field="{{ item2.field||i2 }}" '+ rowCols +' {{# if(item2.unresize){ }}unresize="true"{{# } }}>'
|
||||
,'<div class="layui-table-cell laytable-cell-'
|
||||
,'{{# if(item2.colspan > 1){ }}'
|
||||
,'<div class="layui-table-cell laytable-cell-group" {{#if(item2.align){}}align="{{item2.align}}"{{#}}}>'
|
||||
,'<span>{{item2.title||""}}</span>'
|
||||
,'</div>'
|
||||
,'group'
|
||||
,'{{# } else { }}'
|
||||
,'<div class="layui-table-cell laytable-cell-{{d.index}}-{{item2.field||i2}}" {{#if(item2.align){}}align="{{item2.align}}"{{#}}}>'
|
||||
,'<span>{{item2.title||""}}</span>'
|
||||
,'{{# if(item2.sort){ }}'
|
||||
,'<span class="layui-table-sort layui-inline"><i class="layui-edge layui-table-sort-asc"></i><i class="layui-edge layui-table-sort-desc"></i></span>'
|
||||
,'{{# } }}'
|
||||
,'</div>'
|
||||
,'{{d.index}}-{{item2.field || i2}}'
|
||||
,'{{# if(item2.type !== "normal"){ }}'
|
||||
,' laytable-cell-{{ item2.type }}'
|
||||
,'{{# } }}'
|
||||
,'{{# } }}'
|
||||
,'</th>'
|
||||
,'{{# }; }}'
|
||||
,'" {{#if(item2.align){}}align="{{item2.align}}"{{#}}}>'
|
||||
,'{{# if(item2.type === "checkbox"){ }}' //复选框
|
||||
,'<input type="checkbox" name="layTableCheckbox" lay-skin="primary" lay-filter="layTableAllChoose" {{# if(item2[d.data.checkName]){ }}checked{{# }; }}>'
|
||||
,'{{# } else { }}'
|
||||
,'<span>{{item2.title||""}}</span>'
|
||||
,'{{# if(!(item2.colspan > 1) && item2.sort){ }}'
|
||||
,'<span class="layui-table-sort layui-inline"><i class="layui-edge layui-table-sort-asc"></i><i class="layui-edge layui-table-sort-desc"></i></span>'
|
||||
,'{{# } }}'
|
||||
,'{{# } }}'
|
||||
,'</div>'
|
||||
,'</th>'
|
||||
,(options.fixed ? '{{# }; }}' : '')
|
||||
,'{{# }); }}'
|
||||
,'</tr>'
|
||||
@@ -116,47 +119,58 @@ layui.define(['laytpl', 'laypage', 'layer', 'form'], function(exports){
|
||||
|
||||
//主模板
|
||||
,TPL_MAIN = ['<div class="layui-form layui-border-box {{d.VIEW_CLASS}}" lay-filter="LAY-table-{{d.index}}" style="{{# if(d.data.width){ }}width:{{d.data.width}}px;{{# } }} {{# if(d.data.height){ }}height:{{d.data.height}}px;{{# } }}">'
|
||||
,'{{# var left, right; }}'
|
||||
,'<div class="layui-table-header">'
|
||||
,TPL_HEADER()
|
||||
,'</div>'
|
||||
,'<div class="layui-table-body layui-table-main">'
|
||||
,TPL_BODY
|
||||
,'</div>'
|
||||
|
||||
,'{{# if(left){ }}'
|
||||
,'<div class="layui-table-fixed layui-table-fixed-l">'
|
||||
,'<div class="layui-table-header">'
|
||||
,TPL_HEADER({fixed: true})
|
||||
,'</div>'
|
||||
,'<div class="layui-table-body">'
|
||||
,TPL_BODY
|
||||
,'</div>'
|
||||
,'</div>'
|
||||
,'{{# }; }}'
|
||||
,'{{# if(d.data.toolbar){ }}'
|
||||
,'<div class="layui-table-tool"></div>'
|
||||
,'{{# } }}'
|
||||
|
||||
,'{{# if(right){ }}'
|
||||
,'<div class="layui-table-fixed layui-table-fixed-r">'
|
||||
,'<div class="layui-table-box">'
|
||||
,'{{# var left, right; }}'
|
||||
,'<div class="layui-table-header">'
|
||||
,TPL_HEADER({fixed: 'right'})
|
||||
,'<div class="layui-table-mend"></div>'
|
||||
,TPL_HEADER()
|
||||
,'</div>'
|
||||
,'<div class="layui-table-body">'
|
||||
,'<div class="layui-table-body layui-table-main">'
|
||||
,TPL_BODY
|
||||
,'</div>'
|
||||
|
||||
,'{{# if(left){ }}'
|
||||
,'<div class="layui-table-fixed layui-table-fixed-l">'
|
||||
,'<div class="layui-table-header">'
|
||||
,TPL_HEADER({fixed: true})
|
||||
,'</div>'
|
||||
,'<div class="layui-table-body">'
|
||||
,TPL_BODY
|
||||
,'</div>'
|
||||
,'</div>'
|
||||
,'{{# }; }}'
|
||||
|
||||
,'{{# if(right){ }}'
|
||||
,'<div class="layui-table-fixed layui-table-fixed-r">'
|
||||
,'<div class="layui-table-header">'
|
||||
,TPL_HEADER({fixed: 'right'})
|
||||
,'<div class="layui-table-mend"></div>'
|
||||
,'</div>'
|
||||
,'<div class="layui-table-body">'
|
||||
,TPL_BODY
|
||||
,'</div>'
|
||||
,'</div>'
|
||||
,'{{# }; }}'
|
||||
,'</div>'
|
||||
,'{{# }; }}'
|
||||
|
||||
,'{{# if(d.data.page){ }}'
|
||||
,'<div class="layui-table-tool">'
|
||||
,'<div class="layui-inline layui-table-page" id="layui-table-page{{d.index}}"></div>'
|
||||
,'<div class="layui-table-page">'
|
||||
,'<div id="layui-table-page{{d.index}}"></div>'
|
||||
,'</div>'
|
||||
,'{{# } }}'
|
||||
|
||||
,'<style>'
|
||||
,'{{# layui.each(d.data.cols, function(i1, item1){'
|
||||
,'layui.each(item1, function(i2, item2){ }}'
|
||||
,'.laytable-cell-{{d.index}}-{{item2.field||i2}}{ width:{{item2.width||50}}px }'
|
||||
,'.laytable-cell-{{d.index}}-{{item2.field||i2}}{ '
|
||||
,'{{# if(item2.width){ }}'
|
||||
,'width: {{item2.width}}px;'
|
||||
,'{{# } }}'
|
||||
,' }'
|
||||
,'{{# });'
|
||||
,'}); }}'
|
||||
,'</style>'
|
||||
@@ -175,19 +189,18 @@ layui.define(['laytpl', 'laypage', 'layer', 'form'], function(exports){
|
||||
|
||||
//默认配置
|
||||
Class.prototype.config = {
|
||||
limit: 30 //每页显示的数量
|
||||
limit: 10 //每页显示的数量
|
||||
,loading: true //请求数据时,是否显示loading
|
||||
};
|
||||
|
||||
//表格渲染
|
||||
Class.prototype.render = function(sets){
|
||||
var that = this, options;
|
||||
|
||||
if(sets) that.config = sets;
|
||||
Class.prototype.render = function(){
|
||||
var that = this,
|
||||
options = that.config;
|
||||
|
||||
|
||||
options.elem = $(options.elem);
|
||||
options.where = options.where || {};
|
||||
options.id = options.id || options.elem.attr('id');
|
||||
|
||||
//请求参数的自定义格式
|
||||
options.request = $.extend({
|
||||
@@ -204,18 +217,18 @@ layui.define(['laytpl', 'laypage', 'layer', 'form'], function(exports){
|
||||
,countName: 'count'
|
||||
}, options.response);
|
||||
|
||||
if(!options.elem[0]) return that;
|
||||
|
||||
var othis = options.elem
|
||||
,hasRender = othis.next('.' + ELEM_VIEW);
|
||||
if(typeof options.page === 'object') delete options.page.jump;
|
||||
|
||||
if(options.height && /^full-\d+$/.test(options.height)){ //full-差距值
|
||||
that.fullHeightGap = options.height.split('-')[1];
|
||||
options.height = _WIN.height() - that.fullHeightGap;
|
||||
}
|
||||
|
||||
//替代元素
|
||||
var reElem = that.elem = $(laytpl(TPL_MAIN).render({
|
||||
if(!options.elem[0]) return that;
|
||||
|
||||
that.setArea(); //动态分配列宽高
|
||||
|
||||
//开始插入替代元素
|
||||
var othis = options.elem
|
||||
,hasRender = othis.next('.' + ELEM_VIEW)
|
||||
|
||||
//主容器
|
||||
,reElem = that.elem = $(laytpl(TPL_MAIN).render({
|
||||
VIEW_CLASS: ELEM_VIEW
|
||||
,data: options
|
||||
,index: that.index //索引
|
||||
@@ -235,11 +248,13 @@ layui.define(['laytpl', 'laypage', 'layer', 'form'], function(exports){
|
||||
that.layFixLeft = reElem.find(ELEM_FIXL);
|
||||
that.layFixRight = reElem.find(ELEM_FIXR);
|
||||
that.layTool = reElem.find(ELEM_TOOL);
|
||||
that.layPage = reElem.find(ELEM_PAGE);
|
||||
|
||||
//设置body区域高度
|
||||
if(options.height){
|
||||
that.fullSize();
|
||||
}
|
||||
that.layTool.html(
|
||||
laytpl($(options.toolbar).html()||'').render(options)
|
||||
);
|
||||
|
||||
if(options.height) that.fullSize(); //设置body区域高度
|
||||
|
||||
//如果多级表头,则填补表头高度
|
||||
if(options.cols.length > 1){
|
||||
@@ -247,10 +262,110 @@ layui.define(['laytpl', 'laypage', 'layer', 'form'], function(exports){
|
||||
th.height(that.layHeader.height() - 1 - parseFloat(th.css('padding-top')) - parseFloat(th.css('padding-bottom')));
|
||||
}
|
||||
|
||||
//请求数据
|
||||
that.pullData(1);
|
||||
that.events();
|
||||
};
|
||||
|
||||
//根据列类型,定制化参数
|
||||
Class.prototype.initOpts = function(item){
|
||||
var that = this,
|
||||
options = that.config
|
||||
,initWidth = {
|
||||
checkbox: 48
|
||||
,space: 15
|
||||
,numbers: 40
|
||||
};
|
||||
|
||||
//让 type 参数兼容旧版本
|
||||
if(item.checkbox) item.type = "checkbox";
|
||||
if(item.space) item.type = "space";
|
||||
if(!item.type) item.type = "normal";
|
||||
|
||||
if(item.type !== "normal"){
|
||||
item.unresize = true;
|
||||
item.width = item.width || initWidth[item.type];
|
||||
}
|
||||
};
|
||||
|
||||
//动态分配列宽高
|
||||
Class.prototype.setArea = function(){
|
||||
var that = this,
|
||||
options = that.config
|
||||
,colNums = 0 //列个数
|
||||
,autoColNums = 0 //自动列宽的列个数
|
||||
,autoWidth = 0 //自动列分配的宽度
|
||||
,countWidth = 0 //所有列总宽度和
|
||||
,cntrWidth = options.width || function(){ //获取容器宽度
|
||||
//如果父元素宽度为0(一般为隐藏元素),则继续查找上层元素,直到找到真实宽度为止
|
||||
var getWidth = function(parent){
|
||||
var width, isNone;
|
||||
parent = parent || options.elem.parent()
|
||||
width = parent.width();
|
||||
isNone = parent.css('display') === 'none';
|
||||
if(parent[0] && (!width || isNone)) return getWidth(parent.parent());
|
||||
return width;
|
||||
};
|
||||
return getWidth();
|
||||
}();
|
||||
|
||||
//统计列个数
|
||||
that.eachCols(function(){
|
||||
colNums++;
|
||||
});
|
||||
|
||||
//减去边框差
|
||||
cntrWidth = cntrWidth - function(){
|
||||
return (options.skin === 'line' || options.skin === 'nob') ? 2 : colNums + 1;
|
||||
}();
|
||||
|
||||
//遍历所有列
|
||||
layui.each(options.cols, function(i1, item1){
|
||||
layui.each(item1, function(i2, item2){
|
||||
var width;
|
||||
|
||||
if(!item2){
|
||||
item1.splice(i2, 1);
|
||||
return;
|
||||
}
|
||||
|
||||
that.initOpts(item2);
|
||||
width = item2.width || 0;
|
||||
|
||||
if(item2.colspan > 1) return;
|
||||
|
||||
if(/\d+%$/.test(width)){
|
||||
item2.width = width = Math.floor((parseFloat(width) / 100) * cntrWidth);
|
||||
} else if(!width){ //列宽未填写
|
||||
item2.width = width = 0;
|
||||
autoColNums++;
|
||||
}
|
||||
|
||||
countWidth = countWidth + width;
|
||||
});
|
||||
});
|
||||
|
||||
//如果未填充满,则将剩余宽度平分。否则,给未设定宽度的列赋值一个默认宽
|
||||
autoWidth = cntrWidth > countWidth
|
||||
? (cntrWidth - countWidth) / autoColNums
|
||||
: 200;
|
||||
|
||||
layui.each(options.cols, function(i1, item1){
|
||||
layui.each(item1, function(i2, item2){
|
||||
if(item2.colspan > 1) return;
|
||||
if(item2.width === 0){
|
||||
item2.width = Math.floor(autoWidth);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
//高度铺满:full-差距值
|
||||
if(options.height && /^full-\d+$/.test(options.height)){
|
||||
that.fullHeightGap = options.height.split('-')[1];
|
||||
options.height = _WIN.height() - that.fullHeightGap;
|
||||
}
|
||||
};
|
||||
|
||||
//表格重载
|
||||
Class.prototype.reload = function(options){
|
||||
var that = this;
|
||||
@@ -360,45 +475,62 @@ layui.define(['laytpl', 'laypage', 'layer', 'form'], function(exports){
|
||||
return that.sort(that.sortKey.field, that.sortKey.sort, true);
|
||||
}
|
||||
layui.each(data, function(i1, item1){
|
||||
var tds = [], tds_fixed = [], tds_fixed_r = [];
|
||||
var tds = [], tds_fixed = [], tds_fixed_r = []
|
||||
,numbers = i1 + options.limit*(curr - 1) + 1; //序号
|
||||
|
||||
if(item1.length === 0) return;
|
||||
if(!sort){
|
||||
item1[table.config.indexName] = i1;
|
||||
}
|
||||
|
||||
that.eachCols(function(i3, item3){
|
||||
var content = item1[item3.field||i3];
|
||||
var field = item3.field || i3, content = item1[field]
|
||||
,cell = that.getColElem(that.layHeader, field);
|
||||
|
||||
if(content === undefined || content === null) content = '';
|
||||
if(item3.colspan > 1) return;
|
||||
|
||||
var td = ['<td data-field="'+ (item3.field||i3) +'"'+ function(){
|
||||
//td内容
|
||||
var td = ['<td data-field="'+ field +'" '+ function(){
|
||||
var attr = [];
|
||||
if(item3.edit) attr.push(' data-edit="true"'); //是否允许单元格编辑
|
||||
if(item3.align) attr.push(' align="'+ item3.align +'"'); //对齐方式
|
||||
if(item3.templet) attr.push(' data-content="'+ content +'"'); //自定义模板
|
||||
if(item3.toolbar) attr.push(' data-off="true"'); //自定义模板
|
||||
if(item3.event) attr.push(' lay-event="'+ item3.event +'"'); //自定义事件
|
||||
if(item3.style) attr.push(' style="'+ item3.style +'"'); //自定义样式
|
||||
return attr.join('');
|
||||
if(item3.edit) attr.push('data-edit="'+ item3.edit +'"'); //是否允许单元格编辑
|
||||
if(item3.align) attr.push('align="'+ item3.align +'"'); //对齐方式
|
||||
if(item3.templet) attr.push('data-content="'+ content +'"'); //自定义模板
|
||||
if(item3.toolbar) attr.push('data-off="true"'); //自定义模板
|
||||
if(item3.event) attr.push('lay-event="'+ item3.event +'"'); //自定义事件
|
||||
if(item3.style) attr.push('style="'+ item3.style +'"'); //自定义样式
|
||||
if(cell.data('autowidth')) attr.push('data-autowidth="true"'); //自适应宽度
|
||||
return attr.join(' ');
|
||||
}() +'>'
|
||||
,'<div class="layui-table-cell laytable-cell-'+ function(){
|
||||
if(item3.checkbox) return 'checkbox';
|
||||
if(item3.space) return 'space'; //间距
|
||||
return options.index + '-' + (item3.field||i3);
|
||||
,'<div class="layui-table-cell laytable-cell-'+ function(){ //返回对应的CSS类标识
|
||||
var str = (options.index + '-' + field);
|
||||
return item3.type === 'normal' ? str
|
||||
: (str + ' laytable-cell-' + item3.type);
|
||||
}() +'">' + function(){
|
||||
if(item3.checkbox){
|
||||
var tplData = $.extend(true, {
|
||||
LAY_INDEX: numbers
|
||||
}, item1);
|
||||
|
||||
//渲染复选框列视图
|
||||
if(item3.type === 'checkbox'){
|
||||
return '<input type="checkbox" name="layTableCheckbox" lay-skin="primary" '+ function(){
|
||||
var checkName = table.config.checkName;
|
||||
if(item3[checkName]){
|
||||
item1[checkName] = item3[checkName];
|
||||
return item3[checkName] ? 'checked' : '';
|
||||
tplData[checkName] = item3[checkName];
|
||||
return item3[checkName] ? 'checked' : '';
|
||||
}
|
||||
return item1[checkName] ? 'checked' : '';
|
||||
return tplData[checkName] ? 'checked' : '';
|
||||
}() +'>';
|
||||
} else if(item3.type === 'numbers'){ //渲染序号
|
||||
return numbers;
|
||||
}
|
||||
|
||||
//解析工具列模板
|
||||
if(item3.toolbar){
|
||||
return laytpl($(item3.toolbar).html()||'').render(item1);
|
||||
return laytpl($(item3.toolbar).html()||'').render(tplData);
|
||||
}
|
||||
return item3.templet ? laytpl($(item3.templet).html() || String(content)).render(item1) : content;
|
||||
|
||||
return item3.templet ? laytpl($(item3.templet).html() || String(content)).render(tplData) : content;
|
||||
}()
|
||||
,'</div></td>'].join('');
|
||||
|
||||
@@ -409,6 +541,8 @@ layui.define(['laytpl', 'laypage', 'layer', 'form'], function(exports){
|
||||
trs.push('<tr data-index="'+ i1 +'">'+ tds.join('') + '</tr>');
|
||||
trs_fixed.push('<tr data-index="'+ i1 +'">'+ tds_fixed.join('') + '</tr>');
|
||||
trs_fixed_r.push('<tr data-index="'+ i1 +'">'+ tds_fixed_r.join('') + '</tr>');
|
||||
|
||||
|
||||
});
|
||||
|
||||
that.layBody.scrollTop(0);
|
||||
@@ -448,7 +582,7 @@ layui.define(['laytpl', 'laypage', 'layer', 'form'], function(exports){
|
||||
if(options.page){
|
||||
that.page = curr;
|
||||
that.count = count;
|
||||
laypage.render({
|
||||
laypage.render($.extend({
|
||||
elem: 'layui-table-page' + options.index
|
||||
,count: count
|
||||
,groups: 3
|
||||
@@ -465,14 +599,20 @@ layui.define(['laytpl', 'laypage', 'layer', 'form'], function(exports){
|
||||
that.pullData(obj.curr, that.loading());
|
||||
}
|
||||
}
|
||||
});
|
||||
that.layTool.find('.layui-table-count span').html(count)
|
||||
}, options.page));
|
||||
}
|
||||
};
|
||||
|
||||
//找到对应的列元素
|
||||
Class.prototype.getColElem = function(parent, field){
|
||||
var that = this
|
||||
,options = that.config;
|
||||
return parent.eq(0).find('.laytable-cell-'+ (options.index + '-' + field) + ':eq(0)');
|
||||
};
|
||||
|
||||
//渲染表单
|
||||
Class.prototype.renderForm = function(type){
|
||||
form.render((type || 'checkbox'), 'LAY-table-'+ this.index);
|
||||
form.render(type, 'LAY-table-'+ this.index);
|
||||
}
|
||||
|
||||
//数据排序
|
||||
@@ -587,13 +727,13 @@ layui.define(['laytpl', 'laypage', 'layer', 'form'], function(exports){
|
||||
if(table.checkStatus(that.key).isAll){
|
||||
if(!checkAllElem[0].checked){
|
||||
checkAllElem.prop('checked', true);
|
||||
that.renderForm();
|
||||
that.renderForm('checkbox');
|
||||
}
|
||||
syncColsCheck(true);
|
||||
} else {
|
||||
if(checkAllElem[0].checked){
|
||||
checkAllElem.prop('checked', false);
|
||||
that.renderForm();
|
||||
that.renderForm('checkbox');
|
||||
}
|
||||
syncColsCheck(false);
|
||||
}
|
||||
@@ -612,7 +752,7 @@ layui.define(['laytpl', 'laypage', 'layer', 'form'], function(exports){
|
||||
});
|
||||
};
|
||||
|
||||
//尺寸始终铺满
|
||||
//铺满表格主体高度
|
||||
Class.prototype.fullSize = function(){
|
||||
var that = this
|
||||
,options = that.config
|
||||
@@ -626,11 +766,31 @@ layui.define(['laytpl', 'laypage', 'layer', 'form'], function(exports){
|
||||
|
||||
//tbody区域高度
|
||||
bodyHeight = parseFloat(height) - parseFloat(that.layHeader.height()) - 1;
|
||||
if(options.toolbar){
|
||||
bodyHeight = bodyHeight - that.layTool.outerHeight();
|
||||
}
|
||||
if(options.page){
|
||||
bodyHeight = bodyHeight - parseFloat(that.layTool.outerHeight() + 1);
|
||||
bodyHeight = bodyHeight - that.layPage.outerHeight() - 1;
|
||||
}
|
||||
that.layMain.css('height', bodyHeight);
|
||||
|
||||
};
|
||||
|
||||
//获取滚动条宽度
|
||||
Class.prototype.getScrollWidth = function(elem){
|
||||
var width = 0;
|
||||
if(elem){
|
||||
width = elem.offsetWidth - elem.clientWidth;
|
||||
} else {
|
||||
elem = document.createElement('div');
|
||||
elem.style.width = '100px';
|
||||
elem.style.height = '100px';
|
||||
elem.style.overflowY = 'scroll';
|
||||
|
||||
document.body.appendChild(elem);
|
||||
width = elem.offsetWidth - elem.clientWidth;
|
||||
document.body.removeChild(elem);
|
||||
}
|
||||
return width;
|
||||
};
|
||||
|
||||
//滚动条补丁
|
||||
@@ -638,7 +798,18 @@ layui.define(['laytpl', 'laypage', 'layer', 'form'], function(exports){
|
||||
var that = this
|
||||
,layMainTable = that.layMain.children('table')
|
||||
,scollWidth = that.layMain.width() - that.layMain.prop('clientWidth') //纵向滚动条宽度
|
||||
,scollHeight = that.layMain.height() - that.layMain.prop('clientHeight'); //横向滚动条高度
|
||||
,scollHeight = that.layMain.height() - that.layMain.prop('clientHeight') //横向滚动条高度
|
||||
,getScrollWidth = that.getScrollWidth(that.layMain[0]); //获取主容器滚动条宽度,如果有的话
|
||||
|
||||
if(getScrollWidth && !that.scrollPatchWStatus){
|
||||
var th = that.layHeader.eq(0).find('thead th:last-child')
|
||||
,field = th.data('field');
|
||||
that.getCssRule(field, function(item){
|
||||
var width = item.style.width || th.outerWidth();
|
||||
item.style.width = (parseFloat(width) - getScrollWidth) + 'px';
|
||||
that.scrollPatchWStatus = true;
|
||||
});
|
||||
}
|
||||
|
||||
if(scollWidth && scollHeight){
|
||||
if(!that.elem.find('.layui-table-patch')[0]){
|
||||
@@ -690,6 +861,7 @@ layui.define(['laytpl', 'laypage', 'layer', 'form'], function(exports){
|
||||
if(dict.resizeStart) return;
|
||||
_BODY.css('cursor', '');
|
||||
}).on('mousedown', function(e){
|
||||
var othis = $(this);
|
||||
if(dict.allowResize){
|
||||
var field = $(this).data('field');
|
||||
e.preventDefault();
|
||||
@@ -697,8 +869,9 @@ layui.define(['laytpl', 'laypage', 'layer', 'form'], function(exports){
|
||||
dict.offset = [e.clientX, e.clientY]; //记录初始坐标
|
||||
|
||||
that.getCssRule(field, function(item){
|
||||
var width = item.style.width || othis.outerWidth();
|
||||
dict.rule = item;
|
||||
dict.ruleWidth = parseFloat(item.style.width);
|
||||
dict.ruleWidth = parseFloat(width);
|
||||
});
|
||||
}
|
||||
});
|
||||
@@ -768,7 +941,7 @@ layui.define(['laytpl', 'laypage', 'layer', 'form'], function(exports){
|
||||
that.setCheckData(i, checked);
|
||||
});
|
||||
that.syncCheckAll();
|
||||
that.renderForm();
|
||||
that.renderForm('checkbox');
|
||||
} else {
|
||||
that.setCheckData(index, checked);
|
||||
that.syncCheckAll();
|
||||
@@ -828,19 +1001,28 @@ layui.define(['laytpl', 'laypage', 'layer', 'form'], function(exports){
|
||||
that.layBody.on('click', 'td', function(){
|
||||
var othis = $(this)
|
||||
,field = othis.data('field')
|
||||
,editType = othis.data('edit')
|
||||
,elemCell = othis.children(ELEM_CELL);
|
||||
|
||||
layer.close(that.tipsIndex);
|
||||
if(othis.data('off')) return;
|
||||
|
||||
//显示编辑框
|
||||
if(othis.data('edit')){
|
||||
var input = $('<input class="'+ ELEM_EDIT +'">');
|
||||
input[0].value = othis.data('content') || elemCell.text();
|
||||
othis.find('.'+ELEM_EDIT)[0] || othis.append(input);
|
||||
return input.focus();
|
||||
//显示编辑表单
|
||||
if(editType){
|
||||
if(editType === 'select') { //选择框
|
||||
//var select = $('<select class="'+ ELEM_EDIT +'" lay-ignore><option></option></select>');
|
||||
//othis.find('.'+ELEM_EDIT)[0] || othis.append(select);
|
||||
} else { //输入框
|
||||
var input = $('<input class="layui-input '+ ELEM_EDIT +'">');
|
||||
input[0].value = othis.data('content') || elemCell.text();
|
||||
othis.find('.'+ELEM_EDIT)[0] || othis.append(input);
|
||||
input.focus();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
//如果出现省略,则可查看更多
|
||||
if(elemCell.children().length > 0) return;
|
||||
if(Math.round(elemCell.prop('scrollWidth')) > Math.round(elemCell.outerWidth())){
|
||||
that.tipsIndex = layer.tips([
|
||||
'<div class="layui-table-tips-main" style="margin-top: -'+ (elemCell.height() + 16) +'px;'+ function(){
|
||||
|
||||
@@ -95,21 +95,22 @@ layui.define('jquery', function(exports){
|
||||
|
||||
//某个时间在当前时间的多久前
|
||||
,timeAgo: function(time, onlyDate){
|
||||
var arr = [[], []]
|
||||
var that = this
|
||||
,arr = [[], []]
|
||||
,stamp = new Date().getTime() - new Date(time).getTime();
|
||||
|
||||
//返回具体日期
|
||||
if(stamp > 1000*60*60*24*8){
|
||||
stamp = new Date(time);
|
||||
arr[0][0] = stamp.getFullYear();
|
||||
arr[0][1] = stamp.getMonth() + 1;
|
||||
arr[0][2] = stamp.getDate();
|
||||
arr[0][0] = that.digit(stamp.getFullYear(), 4);
|
||||
arr[0][1] = that.digit(stamp.getMonth() + 1);
|
||||
arr[0][2] = that.digit(stamp.getDate());
|
||||
|
||||
//是否输出时间
|
||||
if(!onlyDate){
|
||||
arr[1][0] = stamp.getHours();
|
||||
arr[1][1] = stamp.getMinutes();
|
||||
arr[1][2] = stamp.getSeconds();
|
||||
arr[1][0] = that.digit(stamp.getHours());
|
||||
arr[1][1] = that.digit(stamp.getMinutes());
|
||||
arr[1][2] = that.digit(stamp.getSeconds());
|
||||
}
|
||||
return arr[0].join('-') + ' ' + arr[1].join(':');
|
||||
}
|
||||
@@ -127,6 +128,17 @@ layui.define('jquery', function(exports){
|
||||
return '刚刚';
|
||||
}
|
||||
}
|
||||
|
||||
//数字前置补零
|
||||
,digit: function(num, length, end){
|
||||
var str = '';
|
||||
num = String(num);
|
||||
length = length || 2;
|
||||
for(var i = num.length; i < length; i++){
|
||||
str += '0';
|
||||
}
|
||||
return num < Math.pow(10, length) ? str + (num|0) : num;
|
||||
}
|
||||
};
|
||||
|
||||
exports('util', util);
|
||||
|
||||
17
src/layui.js
17
src/layui.js
@@ -19,7 +19,7 @@
|
||||
}
|
||||
|
||||
,Layui = function(){
|
||||
this.v = '2.1.7'; //版本号
|
||||
this.v = '2.2.0'; //版本号
|
||||
}
|
||||
|
||||
//获取layui所在目录
|
||||
@@ -146,10 +146,17 @@
|
||||
//首次加载模块
|
||||
if(!config.modules[item]){
|
||||
var node = doc.createElement('script')
|
||||
,url = (
|
||||
modules[item] ? (dir + 'lay/') : (config.base || '')
|
||||
|
||||
//如果是内置模块,则按照 dir 参数拼接模块路径
|
||||
//如果是扩展模块,则判断模块路径值是否为 {!} 开头,
|
||||
// 如果路径值是 {/} 开头,则模块路径即为后面紧跟的字符。
|
||||
// 否则,则按照 base 参数拼接模块路径
|
||||
,url = ( modules[item] ? (dir + 'lay/')
|
||||
: (/^\{\/\}/.test(that.modules[item]) ? '' : (config.base || ''))
|
||||
) + (that.modules[item] || item) + '.js';
|
||||
|
||||
url = url.replace(/^\{\/\}/, '');
|
||||
|
||||
node.async = true;
|
||||
node.charset = 'utf-8';
|
||||
node.src = url + function(){
|
||||
@@ -280,7 +287,7 @@
|
||||
that.modules[o] = options[o];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return that;
|
||||
};
|
||||
|
||||
@@ -329,7 +336,7 @@
|
||||
var data = {};
|
||||
}
|
||||
|
||||
if(settings.value) data[settings.key] = settings.value;
|
||||
if('value' in settings) data[settings.key] = settings.value;
|
||||
if(settings.remove) delete data[settings.key];
|
||||
localStorage[table] = JSON.stringify(data);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user