feature: 添加静态文件
This commit is contained in:
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 322 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,976 @@
|
||||
.pear-container {
|
||||
padding: 10px;
|
||||
margin: 0px;
|
||||
box-sizing: border-box;
|
||||
background-color: transparent;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
*::-webkit-scrollbar {
|
||||
width: 0px;
|
||||
height: 0px;
|
||||
}
|
||||
|
||||
*::-webkit-scrollbar {
|
||||
width: 6px;
|
||||
height: 6px;
|
||||
}
|
||||
|
||||
*::-webkit-scrollbar-track {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
*::-webkit-scrollbar-thumb {
|
||||
background: #e6e6e6;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
*::-webkit-scrollbar-thumb:hover {
|
||||
background: #e6e6e6;
|
||||
}
|
||||
|
||||
*::-webkit-scrollbar-corner {
|
||||
background: #f6f6f6;
|
||||
}
|
||||
|
||||
.pear-row::after,
|
||||
.pear-row::before {
|
||||
content: "";
|
||||
display: table;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.pear-col {
|
||||
float: left;
|
||||
min-height: 1px;
|
||||
}
|
||||
|
||||
.pear-row * {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.pear-col-md1 {
|
||||
width: 4.16%;
|
||||
}
|
||||
|
||||
.pear-col-md2 {
|
||||
width: 8.33%;
|
||||
}
|
||||
|
||||
.pear-col-md3 {
|
||||
width: 12.5%;
|
||||
}
|
||||
|
||||
.pear-col-md4 {
|
||||
width: 16.66%;
|
||||
}
|
||||
|
||||
.pear-col-md5 {
|
||||
width: 20.83%;
|
||||
}
|
||||
|
||||
.pear-col-md6 {
|
||||
width: 25%;
|
||||
}
|
||||
|
||||
.pear-col-md7 {
|
||||
width: 29.16%;
|
||||
}
|
||||
|
||||
.pear-col-md8 {
|
||||
width: 33.33%;
|
||||
}
|
||||
|
||||
.pear-col-md9 {
|
||||
width: 37.5%;
|
||||
}
|
||||
|
||||
.pear-col-md10 {
|
||||
width: 41.66%;
|
||||
}
|
||||
|
||||
.pear-col-md11 {
|
||||
width: 45.83%;
|
||||
}
|
||||
|
||||
.pear-col-md12 {
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
.pear-col-md13 {
|
||||
width: 54.16%;
|
||||
}
|
||||
|
||||
.pear-col-md14 {
|
||||
width: 58.33%;
|
||||
}
|
||||
|
||||
.pear-col-md15 {
|
||||
width: 62.5%;
|
||||
}
|
||||
|
||||
.pear-col-md16 {
|
||||
width: 66.66%;
|
||||
}
|
||||
|
||||
.pear-col-md17 {
|
||||
width: 70.83%;
|
||||
}
|
||||
|
||||
.pear-col-md18 {
|
||||
width: 75%;
|
||||
}
|
||||
|
||||
.pear-col-md19 {
|
||||
width: 79.16%;
|
||||
}
|
||||
|
||||
.pear-col-md20 {
|
||||
width: 83.33%;
|
||||
}
|
||||
|
||||
.pear-col-md21 {
|
||||
width: 87.5%;
|
||||
}
|
||||
|
||||
.pear-col-md22 {
|
||||
width: 91.66%;
|
||||
}
|
||||
|
||||
.pear-col-md23 {
|
||||
width: 95.83%;
|
||||
}
|
||||
|
||||
.pear-col-md24 {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.pear-col-md-offset1 {
|
||||
margin-left: 4.16%;
|
||||
}
|
||||
|
||||
.pear-col-md-offset2 {
|
||||
margin-left: 8.33%;
|
||||
}
|
||||
|
||||
.pear-col-md-offset3 {
|
||||
margin-left: 12.5%;
|
||||
}
|
||||
|
||||
.pear-col-md-offset4 {
|
||||
margin-left: 16.66%;
|
||||
}
|
||||
|
||||
.pear-col-md-offset5 {
|
||||
margin-left: 20.83%;
|
||||
}
|
||||
|
||||
.pear-col-md-offset6 {
|
||||
margin-left: 25%;
|
||||
}
|
||||
|
||||
.pear-col-md-offset7 {
|
||||
margin-left: 29.16%;
|
||||
}
|
||||
|
||||
.pear-col-md-offset8 {
|
||||
margin-left: 33.33%;
|
||||
}
|
||||
|
||||
.pear-col-md-offset9 {
|
||||
margin-left: 37.5%;
|
||||
}
|
||||
|
||||
.pear-col-md-offset10 {
|
||||
margin-left: 41.66%;
|
||||
}
|
||||
|
||||
.pear-col-md-offset11 {
|
||||
margin-left: 45.83%;
|
||||
}
|
||||
|
||||
.pear-col-md-offset12 {
|
||||
margin-left: 50%;
|
||||
}
|
||||
|
||||
.pear-col-md-offset13 {
|
||||
margin-left: 54.16%;
|
||||
}
|
||||
|
||||
.pear-col-md-offset14 {
|
||||
margin-left: 58.33%;
|
||||
}
|
||||
|
||||
.pear-col-md-offset15 {
|
||||
margin-left: 62.5%;
|
||||
}
|
||||
|
||||
.pear-col-md-offset16 {
|
||||
margin-left: 66.66%;
|
||||
}
|
||||
|
||||
.pear-col-md-offset17 {
|
||||
margin-left: 70.83%;
|
||||
}
|
||||
|
||||
.pear-col-md-offset18 {
|
||||
margin-left: 75%;
|
||||
}
|
||||
|
||||
.pear-col-md-offset19 {
|
||||
margin-left: 79.16%;
|
||||
}
|
||||
|
||||
.pear-col-md-offset20 {
|
||||
margin-left: 83.33%;
|
||||
}
|
||||
|
||||
.pear-col-md-offset21 {
|
||||
margin-left: 87.5%;
|
||||
}
|
||||
|
||||
.pear-col-md-offset22 {
|
||||
margin-left: 91.66%;
|
||||
}
|
||||
|
||||
.pear-col-md-offset23 {
|
||||
margin-left: 95.83%;
|
||||
}
|
||||
|
||||
.pear-col-md-offset24 {
|
||||
margin-left: 100%;
|
||||
}
|
||||
|
||||
@media all and (max-width: 768px) {
|
||||
.pear-col-xs1 {
|
||||
width: 4.16%;
|
||||
}
|
||||
|
||||
.pear-col-xs2 {
|
||||
width: 8.33%;
|
||||
}
|
||||
|
||||
.pear-col-xs3 {
|
||||
width: 12.5%;
|
||||
}
|
||||
|
||||
.pear-col-xs4 {
|
||||
width: 16.66%;
|
||||
}
|
||||
|
||||
.pear-col-xs5 {
|
||||
width: 20.83%;
|
||||
}
|
||||
|
||||
.pear-col-xs6 {
|
||||
width: 25%;
|
||||
}
|
||||
|
||||
.pear-col-xs7 {
|
||||
width: 29.16%;
|
||||
}
|
||||
|
||||
.pear-col-xs8 {
|
||||
width: 33.33%;
|
||||
}
|
||||
|
||||
.pear-col-xs9 {
|
||||
width: 37.5%;
|
||||
}
|
||||
|
||||
.pear-col-xs10 {
|
||||
width: 41.66%;
|
||||
}
|
||||
|
||||
.pear-col-xs11 {
|
||||
width: 45.83%;
|
||||
}
|
||||
|
||||
.pear-col-xs12 {
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
.pear-col-xs13 {
|
||||
width: 54.16%;
|
||||
}
|
||||
|
||||
.pear-col-xs14 {
|
||||
width: 58.33%;
|
||||
}
|
||||
|
||||
.pear-col-xs15 {
|
||||
width: 62.5%;
|
||||
}
|
||||
|
||||
.pear-col-xs16 {
|
||||
width: 66.66%;
|
||||
}
|
||||
|
||||
.pear-col-xs17 {
|
||||
width: 70.83%;
|
||||
}
|
||||
|
||||
.pear-col-xs18 {
|
||||
width: 75%;
|
||||
}
|
||||
|
||||
.pear-col-xs19 {
|
||||
width: 79.16%;
|
||||
}
|
||||
|
||||
.pear-col-xs20 {
|
||||
width: 83.33%;
|
||||
}
|
||||
|
||||
.pear-col-xs21 {
|
||||
width: 87.5%;
|
||||
}
|
||||
|
||||
.pear-col-xs22 {
|
||||
width: 91.66%;
|
||||
}
|
||||
|
||||
.pear-col-xs23 {
|
||||
width: 95.83%;
|
||||
}
|
||||
|
||||
.pear-col-xs24 {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.pear-col-xs-offset1 {
|
||||
margin-left: 4.16%;
|
||||
}
|
||||
|
||||
.pear-col-xs-offset2 {
|
||||
margin-left: 8.33%;
|
||||
}
|
||||
|
||||
.pear-col-xs-offset3 {
|
||||
margin-left: 12.5%;
|
||||
}
|
||||
|
||||
.pear-col-xs-offset4 {
|
||||
margin-left: 16.66%;
|
||||
}
|
||||
|
||||
.pear-col-xs-offset5 {
|
||||
margin-left: 20.83%;
|
||||
}
|
||||
|
||||
.pear-col-xs-offset6 {
|
||||
margin-left: 25%;
|
||||
}
|
||||
|
||||
.pear-col-xs-offset7 {
|
||||
margin-left: 29.16%;
|
||||
}
|
||||
|
||||
.pear-col-xs-offset8 {
|
||||
margin-left: 33.33%;
|
||||
}
|
||||
|
||||
.pear-col-xs-offset9 {
|
||||
margin-left: 37.5%;
|
||||
}
|
||||
|
||||
.pear-col-xs-offset10 {
|
||||
margin-left: 41.66%;
|
||||
}
|
||||
|
||||
.pear-col-xs-offset11 {
|
||||
margin-left: 45.83%;
|
||||
}
|
||||
|
||||
.pear-col-xs-offset12 {
|
||||
margin-left: 50%;
|
||||
}
|
||||
|
||||
.pear-col-xs-offset13 {
|
||||
margin-left: 54.16%;
|
||||
}
|
||||
|
||||
.pear-col-xs-offset14 {
|
||||
margin-left: 58.33%;
|
||||
}
|
||||
|
||||
.pear-col-xs-offset15 {
|
||||
margin-left: 62.5%;
|
||||
}
|
||||
|
||||
.pear-col-xs-offset16 {
|
||||
margin-left: 66.66%;
|
||||
}
|
||||
|
||||
.pear-col-xs-offset17 {
|
||||
margin-left: 70.83%;
|
||||
}
|
||||
|
||||
.pear-col-xs-offset18 {
|
||||
margin-left: 75%;
|
||||
}
|
||||
|
||||
.pear-col-xs-offset19 {
|
||||
margin-left: 79.16%;
|
||||
}
|
||||
|
||||
.pear-col-xs-offset20 {
|
||||
margin-left: 83.33%;
|
||||
}
|
||||
|
||||
.pear-col-xs-offset21 {
|
||||
margin-left: 87.5%;
|
||||
}
|
||||
|
||||
.pear-col-xs-offset22 {
|
||||
margin-left: 91.66%;
|
||||
}
|
||||
|
||||
.pear-col-xs-offset23 {
|
||||
margin-left: 95.83%;
|
||||
}
|
||||
|
||||
.pear-col-xs-offset24 {
|
||||
margin-left: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
@media all and (min-width: 768px) and (max-width: 992px) {
|
||||
.pear-col-sm1 {
|
||||
width: 4.16%;
|
||||
}
|
||||
|
||||
.pear-col-sm2 {
|
||||
width: 8.33%;
|
||||
}
|
||||
|
||||
.pear-col-sm3 {
|
||||
width: 12.5%;
|
||||
}
|
||||
|
||||
.pear-col-sm4 {
|
||||
width: 16.66%;
|
||||
}
|
||||
|
||||
.pear-col-sm5 {
|
||||
width: 20.83%;
|
||||
}
|
||||
|
||||
.pear-col-sm6 {
|
||||
width: 25%;
|
||||
}
|
||||
|
||||
.pear-col-sm7 {
|
||||
width: 29.16%;
|
||||
}
|
||||
|
||||
.pear-col-sm8 {
|
||||
width: 33.33%;
|
||||
}
|
||||
|
||||
.pear-col-sm9 {
|
||||
width: 37.5%;
|
||||
}
|
||||
|
||||
.pear-col-sm10 {
|
||||
width: 41.66%;
|
||||
}
|
||||
|
||||
.pear-col-sm11 {
|
||||
width: 45.83%;
|
||||
}
|
||||
|
||||
.pear-col-sm12 {
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
.pear-col-sm13 {
|
||||
width: 54.16%;
|
||||
}
|
||||
|
||||
.pear-col-sm14 {
|
||||
width: 58.33%;
|
||||
}
|
||||
|
||||
.pear-col-sm15 {
|
||||
width: 62.5%;
|
||||
}
|
||||
|
||||
.pear-col-sm16 {
|
||||
width: 66.66%;
|
||||
}
|
||||
|
||||
.pear-col-sm17 {
|
||||
width: 70.83%;
|
||||
}
|
||||
|
||||
.pear-col-sm18 {
|
||||
width: 75%;
|
||||
}
|
||||
|
||||
.pear-col-sm19 {
|
||||
width: 79.16%;
|
||||
}
|
||||
|
||||
.pear-col-sm20 {
|
||||
width: 83.33%;
|
||||
}
|
||||
|
||||
.pear-col-sm21 {
|
||||
width: 87.5%;
|
||||
}
|
||||
|
||||
.pear-col-sm22 {
|
||||
width: 91.66%;
|
||||
}
|
||||
|
||||
.pear-col-sm23 {
|
||||
width: 95.83%;
|
||||
}
|
||||
|
||||
.pear-col-sm24 {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.pear-col-sm-offset1 {
|
||||
margin-left: 4.16%;
|
||||
}
|
||||
|
||||
.pear-col-sm-offset2 {
|
||||
margin-left: 8.33%;
|
||||
}
|
||||
|
||||
.pear-col-sm-offset3 {
|
||||
margin-left: 12.5%;
|
||||
}
|
||||
|
||||
.pear-col-sm-offset4 {
|
||||
margin-left: 16.66%;
|
||||
}
|
||||
|
||||
.pear-col-sm-offset5 {
|
||||
margin-left: 20.83%;
|
||||
}
|
||||
|
||||
.pear-col-sm-offset6 {
|
||||
margin-left: 25%;
|
||||
}
|
||||
|
||||
.pear-col-sm-offset7 {
|
||||
margin-left: 29.16%;
|
||||
}
|
||||
|
||||
.pear-col-sm-offset8 {
|
||||
margin-left: 33.33%;
|
||||
}
|
||||
|
||||
.pear-col-sm-offset9 {
|
||||
margin-left: 37.5%;
|
||||
}
|
||||
|
||||
.pear-col-sm-offset10 {
|
||||
margin-left: 41.66%;
|
||||
}
|
||||
|
||||
.pear-col-sm-offset11 {
|
||||
margin-left: 45.83%;
|
||||
}
|
||||
|
||||
.pear-col-sm-offset12 {
|
||||
margin-left: 50%;
|
||||
}
|
||||
|
||||
.pear-col-sm-offset13 {
|
||||
margin-left: 54.16%;
|
||||
}
|
||||
|
||||
.pear-col-sm-offset14 {
|
||||
margin-left: 58.33%;
|
||||
}
|
||||
|
||||
.pear-col-sm-offset15 {
|
||||
margin-left: 62.5%;
|
||||
}
|
||||
|
||||
.pear-col-sm-offset16 {
|
||||
margin-left: 66.66%;
|
||||
}
|
||||
|
||||
.pear-col-sm-offset17 {
|
||||
margin-left: 70.83%;
|
||||
}
|
||||
|
||||
.pear-col-sm-offset18 {
|
||||
margin-left: 75%;
|
||||
}
|
||||
|
||||
.pear-col-sm-offset19 {
|
||||
margin-left: 79.16%;
|
||||
}
|
||||
|
||||
.pear-col-sm-offset20 {
|
||||
margin-left: 83.33%;
|
||||
}
|
||||
|
||||
.pear-col-sm-offset21 {
|
||||
margin-left: 87.5%;
|
||||
}
|
||||
|
||||
.pear-col-sm-offset22 {
|
||||
margin-left: 91.66%;
|
||||
}
|
||||
|
||||
.pear-col-sm-offset23 {
|
||||
margin-left: 95.83%;
|
||||
}
|
||||
|
||||
.pear-col-sm-offset24 {
|
||||
margin-left: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
@media all and (min-width: 1200px) {
|
||||
.pear-col-lg1 {
|
||||
width: 4.16%;
|
||||
}
|
||||
|
||||
.pear-col-lg2 {
|
||||
width: 8.33%;
|
||||
}
|
||||
|
||||
.pear-col-lg3 {
|
||||
width: 12.5%;
|
||||
}
|
||||
|
||||
.pear-col-lg4 {
|
||||
width: 16.66%;
|
||||
}
|
||||
|
||||
.pear-col-lg5 {
|
||||
width: 20.83%;
|
||||
}
|
||||
|
||||
.pear-col-lg6 {
|
||||
width: 25%;
|
||||
}
|
||||
|
||||
.pear-col-lg7 {
|
||||
width: 29.16%;
|
||||
}
|
||||
|
||||
.pear-col-lg8 {
|
||||
width: 33.33%;
|
||||
}
|
||||
|
||||
.pear-col-lg9 {
|
||||
width: 37.5%;
|
||||
}
|
||||
|
||||
.pear-col-lg10 {
|
||||
width: 41.66%;
|
||||
}
|
||||
|
||||
.pear-col-lg11 {
|
||||
width: 45.83%;
|
||||
}
|
||||
|
||||
.pear-col-lg12 {
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
.pear-col-lg13 {
|
||||
width: 54.16%;
|
||||
}
|
||||
|
||||
.pear-col-lg14 {
|
||||
width: 58.33%;
|
||||
}
|
||||
|
||||
.pear-col-lg15 {
|
||||
width: 62.5%;
|
||||
}
|
||||
|
||||
.pear-col-lg16 {
|
||||
width: 66.66%;
|
||||
}
|
||||
|
||||
.pear-col-lg17 {
|
||||
width: 70.83%;
|
||||
}
|
||||
|
||||
.pear-col-lg18 {
|
||||
width: 75%;
|
||||
}
|
||||
|
||||
.pear-col-lg19 {
|
||||
width: 79.16%;
|
||||
}
|
||||
|
||||
.pear-col-lg20 {
|
||||
width: 83.33%;
|
||||
}
|
||||
|
||||
.pear-col-lg21 {
|
||||
width: 87.5%;
|
||||
}
|
||||
|
||||
.pear-col-lg22 {
|
||||
width: 91.66%;
|
||||
}
|
||||
|
||||
.pear-col-lg23 {
|
||||
width: 95.83%;
|
||||
}
|
||||
|
||||
.pear-col-lg24 {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.pear-col-lg-offset1 {
|
||||
margin-left: 4.16%;
|
||||
}
|
||||
|
||||
.pear-col-lg-offset2 {
|
||||
margin-left: 8.33%;
|
||||
}
|
||||
|
||||
.pear-col-lg-offset3 {
|
||||
margin-left: 12.5%;
|
||||
}
|
||||
|
||||
.pear-col-lg-offset4 {
|
||||
margin-left: 16.66%;
|
||||
}
|
||||
|
||||
.pear-col-lg-offset5 {
|
||||
margin-left: 20.83%;
|
||||
}
|
||||
|
||||
.pear-col-lg-offset6 {
|
||||
margin-left: 25%;
|
||||
}
|
||||
|
||||
.pear-col-lg-offset7 {
|
||||
margin-left: 29.16%;
|
||||
}
|
||||
|
||||
.pear-col-lg-offset8 {
|
||||
margin-left: 33.33%;
|
||||
}
|
||||
|
||||
.pear-col-lg-offset9 {
|
||||
margin-left: 37.5%;
|
||||
}
|
||||
|
||||
.pear-col-lg-offset10 {
|
||||
margin-left: 41.66%;
|
||||
}
|
||||
|
||||
.pear-col-lg-offset11 {
|
||||
margin-left: 45.83%;
|
||||
}
|
||||
|
||||
.pear-col-lg-offset12 {
|
||||
margin-left: 50%;
|
||||
}
|
||||
|
||||
.pear-col-lg-offset13 {
|
||||
margin-left: 54.16%;
|
||||
}
|
||||
|
||||
.pear-col-lg-offset14 {
|
||||
margin-left: 58.33%;
|
||||
}
|
||||
|
||||
.pear-col-lg-offset15 {
|
||||
margin-left: 62.5%;
|
||||
}
|
||||
|
||||
.pear-col-lg-offset16 {
|
||||
margin-left: 66.66%;
|
||||
}
|
||||
|
||||
.pear-col-lg-offset17 {
|
||||
margin-left: 70.83%;
|
||||
}
|
||||
|
||||
.pear-col-lg-offset18 {
|
||||
margin-left: 75%;
|
||||
}
|
||||
|
||||
.pear-col-lg-offset19 {
|
||||
margin-left: 79.16%;
|
||||
}
|
||||
|
||||
.pear-col-lg-offset20 {
|
||||
margin-left: 83.33%;
|
||||
}
|
||||
|
||||
.pear-col-lg-offset21 {
|
||||
margin-left: 87.5%;
|
||||
}
|
||||
|
||||
.pear-col-lg-offset22 {
|
||||
margin-left: 91.66%;
|
||||
}
|
||||
|
||||
.pear-col-lg-offset23 {
|
||||
margin-left: 95.83%;
|
||||
}
|
||||
|
||||
.pear-col-lg-offset24 {
|
||||
margin-left: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.pear-col-space1 {
|
||||
margin: -0.5px;
|
||||
}
|
||||
|
||||
.pear-col-space1 > * {
|
||||
padding: 0.5px;
|
||||
}
|
||||
|
||||
.pear-col-space2 {
|
||||
margin: -1px;
|
||||
}
|
||||
|
||||
.pear-col-space2 > * {
|
||||
padding: 1px;
|
||||
}
|
||||
|
||||
.pear-col-space4 {
|
||||
margin: -2px;
|
||||
}
|
||||
|
||||
.pear-col-space4 > * {
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
.pear-col-space5 {
|
||||
margin: -2.5px;
|
||||
}
|
||||
|
||||
.pear-col-space5 > * {
|
||||
padding: 2.5px;
|
||||
}
|
||||
|
||||
.pear-col-space6 {
|
||||
margin: -3px;
|
||||
}
|
||||
|
||||
.pear-col-space6 > * {
|
||||
padding: 3px;
|
||||
}
|
||||
|
||||
.pear-col-space8 {
|
||||
margin: -4px;
|
||||
}
|
||||
|
||||
.pear-col-space8 > * {
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
.pear-col-space10 {
|
||||
margin: -5px;
|
||||
}
|
||||
|
||||
.pear-col-space10 > * {
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.pear-col-space12 {
|
||||
margin: -6px;
|
||||
}
|
||||
|
||||
.pear-col-space12 > * {
|
||||
padding: 6px;
|
||||
}
|
||||
|
||||
.pear-col-space14 {
|
||||
margin: -7px;
|
||||
}
|
||||
|
||||
.pear-col-space14 > * {
|
||||
padding: 7px;
|
||||
}
|
||||
|
||||
.pear-col-space15 {
|
||||
margin: -7.5px;
|
||||
}
|
||||
|
||||
.pear-col-space15 > * {
|
||||
padding: 7.5px;
|
||||
}
|
||||
|
||||
.pear-col-space16 {
|
||||
margin: -8px;
|
||||
}
|
||||
|
||||
.pear-col-space16 > * {
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
.pear-col-space18 {
|
||||
margin: -9px;
|
||||
}
|
||||
|
||||
.pear-col-space18 > * {
|
||||
padding: 9px;
|
||||
}
|
||||
|
||||
.pear-col-space20 {
|
||||
margin: -10px;
|
||||
}
|
||||
|
||||
.pear-col-space20 > * {
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.pear-col-space22 {
|
||||
margin: -11px;
|
||||
}
|
||||
|
||||
.pear-col-space22 > * {
|
||||
padding: 11px;
|
||||
}
|
||||
|
||||
.pear-col-space24 {
|
||||
margin: -12px;
|
||||
}
|
||||
|
||||
.pear-col-space24 > * {
|
||||
padding: 12px;
|
||||
}
|
||||
|
||||
.pear-col-space25 {
|
||||
margin: -12.5px;
|
||||
}
|
||||
|
||||
.pear-col-space25 > * {
|
||||
padding: 12.5px;
|
||||
}
|
||||
|
||||
.pear-col-space26 {
|
||||
margin: -13px;
|
||||
}
|
||||
|
||||
.pear-col-space26 > * {
|
||||
padding: 13px;
|
||||
}
|
||||
|
||||
.pear-col-space28 {
|
||||
margin: -14px;
|
||||
}
|
||||
|
||||
.pear-col-space28 > * {
|
||||
padding: 14px;
|
||||
}
|
||||
|
||||
.pear-col-space30 {
|
||||
margin: -15px;
|
||||
}
|
||||
|
||||
.pear-col-space30 > * {
|
||||
padding: 15px;
|
||||
}
|
||||
@@ -0,0 +1,280 @@
|
||||
.pear-nav-tree {
|
||||
width: 230px !important;
|
||||
border-radius: 0px;
|
||||
background-color: #28333e;
|
||||
}
|
||||
|
||||
.pear-nav-tree .layui-nav-item > a {
|
||||
height: 56px;
|
||||
line-height: 56px;
|
||||
padding-top: 0px;
|
||||
padding-bottom: 0px;
|
||||
}
|
||||
|
||||
.pear-nav-tree .layui-nav-item dd a {
|
||||
height: 48px;
|
||||
line-height: 48px;
|
||||
}
|
||||
|
||||
.pear-nav-tree .layui-nav-item > a .layui-nav-more {
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.pear-side-scroll::-webkit-scrollbar {
|
||||
width: 0px;
|
||||
height: 0px;
|
||||
}
|
||||
|
||||
.pear-side-scroll {
|
||||
width: 230px;
|
||||
}
|
||||
|
||||
.pear-nav-tree .layui-nav-child dd.layui-this,
|
||||
.layui-nav-tree .layui-nav-child dd.layui-this a,
|
||||
.layui-nav-tree .layui-this,
|
||||
.layui-nav-tree .layui-this > a,
|
||||
.layui-nav-tree .layui-this > a:hover {
|
||||
background-color: var(--global-primary-color);
|
||||
}
|
||||
|
||||
.pear-nav-tree .toast {
|
||||
font-size: 14px;
|
||||
margin: 5px;
|
||||
margin-right: 8px;
|
||||
text-align: center;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
color: lightgray;
|
||||
}
|
||||
|
||||
.pear-nav-tree .layui-nav-item a i {
|
||||
margin-right: 12px;
|
||||
}
|
||||
|
||||
.pear-nav-tree .layui-nav-item a span {
|
||||
letter-spacing: 2px;
|
||||
font-size: 13.5px;
|
||||
}
|
||||
|
||||
.pear-nav-tree .layui-nav-item a:hover {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.pear-nav-tree .layui-nav-more {
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.pear-nav-tree .layui-nav-bar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.pear-nav-tree .layui-nav-item a .layui-badge-dot {
|
||||
float: right;
|
||||
right: 13px;
|
||||
}
|
||||
|
||||
.pear-nav-tree .layui-nav-item a .layui-badge {
|
||||
float: right;
|
||||
right: 10px;
|
||||
}
|
||||
|
||||
/** 实 现 菜 单 隐 藏 */
|
||||
.pear-nav-mini {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.pear-nav-mini .layui-nav-item a span {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.pear-nav-mini .layui-nav-child {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.pear-nav-mini .layui-nav-more {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.pear-nav-control.pc a {
|
||||
font-weight: 500;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.pear-nav-control.pc li {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.pear-nav-control.pc .layui-nav-bar {
|
||||
top: 0px !important;
|
||||
}
|
||||
|
||||
.pear-nav-control.pc .layui-this * {
|
||||
background-color: whitesmoke;
|
||||
}
|
||||
|
||||
.pear-nav-control.pc * {
|
||||
color: darkslategray !important;
|
||||
}
|
||||
|
||||
.pear-nav-control.pc .layui-nav-bar {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.pear-nav-control .layui-nav-child {
|
||||
border: 1px solid whitesmoke;
|
||||
border-radius: 6px;
|
||||
width: 150px;
|
||||
}
|
||||
|
||||
/** 隐 藏 后 子 级 悬 浮 菜 单 */
|
||||
.pear-nav-tree .layui-nav-hover {
|
||||
position: fixed;
|
||||
min-width: 130px;
|
||||
padding: 4px;
|
||||
display: block !important;
|
||||
background: transparent !important;
|
||||
}
|
||||
|
||||
.pear-nav-tree .layui-nav-hover:before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
right: 4px;
|
||||
left: 4px;
|
||||
bottom: 0;
|
||||
top: 0;
|
||||
border-radius: 4px;
|
||||
overflow: hidden;
|
||||
background-color: #28333e;
|
||||
display: block;
|
||||
box-shadow: 0px 0px 3px lightgray;
|
||||
}
|
||||
|
||||
.pear-nav-tree .layui-nav-hover a span {
|
||||
display: inline-block !important;
|
||||
}
|
||||
|
||||
.pear-nav-tree .layui-nav-hover a i {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.pear-nav-tree .layui-nav-child dd a span {
|
||||
margin-left: 26px !important;
|
||||
}
|
||||
|
||||
.pear-nav-tree .layui-nav-child dd a i {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.pear-nav-tree .layui-nav-hover dd a span {
|
||||
margin-left: 0px !important;
|
||||
}
|
||||
|
||||
.pear-nav-tree dl {
|
||||
padding-top: 0;
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
/** 亮 样 式*/
|
||||
.dark-theme .layui-nav-tree {
|
||||
background-color: #28333e !important;
|
||||
}
|
||||
|
||||
.light-theme {
|
||||
background-color: white !important;
|
||||
}
|
||||
|
||||
.light-theme .pear-nav-tree,
|
||||
.light-theme .pear-nav-tree .layui-nav-hover:before,
|
||||
.light-theme .pear-nav-tree .layui-nav-child {
|
||||
background-color: white !important;
|
||||
}
|
||||
|
||||
.light-theme .pear-nav-tree a,
|
||||
.light-theme .pear-nav-tree .layui-nav-more {
|
||||
color: dimgray !important;
|
||||
border-top-color: dimgray;
|
||||
}
|
||||
|
||||
.light-theme .pear-nav-tree .layui-nav-itemed > a > .layui-nav-more {
|
||||
border-top-color: white !important;
|
||||
border-bottom-color: dimgray !important;
|
||||
}
|
||||
|
||||
.light-theme .pear-nav-tree .layui-this a,
|
||||
.light-theme .pear-nav-tree .layui-this {
|
||||
color: white !important;
|
||||
background-color: var(--global-primary-color) !important;
|
||||
}
|
||||
|
||||
.light-theme .pear-nav-tree .layui-this a:hover {
|
||||
background-color: var(--global-primary-color) !important;
|
||||
}
|
||||
|
||||
.light-theme .pear-nav-tree .layui-nav-bar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/** 下 拉 图 标 */
|
||||
.pear-nav-tree.arrow .layui-nav-more {
|
||||
font-family: layui-icon !important;
|
||||
font-size: 10px;
|
||||
font-style: normal;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
overflow: hidden;
|
||||
width: auto;
|
||||
height: auto;
|
||||
line-height: normal;
|
||||
border: none;
|
||||
top: 23px;
|
||||
margin-right: 2px !important;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
display: inline-block;
|
||||
transition: all 0.2s;
|
||||
-webkit-transition: all 0.2s;
|
||||
}
|
||||
|
||||
.pear-nav-tree.arrow .layui-nav-child .layui-nav-more {
|
||||
top: 17px;
|
||||
}
|
||||
|
||||
.pear-nav-tree.arrow .layui-nav-more:before {
|
||||
content: "\e61a";
|
||||
}
|
||||
|
||||
.pear-nav-tree.arrow .layui-nav-itemed > a > .layui-nav-more {
|
||||
transform: rotate(180deg);
|
||||
-ms-transform: rotate(180deg);
|
||||
-moz-transform: rotate(180deg);
|
||||
-webkit-transform: rotate(180deg);
|
||||
-o-transform: rotate(180deg);
|
||||
width: 12px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.pear-nav-tree.arrow
|
||||
.layui-nav-child.layui-nav-hover
|
||||
> dd
|
||||
> a
|
||||
> .layui-nav-more {
|
||||
display: inline-block !important;
|
||||
transform: rotate(270deg);
|
||||
-ms-transform: rotate(270deg);
|
||||
-moz-transform: rotate(270deg);
|
||||
-webkit-transform: rotate(270deg);
|
||||
-o-transform: rotate(270deg);
|
||||
width: 12px;
|
||||
text-align: center;
|
||||
background-color: transparent !important;
|
||||
}
|
||||
|
||||
.pear-nav-tree.arrow
|
||||
.layui-nav-child.layui-nav-hover
|
||||
> a
|
||||
> .layui-nav-more:before,
|
||||
.pear-nav-tree.arrow .layui-nav-itemed > a > .layui-nav-more:before {
|
||||
content: "\e61a";
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
/* 搜索面板 */
|
||||
.menu-search-content .layui-input {
|
||||
padding-left: 30px;
|
||||
}
|
||||
|
||||
.menu-search-content {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.menu-search-input-wrapper {
|
||||
width: 100%;
|
||||
padding: 15px 15px;
|
||||
}
|
||||
|
||||
.menu-search-no-data {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
height: 122px;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.menu-search-list {
|
||||
width: 100%;
|
||||
padding: 5px 15px;
|
||||
}
|
||||
|
||||
.menu-search-list li {
|
||||
position: relative;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
flex-wrap: nowrap;
|
||||
height: 50px;
|
||||
margin-bottom: 8px;
|
||||
padding: 0px 10px;
|
||||
color: currentColor;
|
||||
font-size: 14px;
|
||||
border-radius: 4px;
|
||||
box-shadow: 0 1px 3px #d4d9e1;
|
||||
cursor: pointer;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.menu-search-list li.this,
|
||||
.menu-search-list li:hover {
|
||||
background-color: var(--global-primary-color);
|
||||
color: white;
|
||||
}
|
||||
.menu-search-tips {
|
||||
margin-bottom: 15px;
|
||||
padding: 0 15px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.menu-search-tips > div {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.menu-search-tips .mr-1 {
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
.menu-search-tips .mr-5 {
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
.menu-search-tips .w-5 {
|
||||
width: 14px;
|
||||
}
|
||||
|
||||
.menu-search-tips kbd {
|
||||
line-height: 1.5;
|
||||
border: 1px solid #e5e7eb;
|
||||
font-size: 10px;
|
||||
text-align: center;
|
||||
padding: 2px 6px;
|
||||
font-family:
|
||||
ui-monospace,
|
||||
SFMono-Regular,
|
||||
Menlo,
|
||||
Monaco,
|
||||
Consolas,
|
||||
Liberation Mono,
|
||||
Courier New,
|
||||
monospace;
|
||||
border-radius: 5px;
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
.pear-message-center {
|
||||
width: 360px;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.pear-message-center .layui-tab .layui-tab-title {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.pear-message-center .layui-tab .layui-tab-title .layui-this::after {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.pear-message-center .layui-tab .layui-tab-title li {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.pear-message-center .message-item img {
|
||||
margin-left: 8px;
|
||||
width: 33px !important;
|
||||
height: 33px !important;
|
||||
border-radius: 50px;
|
||||
margin-right: 15px;
|
||||
}
|
||||
|
||||
.pear-message-center .message-item {
|
||||
height: 64px !important;
|
||||
line-height: 45px !important;
|
||||
padding-right: 20px;
|
||||
padding-left: 20px;
|
||||
border-bottom: 1px solid whitesmoke;
|
||||
padding-top: 10px;
|
||||
padding-bottom: 15px;
|
||||
}
|
||||
|
||||
.pear-message-center .message-item .extra {
|
||||
float: right;
|
||||
right: 10px;
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
/* Make clicks pass-through */
|
||||
#nprogress {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
#nprogress .bar {
|
||||
background: var(--global-primary-color);
|
||||
|
||||
position: fixed;
|
||||
z-index: 999999;
|
||||
top: 0;
|
||||
left: 0;
|
||||
|
||||
width: 100%;
|
||||
height: 2px;
|
||||
}
|
||||
|
||||
/* Fancy blur effect */
|
||||
#nprogress .peg {
|
||||
display: block;
|
||||
position: absolute;
|
||||
right: 0px;
|
||||
width: 100px;
|
||||
height: 100%;
|
||||
box-shadow:
|
||||
0 0 10px var(--global-primary-color),
|
||||
0 0 5px var(--global-primary-color);
|
||||
opacity: 1;
|
||||
|
||||
-webkit-transform: rotate(3deg) translate(0px, -4px);
|
||||
-ms-transform: rotate(3deg) translate(0px, -4px);
|
||||
transform: rotate(3deg) translate(0px, -4px);
|
||||
}
|
||||
|
||||
/* Remove these to get rid of the spinner */
|
||||
#nprogress .spinner {
|
||||
display: block;
|
||||
position: fixed;
|
||||
z-index: 1031;
|
||||
top: 15px;
|
||||
right: 15px;
|
||||
}
|
||||
|
||||
#nprogress .spinner-icon {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
box-sizing: border-box;
|
||||
|
||||
border: solid 2px transparent;
|
||||
border-top-color: var(--global-primary-color);
|
||||
border-left-color: var(--global-primary-color);
|
||||
border-radius: 50%;
|
||||
|
||||
-webkit-animation: nprogress-spinner 400ms linear infinite;
|
||||
animation: nprogress-spinner 400ms linear infinite;
|
||||
}
|
||||
|
||||
.nprogress-custom-parent {
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.nprogress-custom-parent #nprogress .spinner,
|
||||
.nprogress-custom-parent #nprogress .bar {
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
@-webkit-keyframes nprogress-spinner {
|
||||
0% {
|
||||
-webkit-transform: rotate(0deg);
|
||||
}
|
||||
100% {
|
||||
-webkit-transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
@keyframes nprogress-spinner {
|
||||
0% {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
100% {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,154 @@
|
||||
.pear-page {
|
||||
width: 100%;
|
||||
position: relative;
|
||||
overflow-y: auto;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.pear-page .dot {
|
||||
width: 5px;
|
||||
height: 24px;
|
||||
background-color: #5fb878;
|
||||
margin-top: 8px;
|
||||
margin-left: 15px;
|
||||
border-radius: 2px;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.pear-page .pear-page-title {
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
background-color: white;
|
||||
border: whitesmoke 1px solid;
|
||||
}
|
||||
|
||||
.pear-page .pear-page-content,
|
||||
.pear-page .pear-page-content iframe {
|
||||
width: 100%;
|
||||
height: calc(100% - 0px) !important;
|
||||
}
|
||||
|
||||
.pear-page .pear-page-content iframe {
|
||||
height: calc(100% - 4px) !important;
|
||||
}
|
||||
|
||||
.pear-page-loading {
|
||||
position: absolute;
|
||||
display: none;
|
||||
width: 100%;
|
||||
height: calc(100% - 0px) !important;
|
||||
background-color: #fff;
|
||||
top: 0px;
|
||||
z-index: 19;
|
||||
}
|
||||
|
||||
.pear-page-loading.close {
|
||||
animation: close 1s;
|
||||
-webkit-animation: close 1s;
|
||||
animation-fill-mode: forwards;
|
||||
}
|
||||
|
||||
.ball-loader {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
-ms-transform: translate(-50%, -50%);
|
||||
-webkit-transform: translate(-50%, -50%);
|
||||
}
|
||||
|
||||
.ball-loader > span,
|
||||
.signal-loader > span {
|
||||
background-color: #4aca85;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.ball-loader > span:nth-child(1),
|
||||
.ball-loader.sm > span:nth-child(1),
|
||||
.signal-loader > span:nth-child(1),
|
||||
.signal-loader.sm > span:nth-child(1) {
|
||||
-webkit-animation-delay: 0s;
|
||||
animation-delay: 0s;
|
||||
}
|
||||
|
||||
.ball-loader > span:nth-child(2),
|
||||
.ball-loader.sm > span:nth-child(2),
|
||||
.signal-loader > span:nth-child(2),
|
||||
.signal-loader.sm > span:nth-child(2) {
|
||||
-webkit-animation-delay: 0.1s;
|
||||
animation-delay: 0.1s;
|
||||
}
|
||||
|
||||
.ball-loader > span:nth-child(3),
|
||||
.ball-loader.sm > span:nth-child(3),
|
||||
.signal-loader > span:nth-child(3),
|
||||
.signal-loader.sm > span:nth-child(3) {
|
||||
-webkit-animation-delay: 0.15s;
|
||||
animation-delay: 0.15s;
|
||||
}
|
||||
|
||||
.ball-loader > span:nth-child(4),
|
||||
.ball-loader.sm > span:nth-child(4),
|
||||
.signal-loader > span:nth-child(4),
|
||||
.signal-loader.sm > span:nth-child(4) {
|
||||
-webkit-animation-delay: 0.2s;
|
||||
animation-delay: 0.2s;
|
||||
}
|
||||
|
||||
.ball-loader > span {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
margin: 0 3px;
|
||||
border-radius: 50%;
|
||||
transform: scale(0);
|
||||
-ms-transform: scale(0);
|
||||
-webkit-transform: scale(0);
|
||||
animation: ball-load 1s ease-in-out infinite;
|
||||
-webkit-animation: 1s ball-load ease-in-out infinite;
|
||||
}
|
||||
|
||||
@-webkit-keyframes ball-load {
|
||||
0% {
|
||||
transform: scale(0);
|
||||
-webkit-transform: scale(0);
|
||||
}
|
||||
|
||||
50% {
|
||||
transform: scale(1);
|
||||
-webkit-transform: scale(1);
|
||||
}
|
||||
|
||||
100% {
|
||||
transform: scale(0);
|
||||
-webkit-transform: scale(0);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes ball-load {
|
||||
0% {
|
||||
transform: scale(0);
|
||||
-webkit-transform: scale(0);
|
||||
}
|
||||
|
||||
50% {
|
||||
transform: scale(1);
|
||||
-webkit-transform: scale(1);
|
||||
}
|
||||
|
||||
100% {
|
||||
transform: scale(0);
|
||||
-webkit-transform: scale(0);
|
||||
}
|
||||
}
|
||||
|
||||
@-webkit-keyframes close {
|
||||
0% {
|
||||
opacity: 1;
|
||||
/*display: block;*/
|
||||
}
|
||||
|
||||
100% {
|
||||
opacity: 0;
|
||||
/*display: none;*/
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,314 @@
|
||||
.pear-tab-page {
|
||||
margin: 0px;
|
||||
overflow: hidden;
|
||||
height: 100% !important;
|
||||
}
|
||||
|
||||
.pear-tab-page .layui-tab-content {
|
||||
height: calc(100% - 42px) !important;
|
||||
}
|
||||
|
||||
.pear-tab-page .layui-tab-content .layui-tab-item {
|
||||
overflow-y: auto;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.pear-tab-page-menu {
|
||||
box-shadow: none;
|
||||
border-radius: 4px !important;
|
||||
overflow: hidden;
|
||||
box-shadow: 2px 0 6px rgba(0, 21, 41, 0.1);
|
||||
}
|
||||
|
||||
.pear-tab-page-menu .item {
|
||||
height: 20px;
|
||||
padding-left: 18px;
|
||||
padding-top: 7px;
|
||||
padding-bottom: 7px;
|
||||
color: #333;
|
||||
font-size: 13.5px;
|
||||
line-height: 20px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.pear-tab-page-menu .item:hover {
|
||||
background: var(--global-primary-color);
|
||||
color: white;
|
||||
}
|
||||
|
||||
.pear-tab-page .layui-tab-content {
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.pear-tab-page > .layui-tab-title {
|
||||
border: none;
|
||||
border: 1px solid whitesmoke;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.pear-tab-page > .layui-tab-title li {
|
||||
border-right: 1px solid whitesmoke;
|
||||
color: dimgray;
|
||||
font-size: 13.5px;
|
||||
}
|
||||
|
||||
.pear-tab-page > .layui-tab-title .layui-tab-bar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.pear-tab-page .layui-nav-more {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.pear-tab-page > .layui-tab-title .layui-this:after {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.pear-tab-page > .layui-tab-title .pear-tab-page-active {
|
||||
display: inline-block;
|
||||
background-color: lightgray;
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
border-radius: 30px;
|
||||
margin-right: 12px;
|
||||
}
|
||||
|
||||
.pear-tab-page > .layui-tab-title .layui-this .pear-tab-page-active {
|
||||
background-color: var(--global-primary-color) !important;
|
||||
}
|
||||
|
||||
.pear-tab-page > .layui-tab-title .layui-tab-close:hover {
|
||||
background-color: white;
|
||||
line-height: 19px;
|
||||
color: gray;
|
||||
}
|
||||
|
||||
.pear-tab-page > .layui-tab-title .disable-close + .layui-tab-close {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.pear-tab-page > .layui-tab-title .able-close + .layui-tab-close {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.pear-tab-page .layui-tab-close {
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.pear-tab-page .layui-tab-control > li {
|
||||
position: absolute;
|
||||
top: 0px;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
width: 40px;
|
||||
background-color: white;
|
||||
border-top: whitesmoke 1px solid;
|
||||
border-bottom: whitesmoke 1px solid;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.pear-tab-page .layui-tab-prev {
|
||||
left: 0px;
|
||||
border-right: whitesmoke 1px solid;
|
||||
}
|
||||
|
||||
.pear-tab-page .layui-tab-next {
|
||||
right: 40px;
|
||||
border-left: 1px solid whitesmoke;
|
||||
}
|
||||
|
||||
.pear-tab-page .layui-tab-tool {
|
||||
right: 0px;
|
||||
border-left: 1px solid whitesmoke;
|
||||
}
|
||||
|
||||
.pear-tab-page .layui-tab-control .layui-tab-tool,
|
||||
.pear-tab-page .layui-tab-control .layui-tab-prev,
|
||||
.pear-tab-page .layui-tab-control .layui-tab-next {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.pear-tab-page.layui-tab-roll .layui-tab-control .layui-tab-prev,
|
||||
.pear-tab-page.layui-tab-roll .layui-tab-control .layui-tab-next {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.pear-tab-page.layui-tab-roll .layui-tab-control .layui-tab-next {
|
||||
right: 0px;
|
||||
border-right: 1px solid whitesmoke;
|
||||
}
|
||||
|
||||
.pear-tab-page.layui-tab-roll .layui-tab-title {
|
||||
padding-left: 40px;
|
||||
padding-right: 40px;
|
||||
}
|
||||
|
||||
.pear-tab-page.layui-tab-tool .layui-tab-control .layui-tab-tool {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.pear-tab-page.layui-tab-tool .layui-tab-title {
|
||||
padding-left: 0px;
|
||||
padding-right: 40px;
|
||||
}
|
||||
|
||||
.pear-tab-page.layui-tab-rollTool > .layui-tab-title {
|
||||
padding-left: 40px;
|
||||
padding-right: 80px;
|
||||
}
|
||||
|
||||
.pear-tab-page.layui-tab-rollTool .layui-tab-control .layui-tab-prev,
|
||||
.pear-tab-page.layui-tab-rollTool .layui-tab-control .layui-tab-next,
|
||||
.pear-tab-page.layui-tab-rollTool .layui-tab-control .layui-tab-tool {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.pear-tab-page .layui-tab-tool .layui-nav {
|
||||
position: absolute;
|
||||
height: 43px !important;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding: 0;
|
||||
background: 0 0;
|
||||
}
|
||||
|
||||
.pear-tab-page .layui-tab-tool .layui-nav-item {
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
.pear-tab-page .layui-tab-tool .layui-nav-bar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.pear-tab-page .layui-tab-tool .layui-nav-child {
|
||||
left: auto;
|
||||
top: 45px;
|
||||
right: 3px;
|
||||
width: 120px;
|
||||
border: 1px solid whitesmoke;
|
||||
}
|
||||
|
||||
.pear-tab-page .layui-tab-tool .layui-this a {
|
||||
background-color: #009688;
|
||||
}
|
||||
|
||||
.pear-tab-page-loading {
|
||||
position: absolute;
|
||||
display: none;
|
||||
width: 100%;
|
||||
height: calc(100% - 42px);
|
||||
top: 42px;
|
||||
z-index: 19;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.pear-tab-page-loading.close {
|
||||
animation: close 1s;
|
||||
-webkit-animation: close 1s;
|
||||
animation-fill-mode: forwards;
|
||||
}
|
||||
|
||||
.ball-loader {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
-ms-transform: translate(-50%, -50%);
|
||||
-webkit-transform: translate(-50%, -50%);
|
||||
}
|
||||
|
||||
.ball-loader > span,
|
||||
.signal-loader > span {
|
||||
background-color: var(--global-primary-color) !important;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.ball-loader > span:nth-child(1),
|
||||
.ball-loader.sm > span:nth-child(1),
|
||||
.signal-loader > span:nth-child(1),
|
||||
.signal-loader.sm > span:nth-child(1) {
|
||||
-webkit-animation-delay: 0s;
|
||||
animation-delay: 0s;
|
||||
}
|
||||
|
||||
.ball-loader > span:nth-child(2),
|
||||
.ball-loader.sm > span:nth-child(2),
|
||||
.signal-loader > span:nth-child(2),
|
||||
.signal-loader.sm > span:nth-child(2) {
|
||||
-webkit-animation-delay: 0.1s;
|
||||
animation-delay: 0.1s;
|
||||
}
|
||||
|
||||
.ball-loader > span:nth-child(3),
|
||||
.ball-loader.sm > span:nth-child(3),
|
||||
.signal-loader > span:nth-child(3),
|
||||
.signal-loader.sm > span:nth-child(3) {
|
||||
-webkit-animation-delay: 0.15s;
|
||||
animation-delay: 0.15s;
|
||||
}
|
||||
|
||||
.ball-loader > span:nth-child(4),
|
||||
.ball-loader.sm > span:nth-child(4),
|
||||
.signal-loader > span:nth-child(4),
|
||||
.signal-loader.sm > span:nth-child(4) {
|
||||
-webkit-animation-delay: 0.2s;
|
||||
animation-delay: 0.2s;
|
||||
}
|
||||
|
||||
.ball-loader > span {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
margin: 0 3px;
|
||||
border-radius: 50%;
|
||||
transform: scale(0);
|
||||
-ms-transform: scale(0);
|
||||
-webkit-transform: scale(0);
|
||||
animation: ball-load 1s ease-in-out infinite;
|
||||
-webkit-animation: 1s ball-load ease-in-out infinite;
|
||||
}
|
||||
|
||||
@-webkit-keyframes ball-load {
|
||||
0% {
|
||||
transform: scale(0);
|
||||
-webkit-transform: scale(0);
|
||||
}
|
||||
|
||||
50% {
|
||||
transform: scale(1);
|
||||
-webkit-transform: scale(1);
|
||||
}
|
||||
|
||||
100% {
|
||||
transform: scale(0);
|
||||
-webkit-transform: scale(0);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes ball-load {
|
||||
0% {
|
||||
transform: scale(0);
|
||||
-webkit-transform: scale(0);
|
||||
}
|
||||
|
||||
50% {
|
||||
transform: scale(1);
|
||||
-webkit-transform: scale(1);
|
||||
}
|
||||
|
||||
100% {
|
||||
transform: scale(0);
|
||||
-webkit-transform: scale(0);
|
||||
}
|
||||
}
|
||||
|
||||
@-webkit-keyframes close {
|
||||
0% {
|
||||
opacity: 1;
|
||||
/*display: block;*/
|
||||
}
|
||||
|
||||
100% {
|
||||
opacity: 0;
|
||||
/*display: none;*/
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,10 @@
|
||||
@import url("../../layui/css/layui.css");
|
||||
@import url("../font/iconfont.css");
|
||||
@import url("module/nprogress.css");
|
||||
@import url("module/messageCenter.css");
|
||||
@import url("module/global.css");
|
||||
@import url("module/menu.css");
|
||||
@import url("module/menuSearch.css");
|
||||
@import url("module/page.css");
|
||||
@import url("module/tabPage.css");
|
||||
@import url("module/toast.css");
|
||||
@@ -0,0 +1,579 @@
|
||||
@font-face {
|
||||
font-family: "pear-icon"; /* Project id 2654996 */
|
||||
src:
|
||||
url("iconfont.woff2?t=1625555217253") format("woff2"),
|
||||
url("iconfont.woff?t=1625555217253") format("woff"),
|
||||
url("iconfont.ttf?t=1625555217253") format("truetype");
|
||||
}
|
||||
|
||||
.pear-icon {
|
||||
font-family: "pear-icon" !important;
|
||||
font-size: 16px;
|
||||
font-style: normal;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
.pear-icon-load:before {
|
||||
content: "\e6f0";
|
||||
}
|
||||
|
||||
.pear-icon-download:before {
|
||||
content: "\e68d";
|
||||
}
|
||||
|
||||
.pear-icon-electronics:before {
|
||||
content: "\e68e";
|
||||
}
|
||||
|
||||
.pear-icon-drag:before {
|
||||
content: "\e68f";
|
||||
}
|
||||
|
||||
.pear-icon-elipsis:before {
|
||||
content: "\e690";
|
||||
}
|
||||
|
||||
.pear-icon-export:before {
|
||||
content: "\e691";
|
||||
}
|
||||
|
||||
.pear-icon-explain:before {
|
||||
content: "\e692";
|
||||
}
|
||||
|
||||
.pear-icon-edit:before {
|
||||
content: "\e693";
|
||||
}
|
||||
|
||||
.pear-icon-eye-close:before {
|
||||
content: "\e694";
|
||||
}
|
||||
|
||||
.pear-icon-email:before {
|
||||
content: "\e695";
|
||||
}
|
||||
|
||||
.pear-icon-error:before {
|
||||
content: "\e696";
|
||||
}
|
||||
|
||||
.pear-icon-favorite:before {
|
||||
content: "\e697";
|
||||
}
|
||||
|
||||
.pear-icon-file-common:before {
|
||||
content: "\e698";
|
||||
}
|
||||
|
||||
.pear-icon-file-delete:before {
|
||||
content: "\e699";
|
||||
}
|
||||
|
||||
.pear-icon-file-add:before {
|
||||
content: "\e69a";
|
||||
}
|
||||
|
||||
.pear-icon-film:before {
|
||||
content: "\e69b";
|
||||
}
|
||||
|
||||
.pear-icon-fabulous:before {
|
||||
content: "\e69c";
|
||||
}
|
||||
|
||||
.pear-icon-file:before {
|
||||
content: "\e69d";
|
||||
}
|
||||
|
||||
.pear-icon-folder-close:before {
|
||||
content: "\e69e";
|
||||
}
|
||||
|
||||
.pear-icon-filter:before {
|
||||
content: "\e69f";
|
||||
}
|
||||
|
||||
.pear-icon-good:before {
|
||||
content: "\e6a0";
|
||||
}
|
||||
|
||||
.pear-icon-hide:before {
|
||||
content: "\e6a1";
|
||||
}
|
||||
|
||||
.pear-icon-home:before {
|
||||
content: "\e6a2";
|
||||
}
|
||||
|
||||
.pear-icon-history:before {
|
||||
content: "\e6a3";
|
||||
}
|
||||
|
||||
.pear-icon-file-open:before {
|
||||
content: "\e6a4";
|
||||
}
|
||||
|
||||
.pear-icon-forward:before {
|
||||
content: "\e6a5";
|
||||
}
|
||||
|
||||
.pear-icon-import:before {
|
||||
content: "\e6a6";
|
||||
}
|
||||
|
||||
.pear-icon-image-text:before {
|
||||
content: "\e6a7";
|
||||
}
|
||||
|
||||
.pear-icon-keyboard-26:before {
|
||||
content: "\e6a8";
|
||||
}
|
||||
|
||||
.pear-icon-keyboard-9:before {
|
||||
content: "\e6a9";
|
||||
}
|
||||
|
||||
.pear-icon-link:before {
|
||||
content: "\e6aa";
|
||||
}
|
||||
|
||||
.pear-icon-layout:before {
|
||||
content: "\e6ab";
|
||||
}
|
||||
|
||||
.pear-icon-fullscreen-shrink:before {
|
||||
content: "\e6ac";
|
||||
}
|
||||
|
||||
.pear-icon-layers:before {
|
||||
content: "\e6ad";
|
||||
}
|
||||
|
||||
.pear-icon-lock:before {
|
||||
content: "\e6ae";
|
||||
}
|
||||
|
||||
.pear-icon-fullscreen-expand:before {
|
||||
content: "\e6af";
|
||||
}
|
||||
|
||||
.pear-icon-map:before {
|
||||
content: "\e6b0";
|
||||
}
|
||||
|
||||
.pear-icon-meh:before {
|
||||
content: "\e6b1";
|
||||
}
|
||||
|
||||
.pear-icon-menu:before {
|
||||
content: "\e6b2";
|
||||
}
|
||||
|
||||
.pear-icon-loading:before {
|
||||
content: "\e6b3";
|
||||
}
|
||||
|
||||
.pear-icon-help:before {
|
||||
content: "\e6b4";
|
||||
}
|
||||
|
||||
.pear-icon-minus-circle:before {
|
||||
content: "\e6b5";
|
||||
}
|
||||
|
||||
.pear-icon-modular:before {
|
||||
content: "\e6b6";
|
||||
}
|
||||
|
||||
.pear-icon-notification:before {
|
||||
content: "\e6b7";
|
||||
}
|
||||
|
||||
.pear-icon-mic:before {
|
||||
content: "\e6b8";
|
||||
}
|
||||
|
||||
.pear-icon-more:before {
|
||||
content: "\e6b9";
|
||||
}
|
||||
|
||||
.pear-icon-pad:before {
|
||||
content: "\e6ba";
|
||||
}
|
||||
|
||||
.pear-icon-operation:before {
|
||||
content: "\e6bb";
|
||||
}
|
||||
|
||||
.pear-icon-play:before {
|
||||
content: "\e6bc";
|
||||
}
|
||||
|
||||
.pear-icon-print:before {
|
||||
content: "\e6bd";
|
||||
}
|
||||
|
||||
.pear-icon-mobile-phone:before {
|
||||
content: "\e6be";
|
||||
}
|
||||
|
||||
.pear-icon-minus:before {
|
||||
content: "\e6bf";
|
||||
}
|
||||
|
||||
.pear-icon-navigation:before {
|
||||
content: "\e6c0";
|
||||
}
|
||||
|
||||
.pear-icon-pdf:before {
|
||||
content: "\e6c1";
|
||||
}
|
||||
|
||||
.pear-icon-prompt:before {
|
||||
content: "\e6c2";
|
||||
}
|
||||
|
||||
.pear-icon-move:before {
|
||||
content: "\e6c3";
|
||||
}
|
||||
|
||||
.pear-icon-refresh:before {
|
||||
content: "\e6c4";
|
||||
}
|
||||
|
||||
.pear-icon-run-up:before {
|
||||
content: "\e6c5";
|
||||
}
|
||||
|
||||
.pear-icon-picture:before {
|
||||
content: "\e6c6";
|
||||
}
|
||||
|
||||
.pear-icon-run-in:before {
|
||||
content: "\e6c7";
|
||||
}
|
||||
|
||||
.pear-icon-pin:before {
|
||||
content: "\e6c8";
|
||||
}
|
||||
|
||||
.pear-icon-save:before {
|
||||
content: "\e6c9";
|
||||
}
|
||||
|
||||
.pear-icon-search:before {
|
||||
content: "\e6ca";
|
||||
}
|
||||
|
||||
.pear-icon-share:before {
|
||||
content: "\e6cb";
|
||||
}
|
||||
|
||||
.pear-icon-scanning:before {
|
||||
content: "\e6cc";
|
||||
}
|
||||
|
||||
.pear-icon-security:before {
|
||||
content: "\e6cd";
|
||||
}
|
||||
|
||||
.pear-icon-sign-out:before {
|
||||
content: "\e6ce";
|
||||
}
|
||||
|
||||
.pear-icon-select:before {
|
||||
content: "\e6cf";
|
||||
}
|
||||
|
||||
.pear-icon-stop:before {
|
||||
content: "\e6d0";
|
||||
}
|
||||
|
||||
.pear-icon-success:before {
|
||||
content: "\e6d1";
|
||||
}
|
||||
|
||||
.pear-icon-smile:before {
|
||||
content: "\e6d2";
|
||||
}
|
||||
|
||||
.pear-icon-switch:before {
|
||||
content: "\e6d3";
|
||||
}
|
||||
|
||||
.pear-icon-setting:before {
|
||||
content: "\e6d4";
|
||||
}
|
||||
|
||||
.pear-icon-survey:before {
|
||||
content: "\e6d5";
|
||||
}
|
||||
|
||||
.pear-icon-task:before {
|
||||
content: "\e6d6";
|
||||
}
|
||||
|
||||
.pear-icon-skip:before {
|
||||
content: "\e6d7";
|
||||
}
|
||||
|
||||
.pear-icon-text:before {
|
||||
content: "\e6d8";
|
||||
}
|
||||
|
||||
.pear-icon-time:before {
|
||||
content: "\e6d9";
|
||||
}
|
||||
|
||||
.pear-icon-telephone-out:before {
|
||||
content: "\e6da";
|
||||
}
|
||||
|
||||
.pear-icon-toggle-left:before {
|
||||
content: "\e6db";
|
||||
}
|
||||
|
||||
.pear-icon-toggle-right:before {
|
||||
content: "\e6dc";
|
||||
}
|
||||
|
||||
.pear-icon-telephone:before {
|
||||
content: "\e6dd";
|
||||
}
|
||||
|
||||
.pear-icon-top:before {
|
||||
content: "\e6de";
|
||||
}
|
||||
|
||||
.pear-icon-unlock:before {
|
||||
content: "\e6df";
|
||||
}
|
||||
|
||||
.pear-icon-user:before {
|
||||
content: "\e6e0";
|
||||
}
|
||||
|
||||
.pear-icon-upload:before {
|
||||
content: "\e6e1";
|
||||
}
|
||||
|
||||
.pear-icon-work:before {
|
||||
content: "\e6e2";
|
||||
}
|
||||
|
||||
.pear-icon-training:before {
|
||||
content: "\e6e3";
|
||||
}
|
||||
|
||||
.pear-icon-warning:before {
|
||||
content: "\e6e4";
|
||||
}
|
||||
|
||||
.pear-icon-zoom-in:before {
|
||||
content: "\e6e5";
|
||||
}
|
||||
|
||||
.pear-icon-zoom-out:before {
|
||||
content: "\e6e6";
|
||||
}
|
||||
|
||||
.pear-icon-add-bold:before {
|
||||
content: "\e6e7";
|
||||
}
|
||||
|
||||
.pear-icon-arrow-left-bold:before {
|
||||
content: "\e6e8";
|
||||
}
|
||||
|
||||
.pear-icon-arrow-up-bold:before {
|
||||
content: "\e6e9";
|
||||
}
|
||||
|
||||
.pear-icon-close-bold:before {
|
||||
content: "\e6ea";
|
||||
}
|
||||
|
||||
.pear-icon-arrow-down-bold:before {
|
||||
content: "\e6eb";
|
||||
}
|
||||
|
||||
.pear-icon-minus-bold:before {
|
||||
content: "\e6ec";
|
||||
}
|
||||
|
||||
.pear-icon-arrow-right-bold:before {
|
||||
content: "\e6ed";
|
||||
}
|
||||
|
||||
.pear-icon-select-bold:before {
|
||||
content: "\e6ee";
|
||||
}
|
||||
|
||||
.pear-icon-3column:before {
|
||||
content: "\e663";
|
||||
}
|
||||
|
||||
.pear-icon-column-4:before {
|
||||
content: "\e664";
|
||||
}
|
||||
|
||||
.pear-icon-add:before {
|
||||
content: "\e665";
|
||||
}
|
||||
|
||||
.pear-icon-add-circle:before {
|
||||
content: "\e666";
|
||||
}
|
||||
|
||||
.pear-icon-adjust:before {
|
||||
content: "\e667";
|
||||
}
|
||||
|
||||
.pear-icon-arrow-up-circle:before {
|
||||
content: "\e668";
|
||||
}
|
||||
|
||||
.pear-icon-arrow-right-circle:before {
|
||||
content: "\e669";
|
||||
}
|
||||
|
||||
.pear-icon-arrow-down:before {
|
||||
content: "\e66a";
|
||||
}
|
||||
|
||||
.pear-icon-ashbin:before {
|
||||
content: "\e66b";
|
||||
}
|
||||
|
||||
.pear-icon-arrow-right:before {
|
||||
content: "\e66c";
|
||||
}
|
||||
|
||||
.pear-icon-browse:before {
|
||||
content: "\e66d";
|
||||
}
|
||||
|
||||
.pear-icon-bottom:before {
|
||||
content: "\e66e";
|
||||
}
|
||||
|
||||
.pear-icon-back:before {
|
||||
content: "\e66f";
|
||||
}
|
||||
|
||||
.pear-icon-bad:before {
|
||||
content: "\e670";
|
||||
}
|
||||
|
||||
.pear-icon-arrow-double-left:before {
|
||||
content: "\e671";
|
||||
}
|
||||
|
||||
.pear-icon-arrow-left-circle:before {
|
||||
content: "\e672";
|
||||
}
|
||||
|
||||
.pear-icon-arrow-double-right:before {
|
||||
content: "\e673";
|
||||
}
|
||||
|
||||
.pear-icon-caps-lock:before {
|
||||
content: "\e674";
|
||||
}
|
||||
|
||||
.pear-icon-camera:before {
|
||||
content: "\e675";
|
||||
}
|
||||
|
||||
.pear-icon-chart-bar:before {
|
||||
content: "\e676";
|
||||
}
|
||||
|
||||
.pear-icon-attachment:before {
|
||||
content: "\e677";
|
||||
}
|
||||
|
||||
.pear-icon-code:before {
|
||||
content: "\e678";
|
||||
}
|
||||
|
||||
.pear-icon-close:before {
|
||||
content: "\e679";
|
||||
}
|
||||
|
||||
.pear-icon-check-item:before {
|
||||
content: "\e67a";
|
||||
}
|
||||
|
||||
.pear-icon-calendar:before {
|
||||
content: "\e67b";
|
||||
}
|
||||
|
||||
.pear-icon-comment:before {
|
||||
content: "\e67c";
|
||||
}
|
||||
|
||||
.pear-icon-column-vertical:before {
|
||||
content: "\e67d";
|
||||
}
|
||||
|
||||
.pear-icon-column-horizontal:before {
|
||||
content: "\e67e";
|
||||
}
|
||||
|
||||
.pear-icon-complete:before {
|
||||
content: "\e67f";
|
||||
}
|
||||
|
||||
.pear-icon-chart-pie:before {
|
||||
content: "\e680";
|
||||
}
|
||||
|
||||
.pear-icon-cry:before {
|
||||
content: "\e681";
|
||||
}
|
||||
|
||||
.pear-icon-customer-service:before {
|
||||
content: "\e682";
|
||||
}
|
||||
|
||||
.pear-icon-delete:before {
|
||||
content: "\e683";
|
||||
}
|
||||
|
||||
.pear-icon-direction-down:before {
|
||||
content: "\e684";
|
||||
}
|
||||
|
||||
.pear-icon-copy:before {
|
||||
content: "\e685";
|
||||
}
|
||||
|
||||
.pear-icon-cut:before {
|
||||
content: "\e686";
|
||||
}
|
||||
|
||||
.pear-icon-data-view:before {
|
||||
content: "\e687";
|
||||
}
|
||||
|
||||
.pear-icon-direction-down-circle:before {
|
||||
content: "\e688";
|
||||
}
|
||||
|
||||
.pear-icon-direction-right:before {
|
||||
content: "\e689";
|
||||
}
|
||||
|
||||
.pear-icon-direction-up:before {
|
||||
content: "\e68a";
|
||||
}
|
||||
|
||||
.pear-icon-discount:before {
|
||||
content: "\e68b";
|
||||
}
|
||||
|
||||
.pear-icon-direction-left:before {
|
||||
content: "\e68c";
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,996 @@
|
||||
{
|
||||
"id": "2654996",
|
||||
"name": "pear-admin-layui",
|
||||
"font_family": "pear-icon",
|
||||
"css_prefix_text": "pear-icon-",
|
||||
"description": "",
|
||||
"glyphs": [
|
||||
{
|
||||
"icon_id": "22697089",
|
||||
"name": "加载",
|
||||
"font_class": "load",
|
||||
"unicode": "e6f0",
|
||||
"unicode_decimal": 59120
|
||||
},
|
||||
{
|
||||
"icon_id": "15838464",
|
||||
"name": "download",
|
||||
"font_class": "download",
|
||||
"unicode": "e68d",
|
||||
"unicode_decimal": 59021
|
||||
},
|
||||
{
|
||||
"icon_id": "15838465",
|
||||
"name": "electronics",
|
||||
"font_class": "electronics",
|
||||
"unicode": "e68e",
|
||||
"unicode_decimal": 59022
|
||||
},
|
||||
{
|
||||
"icon_id": "15838466",
|
||||
"name": "drag",
|
||||
"font_class": "drag",
|
||||
"unicode": "e68f",
|
||||
"unicode_decimal": 59023
|
||||
},
|
||||
{
|
||||
"icon_id": "15838467",
|
||||
"name": "elipsis",
|
||||
"font_class": "elipsis",
|
||||
"unicode": "e690",
|
||||
"unicode_decimal": 59024
|
||||
},
|
||||
{
|
||||
"icon_id": "15838468",
|
||||
"name": "export",
|
||||
"font_class": "export",
|
||||
"unicode": "e691",
|
||||
"unicode_decimal": 59025
|
||||
},
|
||||
{
|
||||
"icon_id": "15838469",
|
||||
"name": "explain",
|
||||
"font_class": "explain",
|
||||
"unicode": "e692",
|
||||
"unicode_decimal": 59026
|
||||
},
|
||||
{
|
||||
"icon_id": "15838470",
|
||||
"name": "edit",
|
||||
"font_class": "edit",
|
||||
"unicode": "e693",
|
||||
"unicode_decimal": 59027
|
||||
},
|
||||
{
|
||||
"icon_id": "15838471",
|
||||
"name": "eye-close",
|
||||
"font_class": "eye-close",
|
||||
"unicode": "e694",
|
||||
"unicode_decimal": 59028
|
||||
},
|
||||
{
|
||||
"icon_id": "15838472",
|
||||
"name": "email",
|
||||
"font_class": "email",
|
||||
"unicode": "e695",
|
||||
"unicode_decimal": 59029
|
||||
},
|
||||
{
|
||||
"icon_id": "15838473",
|
||||
"name": "error",
|
||||
"font_class": "error",
|
||||
"unicode": "e696",
|
||||
"unicode_decimal": 59030
|
||||
},
|
||||
{
|
||||
"icon_id": "15838474",
|
||||
"name": "favorite",
|
||||
"font_class": "favorite",
|
||||
"unicode": "e697",
|
||||
"unicode_decimal": 59031
|
||||
},
|
||||
{
|
||||
"icon_id": "15838475",
|
||||
"name": "file-common",
|
||||
"font_class": "file-common",
|
||||
"unicode": "e698",
|
||||
"unicode_decimal": 59032
|
||||
},
|
||||
{
|
||||
"icon_id": "15838476",
|
||||
"name": "file-delete",
|
||||
"font_class": "file-delete",
|
||||
"unicode": "e699",
|
||||
"unicode_decimal": 59033
|
||||
},
|
||||
{
|
||||
"icon_id": "15838477",
|
||||
"name": "file-add",
|
||||
"font_class": "file-add",
|
||||
"unicode": "e69a",
|
||||
"unicode_decimal": 59034
|
||||
},
|
||||
{
|
||||
"icon_id": "15838478",
|
||||
"name": "film",
|
||||
"font_class": "film",
|
||||
"unicode": "e69b",
|
||||
"unicode_decimal": 59035
|
||||
},
|
||||
{
|
||||
"icon_id": "15838479",
|
||||
"name": "fabulous",
|
||||
"font_class": "fabulous",
|
||||
"unicode": "e69c",
|
||||
"unicode_decimal": 59036
|
||||
},
|
||||
{
|
||||
"icon_id": "15838480",
|
||||
"name": "file",
|
||||
"font_class": "file",
|
||||
"unicode": "e69d",
|
||||
"unicode_decimal": 59037
|
||||
},
|
||||
{
|
||||
"icon_id": "15838481",
|
||||
"name": "folder-close",
|
||||
"font_class": "folder-close",
|
||||
"unicode": "e69e",
|
||||
"unicode_decimal": 59038
|
||||
},
|
||||
{
|
||||
"icon_id": "15838482",
|
||||
"name": "filter",
|
||||
"font_class": "filter",
|
||||
"unicode": "e69f",
|
||||
"unicode_decimal": 59039
|
||||
},
|
||||
{
|
||||
"icon_id": "15838483",
|
||||
"name": "good",
|
||||
"font_class": "good",
|
||||
"unicode": "e6a0",
|
||||
"unicode_decimal": 59040
|
||||
},
|
||||
{
|
||||
"icon_id": "15838484",
|
||||
"name": "hide",
|
||||
"font_class": "hide",
|
||||
"unicode": "e6a1",
|
||||
"unicode_decimal": 59041
|
||||
},
|
||||
{
|
||||
"icon_id": "15838485",
|
||||
"name": "home",
|
||||
"font_class": "home",
|
||||
"unicode": "e6a2",
|
||||
"unicode_decimal": 59042
|
||||
},
|
||||
{
|
||||
"icon_id": "15838486",
|
||||
"name": "history",
|
||||
"font_class": "history",
|
||||
"unicode": "e6a3",
|
||||
"unicode_decimal": 59043
|
||||
},
|
||||
{
|
||||
"icon_id": "15838487",
|
||||
"name": "file-open",
|
||||
"font_class": "file-open",
|
||||
"unicode": "e6a4",
|
||||
"unicode_decimal": 59044
|
||||
},
|
||||
{
|
||||
"icon_id": "15838488",
|
||||
"name": "forward",
|
||||
"font_class": "forward",
|
||||
"unicode": "e6a5",
|
||||
"unicode_decimal": 59045
|
||||
},
|
||||
{
|
||||
"icon_id": "15838489",
|
||||
"name": "import",
|
||||
"font_class": "import",
|
||||
"unicode": "e6a6",
|
||||
"unicode_decimal": 59046
|
||||
},
|
||||
{
|
||||
"icon_id": "15838490",
|
||||
"name": "image-text",
|
||||
"font_class": "image-text",
|
||||
"unicode": "e6a7",
|
||||
"unicode_decimal": 59047
|
||||
},
|
||||
{
|
||||
"icon_id": "15838491",
|
||||
"name": "keyboard-26",
|
||||
"font_class": "keyboard-26",
|
||||
"unicode": "e6a8",
|
||||
"unicode_decimal": 59048
|
||||
},
|
||||
{
|
||||
"icon_id": "15838492",
|
||||
"name": "keyboard-9",
|
||||
"font_class": "keyboard-9",
|
||||
"unicode": "e6a9",
|
||||
"unicode_decimal": 59049
|
||||
},
|
||||
{
|
||||
"icon_id": "15838493",
|
||||
"name": "link",
|
||||
"font_class": "link",
|
||||
"unicode": "e6aa",
|
||||
"unicode_decimal": 59050
|
||||
},
|
||||
{
|
||||
"icon_id": "15838494",
|
||||
"name": "layout",
|
||||
"font_class": "layout",
|
||||
"unicode": "e6ab",
|
||||
"unicode_decimal": 59051
|
||||
},
|
||||
{
|
||||
"icon_id": "15838495",
|
||||
"name": "fullscreen-shrink",
|
||||
"font_class": "fullscreen-shrink",
|
||||
"unicode": "e6ac",
|
||||
"unicode_decimal": 59052
|
||||
},
|
||||
{
|
||||
"icon_id": "15838496",
|
||||
"name": "layers",
|
||||
"font_class": "layers",
|
||||
"unicode": "e6ad",
|
||||
"unicode_decimal": 59053
|
||||
},
|
||||
{
|
||||
"icon_id": "15838497",
|
||||
"name": "lock",
|
||||
"font_class": "lock",
|
||||
"unicode": "e6ae",
|
||||
"unicode_decimal": 59054
|
||||
},
|
||||
{
|
||||
"icon_id": "15838498",
|
||||
"name": "fullscreen-expand",
|
||||
"font_class": "fullscreen-expand",
|
||||
"unicode": "e6af",
|
||||
"unicode_decimal": 59055
|
||||
},
|
||||
{
|
||||
"icon_id": "15838499",
|
||||
"name": "map",
|
||||
"font_class": "map",
|
||||
"unicode": "e6b0",
|
||||
"unicode_decimal": 59056
|
||||
},
|
||||
{
|
||||
"icon_id": "15838500",
|
||||
"name": "meh",
|
||||
"font_class": "meh",
|
||||
"unicode": "e6b1",
|
||||
"unicode_decimal": 59057
|
||||
},
|
||||
{
|
||||
"icon_id": "15838501",
|
||||
"name": "menu",
|
||||
"font_class": "menu",
|
||||
"unicode": "e6b2",
|
||||
"unicode_decimal": 59058
|
||||
},
|
||||
{
|
||||
"icon_id": "15838502",
|
||||
"name": "loading",
|
||||
"font_class": "loading",
|
||||
"unicode": "e6b3",
|
||||
"unicode_decimal": 59059
|
||||
},
|
||||
{
|
||||
"icon_id": "15838503",
|
||||
"name": "help",
|
||||
"font_class": "help",
|
||||
"unicode": "e6b4",
|
||||
"unicode_decimal": 59060
|
||||
},
|
||||
{
|
||||
"icon_id": "15838504",
|
||||
"name": "minus-circle",
|
||||
"font_class": "minus-circle",
|
||||
"unicode": "e6b5",
|
||||
"unicode_decimal": 59061
|
||||
},
|
||||
{
|
||||
"icon_id": "15838505",
|
||||
"name": "modular",
|
||||
"font_class": "modular",
|
||||
"unicode": "e6b6",
|
||||
"unicode_decimal": 59062
|
||||
},
|
||||
{
|
||||
"icon_id": "15838506",
|
||||
"name": "notification",
|
||||
"font_class": "notification",
|
||||
"unicode": "e6b7",
|
||||
"unicode_decimal": 59063
|
||||
},
|
||||
{
|
||||
"icon_id": "15838507",
|
||||
"name": "mic",
|
||||
"font_class": "mic",
|
||||
"unicode": "e6b8",
|
||||
"unicode_decimal": 59064
|
||||
},
|
||||
{
|
||||
"icon_id": "15838508",
|
||||
"name": "more",
|
||||
"font_class": "more",
|
||||
"unicode": "e6b9",
|
||||
"unicode_decimal": 59065
|
||||
},
|
||||
{
|
||||
"icon_id": "15838509",
|
||||
"name": "pad",
|
||||
"font_class": "pad",
|
||||
"unicode": "e6ba",
|
||||
"unicode_decimal": 59066
|
||||
},
|
||||
{
|
||||
"icon_id": "15838510",
|
||||
"name": "operation",
|
||||
"font_class": "operation",
|
||||
"unicode": "e6bb",
|
||||
"unicode_decimal": 59067
|
||||
},
|
||||
{
|
||||
"icon_id": "15838511",
|
||||
"name": "play",
|
||||
"font_class": "play",
|
||||
"unicode": "e6bc",
|
||||
"unicode_decimal": 59068
|
||||
},
|
||||
{
|
||||
"icon_id": "15838512",
|
||||
"name": "print",
|
||||
"font_class": "print",
|
||||
"unicode": "e6bd",
|
||||
"unicode_decimal": 59069
|
||||
},
|
||||
{
|
||||
"icon_id": "15838513",
|
||||
"name": "mobile-phone",
|
||||
"font_class": "mobile-phone",
|
||||
"unicode": "e6be",
|
||||
"unicode_decimal": 59070
|
||||
},
|
||||
{
|
||||
"icon_id": "15838514",
|
||||
"name": "minus",
|
||||
"font_class": "minus",
|
||||
"unicode": "e6bf",
|
||||
"unicode_decimal": 59071
|
||||
},
|
||||
{
|
||||
"icon_id": "15838515",
|
||||
"name": "navigation",
|
||||
"font_class": "navigation",
|
||||
"unicode": "e6c0",
|
||||
"unicode_decimal": 59072
|
||||
},
|
||||
{
|
||||
"icon_id": "15838516",
|
||||
"name": "pdf",
|
||||
"font_class": "pdf",
|
||||
"unicode": "e6c1",
|
||||
"unicode_decimal": 59073
|
||||
},
|
||||
{
|
||||
"icon_id": "15838517",
|
||||
"name": "prompt",
|
||||
"font_class": "prompt",
|
||||
"unicode": "e6c2",
|
||||
"unicode_decimal": 59074
|
||||
},
|
||||
{
|
||||
"icon_id": "15838518",
|
||||
"name": "move",
|
||||
"font_class": "move",
|
||||
"unicode": "e6c3",
|
||||
"unicode_decimal": 59075
|
||||
},
|
||||
{
|
||||
"icon_id": "15838519",
|
||||
"name": "refresh",
|
||||
"font_class": "refresh",
|
||||
"unicode": "e6c4",
|
||||
"unicode_decimal": 59076
|
||||
},
|
||||
{
|
||||
"icon_id": "15838520",
|
||||
"name": "run-up",
|
||||
"font_class": "run-up",
|
||||
"unicode": "e6c5",
|
||||
"unicode_decimal": 59077
|
||||
},
|
||||
{
|
||||
"icon_id": "15838521",
|
||||
"name": "picture",
|
||||
"font_class": "picture",
|
||||
"unicode": "e6c6",
|
||||
"unicode_decimal": 59078
|
||||
},
|
||||
{
|
||||
"icon_id": "15838522",
|
||||
"name": "run-in",
|
||||
"font_class": "run-in",
|
||||
"unicode": "e6c7",
|
||||
"unicode_decimal": 59079
|
||||
},
|
||||
{
|
||||
"icon_id": "15838523",
|
||||
"name": "pin",
|
||||
"font_class": "pin",
|
||||
"unicode": "e6c8",
|
||||
"unicode_decimal": 59080
|
||||
},
|
||||
{
|
||||
"icon_id": "15838524",
|
||||
"name": "save",
|
||||
"font_class": "save",
|
||||
"unicode": "e6c9",
|
||||
"unicode_decimal": 59081
|
||||
},
|
||||
{
|
||||
"icon_id": "15838525",
|
||||
"name": "search",
|
||||
"font_class": "search",
|
||||
"unicode": "e6ca",
|
||||
"unicode_decimal": 59082
|
||||
},
|
||||
{
|
||||
"icon_id": "15838526",
|
||||
"name": "share",
|
||||
"font_class": "share",
|
||||
"unicode": "e6cb",
|
||||
"unicode_decimal": 59083
|
||||
},
|
||||
{
|
||||
"icon_id": "15838527",
|
||||
"name": "scanning",
|
||||
"font_class": "scanning",
|
||||
"unicode": "e6cc",
|
||||
"unicode_decimal": 59084
|
||||
},
|
||||
{
|
||||
"icon_id": "15838528",
|
||||
"name": "security",
|
||||
"font_class": "security",
|
||||
"unicode": "e6cd",
|
||||
"unicode_decimal": 59085
|
||||
},
|
||||
{
|
||||
"icon_id": "15838529",
|
||||
"name": "sign-out",
|
||||
"font_class": "sign-out",
|
||||
"unicode": "e6ce",
|
||||
"unicode_decimal": 59086
|
||||
},
|
||||
{
|
||||
"icon_id": "15838530",
|
||||
"name": "select",
|
||||
"font_class": "select",
|
||||
"unicode": "e6cf",
|
||||
"unicode_decimal": 59087
|
||||
},
|
||||
{
|
||||
"icon_id": "15838531",
|
||||
"name": "stop",
|
||||
"font_class": "stop",
|
||||
"unicode": "e6d0",
|
||||
"unicode_decimal": 59088
|
||||
},
|
||||
{
|
||||
"icon_id": "15838532",
|
||||
"name": "success",
|
||||
"font_class": "success",
|
||||
"unicode": "e6d1",
|
||||
"unicode_decimal": 59089
|
||||
},
|
||||
{
|
||||
"icon_id": "15838533",
|
||||
"name": "smile",
|
||||
"font_class": "smile",
|
||||
"unicode": "e6d2",
|
||||
"unicode_decimal": 59090
|
||||
},
|
||||
{
|
||||
"icon_id": "15838534",
|
||||
"name": "switch",
|
||||
"font_class": "switch",
|
||||
"unicode": "e6d3",
|
||||
"unicode_decimal": 59091
|
||||
},
|
||||
{
|
||||
"icon_id": "15838535",
|
||||
"name": "setting",
|
||||
"font_class": "setting",
|
||||
"unicode": "e6d4",
|
||||
"unicode_decimal": 59092
|
||||
},
|
||||
{
|
||||
"icon_id": "15838536",
|
||||
"name": "survey",
|
||||
"font_class": "survey",
|
||||
"unicode": "e6d5",
|
||||
"unicode_decimal": 59093
|
||||
},
|
||||
{
|
||||
"icon_id": "15838537",
|
||||
"name": "task",
|
||||
"font_class": "task",
|
||||
"unicode": "e6d6",
|
||||
"unicode_decimal": 59094
|
||||
},
|
||||
{
|
||||
"icon_id": "15838538",
|
||||
"name": "skip",
|
||||
"font_class": "skip",
|
||||
"unicode": "e6d7",
|
||||
"unicode_decimal": 59095
|
||||
},
|
||||
{
|
||||
"icon_id": "15838539",
|
||||
"name": "text",
|
||||
"font_class": "text",
|
||||
"unicode": "e6d8",
|
||||
"unicode_decimal": 59096
|
||||
},
|
||||
{
|
||||
"icon_id": "15838540",
|
||||
"name": "time",
|
||||
"font_class": "time",
|
||||
"unicode": "e6d9",
|
||||
"unicode_decimal": 59097
|
||||
},
|
||||
{
|
||||
"icon_id": "15838541",
|
||||
"name": "telephone-out",
|
||||
"font_class": "telephone-out",
|
||||
"unicode": "e6da",
|
||||
"unicode_decimal": 59098
|
||||
},
|
||||
{
|
||||
"icon_id": "15838542",
|
||||
"name": "toggle-left",
|
||||
"font_class": "toggle-left",
|
||||
"unicode": "e6db",
|
||||
"unicode_decimal": 59099
|
||||
},
|
||||
{
|
||||
"icon_id": "15838543",
|
||||
"name": "toggle-right",
|
||||
"font_class": "toggle-right",
|
||||
"unicode": "e6dc",
|
||||
"unicode_decimal": 59100
|
||||
},
|
||||
{
|
||||
"icon_id": "15838544",
|
||||
"name": "telephone",
|
||||
"font_class": "telephone",
|
||||
"unicode": "e6dd",
|
||||
"unicode_decimal": 59101
|
||||
},
|
||||
{
|
||||
"icon_id": "15838545",
|
||||
"name": "top",
|
||||
"font_class": "top",
|
||||
"unicode": "e6de",
|
||||
"unicode_decimal": 59102
|
||||
},
|
||||
{
|
||||
"icon_id": "15838546",
|
||||
"name": "unlock",
|
||||
"font_class": "unlock",
|
||||
"unicode": "e6df",
|
||||
"unicode_decimal": 59103
|
||||
},
|
||||
{
|
||||
"icon_id": "15838547",
|
||||
"name": "user",
|
||||
"font_class": "user",
|
||||
"unicode": "e6e0",
|
||||
"unicode_decimal": 59104
|
||||
},
|
||||
{
|
||||
"icon_id": "15838548",
|
||||
"name": "upload",
|
||||
"font_class": "upload",
|
||||
"unicode": "e6e1",
|
||||
"unicode_decimal": 59105
|
||||
},
|
||||
{
|
||||
"icon_id": "15838549",
|
||||
"name": "work",
|
||||
"font_class": "work",
|
||||
"unicode": "e6e2",
|
||||
"unicode_decimal": 59106
|
||||
},
|
||||
{
|
||||
"icon_id": "15838550",
|
||||
"name": "training",
|
||||
"font_class": "training",
|
||||
"unicode": "e6e3",
|
||||
"unicode_decimal": 59107
|
||||
},
|
||||
{
|
||||
"icon_id": "15838551",
|
||||
"name": "warning",
|
||||
"font_class": "warning",
|
||||
"unicode": "e6e4",
|
||||
"unicode_decimal": 59108
|
||||
},
|
||||
{
|
||||
"icon_id": "15838552",
|
||||
"name": "zoom-in",
|
||||
"font_class": "zoom-in",
|
||||
"unicode": "e6e5",
|
||||
"unicode_decimal": 59109
|
||||
},
|
||||
{
|
||||
"icon_id": "15838554",
|
||||
"name": "zoom-out",
|
||||
"font_class": "zoom-out",
|
||||
"unicode": "e6e6",
|
||||
"unicode_decimal": 59110
|
||||
},
|
||||
{
|
||||
"icon_id": "15838560",
|
||||
"name": "add-bold",
|
||||
"font_class": "add-bold",
|
||||
"unicode": "e6e7",
|
||||
"unicode_decimal": 59111
|
||||
},
|
||||
{
|
||||
"icon_id": "15838561",
|
||||
"name": "arrow-left-bold",
|
||||
"font_class": "arrow-left-bold",
|
||||
"unicode": "e6e8",
|
||||
"unicode_decimal": 59112
|
||||
},
|
||||
{
|
||||
"icon_id": "15838562",
|
||||
"name": "arrow-up-bold",
|
||||
"font_class": "arrow-up-bold",
|
||||
"unicode": "e6e9",
|
||||
"unicode_decimal": 59113
|
||||
},
|
||||
{
|
||||
"icon_id": "15838563",
|
||||
"name": "close-bold",
|
||||
"font_class": "close-bold",
|
||||
"unicode": "e6ea",
|
||||
"unicode_decimal": 59114
|
||||
},
|
||||
{
|
||||
"icon_id": "15838564",
|
||||
"name": "arrow-down-bold",
|
||||
"font_class": "arrow-down-bold",
|
||||
"unicode": "e6eb",
|
||||
"unicode_decimal": 59115
|
||||
},
|
||||
{
|
||||
"icon_id": "15838565",
|
||||
"name": "minus-bold",
|
||||
"font_class": "minus-bold",
|
||||
"unicode": "e6ec",
|
||||
"unicode_decimal": 59116
|
||||
},
|
||||
{
|
||||
"icon_id": "15838566",
|
||||
"name": "arrow-right-bold",
|
||||
"font_class": "arrow-right-bold",
|
||||
"unicode": "e6ed",
|
||||
"unicode_decimal": 59117
|
||||
},
|
||||
{
|
||||
"icon_id": "15838567",
|
||||
"name": "select-bold",
|
||||
"font_class": "select-bold",
|
||||
"unicode": "e6ee",
|
||||
"unicode_decimal": 59118
|
||||
},
|
||||
{
|
||||
"icon_id": "15838406",
|
||||
"name": "column-3",
|
||||
"font_class": "3column",
|
||||
"unicode": "e663",
|
||||
"unicode_decimal": 58979
|
||||
},
|
||||
{
|
||||
"icon_id": "15838423",
|
||||
"name": "column-4",
|
||||
"font_class": "column-4",
|
||||
"unicode": "e664",
|
||||
"unicode_decimal": 58980
|
||||
},
|
||||
{
|
||||
"icon_id": "15838424",
|
||||
"name": "add",
|
||||
"font_class": "add",
|
||||
"unicode": "e665",
|
||||
"unicode_decimal": 58981
|
||||
},
|
||||
{
|
||||
"icon_id": "15838425",
|
||||
"name": "add-circle",
|
||||
"font_class": "add-circle",
|
||||
"unicode": "e666",
|
||||
"unicode_decimal": 58982
|
||||
},
|
||||
{
|
||||
"icon_id": "15838426",
|
||||
"name": "adjust",
|
||||
"font_class": "adjust",
|
||||
"unicode": "e667",
|
||||
"unicode_decimal": 58983
|
||||
},
|
||||
{
|
||||
"icon_id": "15838427",
|
||||
"name": "arrow-up-circle",
|
||||
"font_class": "arrow-up-circle",
|
||||
"unicode": "e668",
|
||||
"unicode_decimal": 58984
|
||||
},
|
||||
{
|
||||
"icon_id": "15838428",
|
||||
"name": "arrow-right-circle",
|
||||
"font_class": "arrow-right-circle",
|
||||
"unicode": "e669",
|
||||
"unicode_decimal": 58985
|
||||
},
|
||||
{
|
||||
"icon_id": "15838429",
|
||||
"name": "arrow-down",
|
||||
"font_class": "arrow-down",
|
||||
"unicode": "e66a",
|
||||
"unicode_decimal": 58986
|
||||
},
|
||||
{
|
||||
"icon_id": "15838430",
|
||||
"name": "ashbin",
|
||||
"font_class": "ashbin",
|
||||
"unicode": "e66b",
|
||||
"unicode_decimal": 58987
|
||||
},
|
||||
{
|
||||
"icon_id": "15838431",
|
||||
"name": "arrow-right",
|
||||
"font_class": "arrow-right",
|
||||
"unicode": "e66c",
|
||||
"unicode_decimal": 58988
|
||||
},
|
||||
{
|
||||
"icon_id": "15838432",
|
||||
"name": "browse",
|
||||
"font_class": "browse",
|
||||
"unicode": "e66d",
|
||||
"unicode_decimal": 58989
|
||||
},
|
||||
{
|
||||
"icon_id": "15838433",
|
||||
"name": "bottom",
|
||||
"font_class": "bottom",
|
||||
"unicode": "e66e",
|
||||
"unicode_decimal": 58990
|
||||
},
|
||||
{
|
||||
"icon_id": "15838434",
|
||||
"name": "back",
|
||||
"font_class": "back",
|
||||
"unicode": "e66f",
|
||||
"unicode_decimal": 58991
|
||||
},
|
||||
{
|
||||
"icon_id": "15838435",
|
||||
"name": "bad",
|
||||
"font_class": "bad",
|
||||
"unicode": "e670",
|
||||
"unicode_decimal": 58992
|
||||
},
|
||||
{
|
||||
"icon_id": "15838436",
|
||||
"name": "arrow-double-left",
|
||||
"font_class": "arrow-double-left",
|
||||
"unicode": "e671",
|
||||
"unicode_decimal": 58993
|
||||
},
|
||||
{
|
||||
"icon_id": "15838437",
|
||||
"name": "arrow-left-circle",
|
||||
"font_class": "arrow-left-circle",
|
||||
"unicode": "e672",
|
||||
"unicode_decimal": 58994
|
||||
},
|
||||
{
|
||||
"icon_id": "15838438",
|
||||
"name": "arrow-double-right",
|
||||
"font_class": "arrow-double-right",
|
||||
"unicode": "e673",
|
||||
"unicode_decimal": 58995
|
||||
},
|
||||
{
|
||||
"icon_id": "15838439",
|
||||
"name": "caps-lock",
|
||||
"font_class": "caps-lock",
|
||||
"unicode": "e674",
|
||||
"unicode_decimal": 58996
|
||||
},
|
||||
{
|
||||
"icon_id": "15838440",
|
||||
"name": "camera",
|
||||
"font_class": "camera",
|
||||
"unicode": "e675",
|
||||
"unicode_decimal": 58997
|
||||
},
|
||||
{
|
||||
"icon_id": "15838441",
|
||||
"name": "chart-bar",
|
||||
"font_class": "chart-bar",
|
||||
"unicode": "e676",
|
||||
"unicode_decimal": 58998
|
||||
},
|
||||
{
|
||||
"icon_id": "15838442",
|
||||
"name": "attachment",
|
||||
"font_class": "attachment",
|
||||
"unicode": "e677",
|
||||
"unicode_decimal": 58999
|
||||
},
|
||||
{
|
||||
"icon_id": "15838443",
|
||||
"name": "code",
|
||||
"font_class": "code",
|
||||
"unicode": "e678",
|
||||
"unicode_decimal": 59000
|
||||
},
|
||||
{
|
||||
"icon_id": "15838444",
|
||||
"name": "close",
|
||||
"font_class": "close",
|
||||
"unicode": "e679",
|
||||
"unicode_decimal": 59001
|
||||
},
|
||||
{
|
||||
"icon_id": "15838445",
|
||||
"name": "check-item",
|
||||
"font_class": "check-item",
|
||||
"unicode": "e67a",
|
||||
"unicode_decimal": 59002
|
||||
},
|
||||
{
|
||||
"icon_id": "15838446",
|
||||
"name": "calendar",
|
||||
"font_class": "calendar",
|
||||
"unicode": "e67b",
|
||||
"unicode_decimal": 59003
|
||||
},
|
||||
{
|
||||
"icon_id": "15838447",
|
||||
"name": "comment",
|
||||
"font_class": "comment",
|
||||
"unicode": "e67c",
|
||||
"unicode_decimal": 59004
|
||||
},
|
||||
{
|
||||
"icon_id": "15838448",
|
||||
"name": "column-vertical",
|
||||
"font_class": "column-vertical",
|
||||
"unicode": "e67d",
|
||||
"unicode_decimal": 59005
|
||||
},
|
||||
{
|
||||
"icon_id": "15838449",
|
||||
"name": "column-horizontal",
|
||||
"font_class": "column-horizontal",
|
||||
"unicode": "e67e",
|
||||
"unicode_decimal": 59006
|
||||
},
|
||||
{
|
||||
"icon_id": "15838450",
|
||||
"name": "complete",
|
||||
"font_class": "complete",
|
||||
"unicode": "e67f",
|
||||
"unicode_decimal": 59007
|
||||
},
|
||||
{
|
||||
"icon_id": "15838451",
|
||||
"name": "chart-pie",
|
||||
"font_class": "chart-pie",
|
||||
"unicode": "e680",
|
||||
"unicode_decimal": 59008
|
||||
},
|
||||
{
|
||||
"icon_id": "15838452",
|
||||
"name": "cry",
|
||||
"font_class": "cry",
|
||||
"unicode": "e681",
|
||||
"unicode_decimal": 59009
|
||||
},
|
||||
{
|
||||
"icon_id": "15838453",
|
||||
"name": "customer-service",
|
||||
"font_class": "customer-service",
|
||||
"unicode": "e682",
|
||||
"unicode_decimal": 59010
|
||||
},
|
||||
{
|
||||
"icon_id": "15838454",
|
||||
"name": "delete",
|
||||
"font_class": "delete",
|
||||
"unicode": "e683",
|
||||
"unicode_decimal": 59011
|
||||
},
|
||||
{
|
||||
"icon_id": "15838455",
|
||||
"name": "direction-down",
|
||||
"font_class": "direction-down",
|
||||
"unicode": "e684",
|
||||
"unicode_decimal": 59012
|
||||
},
|
||||
{
|
||||
"icon_id": "15838456",
|
||||
"name": "copy",
|
||||
"font_class": "copy",
|
||||
"unicode": "e685",
|
||||
"unicode_decimal": 59013
|
||||
},
|
||||
{
|
||||
"icon_id": "15838457",
|
||||
"name": "cut",
|
||||
"font_class": "cut",
|
||||
"unicode": "e686",
|
||||
"unicode_decimal": 59014
|
||||
},
|
||||
{
|
||||
"icon_id": "15838458",
|
||||
"name": "data-view",
|
||||
"font_class": "data-view",
|
||||
"unicode": "e687",
|
||||
"unicode_decimal": 59015
|
||||
},
|
||||
{
|
||||
"icon_id": "15838459",
|
||||
"name": "direction-down-circle",
|
||||
"font_class": "direction-down-circle",
|
||||
"unicode": "e688",
|
||||
"unicode_decimal": 59016
|
||||
},
|
||||
{
|
||||
"icon_id": "15838460",
|
||||
"name": "direction-right",
|
||||
"font_class": "direction-right",
|
||||
"unicode": "e689",
|
||||
"unicode_decimal": 59017
|
||||
},
|
||||
{
|
||||
"icon_id": "15838461",
|
||||
"name": "direction-up",
|
||||
"font_class": "direction-up",
|
||||
"unicode": "e68a",
|
||||
"unicode_decimal": 59018
|
||||
},
|
||||
{
|
||||
"icon_id": "15838462",
|
||||
"name": "discount",
|
||||
"font_class": "discount",
|
||||
"unicode": "e68b",
|
||||
"unicode_decimal": 59019
|
||||
},
|
||||
{
|
||||
"icon_id": "15838463",
|
||||
"name": "direction-left",
|
||||
"font_class": "direction-left",
|
||||
"unicode": "e68c",
|
||||
"unicode_decimal": 59020
|
||||
}
|
||||
]
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,888 @@
|
||||
layui.define(
|
||||
[
|
||||
"jquery",
|
||||
"tools",
|
||||
"element",
|
||||
"yaml",
|
||||
"form",
|
||||
"tabPage",
|
||||
"menu",
|
||||
"page",
|
||||
"fullscreen",
|
||||
"messageCenter",
|
||||
"menuSearch",
|
||||
],
|
||||
function (exports) {
|
||||
"use strict";
|
||||
|
||||
var $ = layui.jquery,
|
||||
form = layui.form,
|
||||
yaml = layui.yaml,
|
||||
page = layui.page,
|
||||
menu = layui.menu,
|
||||
messageCenter = layui.messageCenter,
|
||||
menuSearch = layui.menuSearch,
|
||||
fullscreen = layui.fullscreen,
|
||||
tools = layui.tools,
|
||||
tabPage = layui.tabPage;
|
||||
|
||||
var sideMenu;
|
||||
|
||||
var configurationCache;
|
||||
|
||||
var bodyTab;
|
||||
|
||||
var bodyFrame;
|
||||
|
||||
var logout = function () {};
|
||||
|
||||
var body = $("body");
|
||||
|
||||
var pearAdmin = new (function () {
|
||||
this.configuration = {};
|
||||
|
||||
this.configurationPath = "pear.config.yml";
|
||||
|
||||
this.instances = {};
|
||||
|
||||
/**
|
||||
* @since Pear Admin 4.0
|
||||
*
|
||||
* 获取 pear.config 实现 [ default ]
|
||||
*/
|
||||
this.configurationProvider = () => {
|
||||
return new Promise((resolve) => {
|
||||
if (this.configurationPath.indexOf("json") > -1) {
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: this.configurationPath,
|
||||
dataType: "json",
|
||||
async: false,
|
||||
success: (result) => {
|
||||
resolve(result);
|
||||
},
|
||||
});
|
||||
} else {
|
||||
resolve(yaml.load(this.configurationPath));
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* @since Pear Admin 4.0
|
||||
*
|
||||
* 配置 pear.config 路径
|
||||
*/
|
||||
this.setConfigurationPath = (path) => {
|
||||
this.configurationPath = path;
|
||||
};
|
||||
|
||||
/**
|
||||
* @since Pear Admin 4.0
|
||||
*
|
||||
* 获取 pear.config 实现 [ implement ]
|
||||
*/
|
||||
this.setConfigurationProvider = (provider) => {
|
||||
this.configurationProvider = provider;
|
||||
};
|
||||
|
||||
/**
|
||||
* @since Pear Admin 4.0
|
||||
*
|
||||
* 获取 pear.config 配置
|
||||
*/
|
||||
this.getConfiguration = () => {
|
||||
return this.configuration;
|
||||
};
|
||||
|
||||
/**
|
||||
* @since Pear Admin 4.0
|
||||
*
|
||||
* Core Function.
|
||||
*
|
||||
* @param {*} options
|
||||
*/
|
||||
this.render = (options) => {
|
||||
if (options !== undefined) {
|
||||
pearAdmin.apply(options);
|
||||
} else {
|
||||
this.configurationProvider().then((result) => {
|
||||
pearAdmin.apply(result);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* @since Pear Admin 4.0
|
||||
*
|
||||
* 启动构建
|
||||
*/
|
||||
this.apply = function (configuration) {
|
||||
configurationCache = configuration;
|
||||
pearAdmin.logoRender(configuration);
|
||||
pearAdmin.menuRender(configuration);
|
||||
pearAdmin.menuSearchRender(configuration);
|
||||
pearAdmin.bodyRender(configuration);
|
||||
pearAdmin.messageCenterRender(configuration);
|
||||
pearAdmin.themeRender(configuration);
|
||||
pearAdmin.keepLoad(configuration);
|
||||
};
|
||||
|
||||
/**
|
||||
* @since Pear Admin 4.0
|
||||
*/
|
||||
this.menuSearchRender = function (options) {
|
||||
menuSearch.render({
|
||||
elem: ".menuSearch",
|
||||
dataProvider: () => sideMenu.cache(),
|
||||
select: (node) => {
|
||||
if (node.type == "1") {
|
||||
sideMenu.selectItem(node.id);
|
||||
if (node.openType === "_layer") {
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: data.title,
|
||||
content: data.url,
|
||||
area: ["80%", "80%"],
|
||||
maxmin: true,
|
||||
});
|
||||
} else {
|
||||
if (
|
||||
isMuiltTab(options) === "true" ||
|
||||
isMuiltTab(options) === true
|
||||
) {
|
||||
bodyTab.addTabOnly({
|
||||
id: node.id,
|
||||
title: node.title,
|
||||
type: node.openType,
|
||||
url: node.url,
|
||||
icon: node.icon,
|
||||
close: true,
|
||||
});
|
||||
} else {
|
||||
bodyFrame.changePage({
|
||||
href: node.url,
|
||||
type: node.openType,
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
this.messageCenterRender = function (options) {
|
||||
messageCenter.render({
|
||||
elem: ".message",
|
||||
url: options.header.message,
|
||||
height: "250px",
|
||||
});
|
||||
};
|
||||
|
||||
this.logoRender = function (param) {
|
||||
$(".layui-logo .logo").attr("src", param.logo.image);
|
||||
$(".layui-logo .title").html(param.logo.title);
|
||||
};
|
||||
|
||||
this.menuRender = function (param) {
|
||||
sideMenu = menu.render({
|
||||
elem: "sideMenu",
|
||||
async: param.menu.async,
|
||||
method: param.menu.method,
|
||||
control:
|
||||
isControl(param) === "true" || isControl(param) === true
|
||||
? "control"
|
||||
: false,
|
||||
controlWidth: param.menu.controlWidth,
|
||||
accordion: param.menu.accordion,
|
||||
data: param.menu.data,
|
||||
url: param.menu.data,
|
||||
parseData: false,
|
||||
defaultMenu: 0,
|
||||
change: function () {
|
||||
compatible();
|
||||
},
|
||||
done: function () {
|
||||
sideMenu.isCollapse = param.menu.collapse;
|
||||
sideMenu.selectItem(param.menu.select);
|
||||
pearAdmin.collapse(param);
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
this.bodyRender = function (param) {
|
||||
body.on("click", ".refresh", function () {
|
||||
refresh();
|
||||
});
|
||||
|
||||
if (isMuiltTab(param) === "true" || isMuiltTab(param) === true) {
|
||||
bodyTab = tabPage.render({
|
||||
elem: "content",
|
||||
session: param.tab.session,
|
||||
index: 0,
|
||||
tabMax: param.tab.max,
|
||||
preload: param.tab.preload,
|
||||
closeEvent: function (id) {
|
||||
sideMenu.selectItem(id);
|
||||
},
|
||||
data: [
|
||||
{
|
||||
id: param.tab.index.id,
|
||||
url: param.tab.index.href,
|
||||
title: param.tab.index.title,
|
||||
close: false,
|
||||
},
|
||||
],
|
||||
success: function (id) {
|
||||
if (param.tab.session) {
|
||||
setTimeout(function () {
|
||||
sideMenu.selectItem(id);
|
||||
bodyTab.positionTab();
|
||||
}, 500);
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
bodyTab.click(function (id) {
|
||||
if (!param.tab.keepState) {
|
||||
bodyTab.refresh(false);
|
||||
}
|
||||
bodyTab.positionTab();
|
||||
sideMenu.selectItem(id);
|
||||
});
|
||||
|
||||
sideMenu.click(function (dom, data) {
|
||||
if (data.menuOpenType === "_layer") {
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: data.menuTitle,
|
||||
content: data.menuUrl,
|
||||
area: ["80%", "80%"],
|
||||
maxmin: true,
|
||||
});
|
||||
} else {
|
||||
bodyTab.addTabOnly({
|
||||
id: data.menuId,
|
||||
title: data.menuTitle,
|
||||
type: data.menuOpenType,
|
||||
url: data.menuUrl,
|
||||
icon: data.menuIcon,
|
||||
close: true,
|
||||
});
|
||||
}
|
||||
compatible();
|
||||
});
|
||||
} else {
|
||||
bodyFrame = page.render({
|
||||
elem: "content",
|
||||
title: "首页",
|
||||
url: param.tab.index.href,
|
||||
});
|
||||
|
||||
sideMenu.click(function (dom, data) {
|
||||
if (data.menuOpenType === "_layer") {
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: data.menuTitle,
|
||||
content: data.menuUrl,
|
||||
area: ["80%", "80%"],
|
||||
maxmin: true,
|
||||
});
|
||||
} else {
|
||||
bodyFrame.changePage({
|
||||
href: data.menuUrl,
|
||||
type: data.menuOpenType,
|
||||
});
|
||||
}
|
||||
compatible();
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
this.keepLoad = function (param) {
|
||||
compatible();
|
||||
setTimeout(function () {
|
||||
$(".loader-wrapper").fadeOut(200);
|
||||
}, param.other.keepLoad);
|
||||
};
|
||||
|
||||
this.changeTheme = function () {
|
||||
const variableKey = "--global-primary-color";
|
||||
const variableVal = localStorage.getItem("theme-color-color");
|
||||
document.documentElement.style.setProperty(variableKey, variableVal);
|
||||
};
|
||||
|
||||
this.themeRender = function (option) {
|
||||
if (option.theme.allowCustom === false) {
|
||||
$(".setting").remove();
|
||||
}
|
||||
var colorId = localStorage.getItem("theme-color");
|
||||
var currentColor = getColorById(colorId);
|
||||
localStorage.setItem("theme-color", currentColor.id);
|
||||
localStorage.setItem("theme-color-color", currentColor.color);
|
||||
localStorage.setItem("theme-color-second", currentColor.second);
|
||||
pearAdmin.changeTheme();
|
||||
|
||||
var menu = localStorage.getItem("theme-menu");
|
||||
if (menu === null) {
|
||||
menu = option.theme.defaultMenu;
|
||||
} else {
|
||||
if (option.theme.allowCustom === false) {
|
||||
menu = option.theme.defaultMenu;
|
||||
}
|
||||
}
|
||||
|
||||
var header = localStorage.getItem("theme-header");
|
||||
if (header === null) {
|
||||
header = option.theme.defaultHeader;
|
||||
} else {
|
||||
if (option.theme.allowCustom === false) {
|
||||
header = option.theme.defaultHeader;
|
||||
}
|
||||
}
|
||||
|
||||
var banner = localStorage.getItem("theme-banner");
|
||||
if (banner === null) {
|
||||
banner = option.theme.banner;
|
||||
} else {
|
||||
if (option.theme.allowCustom === false) {
|
||||
banner = option.theme.banner;
|
||||
}
|
||||
}
|
||||
|
||||
var autoHead = localStorage.getItem("auto-head");
|
||||
if (autoHead === null) {
|
||||
autoHead = option.other.autoHead;
|
||||
} else {
|
||||
if (option.theme.allowCustom === false) {
|
||||
autoHead = option.other.autoHead;
|
||||
}
|
||||
}
|
||||
|
||||
var muiltTab = localStorage.getItem("muilt-tab");
|
||||
if (muiltTab === null) {
|
||||
muiltTab = option.tab.enable;
|
||||
} else {
|
||||
if (option.theme.allowCustom === false) {
|
||||
muiltTab = option.tab.enable;
|
||||
}
|
||||
}
|
||||
|
||||
var control = localStorage.getItem("control");
|
||||
if (control === null) {
|
||||
control = option.menu.control;
|
||||
} else {
|
||||
if (option.theme.allowCustom === false) {
|
||||
control = option.menu.control;
|
||||
}
|
||||
}
|
||||
|
||||
var footer = localStorage.getItem("footer");
|
||||
if (footer === null) {
|
||||
footer = option.other.footer;
|
||||
} else {
|
||||
if (option.theme.allowCustom === false) {
|
||||
footer = option.other.footer;
|
||||
}
|
||||
}
|
||||
|
||||
var dark = localStorage.getItem("dark");
|
||||
if (dark === null) {
|
||||
dark = option.theme.dark;
|
||||
} else {
|
||||
if (option.theme.allowCustom === false) {
|
||||
dark = option.theme.dark;
|
||||
}
|
||||
}
|
||||
|
||||
localStorage.setItem("muilt-tab", muiltTab);
|
||||
localStorage.setItem("theme-banner", banner);
|
||||
localStorage.setItem("theme-menu", menu);
|
||||
localStorage.setItem("theme-header", header);
|
||||
localStorage.setItem("auto-head", autoHead);
|
||||
localStorage.setItem("control", control);
|
||||
localStorage.setItem("footer", footer);
|
||||
localStorage.setItem("dark", dark);
|
||||
this.menuSkin(menu);
|
||||
this.headerSkin(header);
|
||||
this.bannerSkin(banner);
|
||||
this.enableDark(dark);
|
||||
this.footer(footer);
|
||||
};
|
||||
|
||||
this.footer = function (footer) {
|
||||
var bodyDOM = $(".pear-admin .layui-body");
|
||||
var footerDOM = $(".pear-admin .layui-footer");
|
||||
if (footer === true || footer === "true") {
|
||||
footerDOM.removeClass("close");
|
||||
bodyDOM.css("bottom", footerDOM.outerHeight());
|
||||
} else {
|
||||
footerDOM.addClass("close");
|
||||
bodyDOM.css("bottom", "");
|
||||
}
|
||||
};
|
||||
|
||||
this.bannerSkin = function (theme) {
|
||||
var pearAdmin = $(".pear-admin");
|
||||
pearAdmin.removeClass("banner-layout");
|
||||
if (theme === true || theme === "true") {
|
||||
pearAdmin.addClass("banner-layout");
|
||||
}
|
||||
};
|
||||
|
||||
this.enableDark = function (checked) {
|
||||
var $pearAdmin = $(".pear-admin");
|
||||
$pearAdmin.removeClass("pear-admin-dark");
|
||||
if (checked === true || checked === "true") {
|
||||
$pearAdmin.addClass("pear-admin-dark");
|
||||
}
|
||||
};
|
||||
|
||||
this.collapse = function (param) {
|
||||
if (param.menu.collapse) {
|
||||
if ($(window).width() >= 768) {
|
||||
collapse();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
this.menuSkin = function (theme) {
|
||||
var pearAdmin = $(".pear-admin .layui-side");
|
||||
pearAdmin.removeClass("light-theme");
|
||||
pearAdmin.removeClass("dark-theme");
|
||||
pearAdmin.addClass(theme);
|
||||
};
|
||||
|
||||
this.headerSkin = function (theme) {
|
||||
var pearAdmin = $(".pear-admin .layui-header");
|
||||
pearAdmin.removeClass("dark-theme");
|
||||
pearAdmin.removeClass("light-theme");
|
||||
pearAdmin.removeClass("auto-theme");
|
||||
pearAdmin.addClass(theme);
|
||||
};
|
||||
|
||||
this.logout = function (callback) {
|
||||
logout = callback;
|
||||
};
|
||||
})();
|
||||
|
||||
function refresh() {
|
||||
var refreshA = $(".refresh a");
|
||||
refreshA.removeClass("layui-icon-refresh-1");
|
||||
refreshA.addClass("layui-anim");
|
||||
refreshA.addClass("layui-anim-rotate");
|
||||
refreshA.addClass("layui-anim-loop");
|
||||
refreshA.addClass("layui-icon-loading");
|
||||
if (
|
||||
isMuiltTab(configurationCache) === "true" ||
|
||||
isMuiltTab(configurationCache) === true
|
||||
)
|
||||
bodyTab.refresh(true);
|
||||
else bodyFrame.refresh(true);
|
||||
setTimeout(function () {
|
||||
refreshA.addClass("layui-icon-refresh-1");
|
||||
refreshA.removeClass("layui-anim");
|
||||
refreshA.removeClass("layui-anim-rotate");
|
||||
refreshA.removeClass("layui-anim-loop");
|
||||
refreshA.removeClass("layui-icon-loading");
|
||||
}, 600);
|
||||
}
|
||||
|
||||
function collapse() {
|
||||
sideMenu.collapse();
|
||||
var admin = $(".pear-admin");
|
||||
var left = $(".layui-icon-spread-left");
|
||||
var right = $(".layui-icon-shrink-right");
|
||||
if (admin.is(".pear-mini")) {
|
||||
left.addClass("layui-icon-shrink-right");
|
||||
left.removeClass("layui-icon-spread-left");
|
||||
admin.removeClass("pear-mini");
|
||||
sideMenu.isCollapse = false;
|
||||
} else {
|
||||
right.addClass("layui-icon-spread-left");
|
||||
right.removeClass("layui-icon-shrink-right");
|
||||
admin.addClass("pear-mini");
|
||||
sideMenu.isCollapse = true;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @since Pear Admin 4.0
|
||||
*
|
||||
* 使用 admin.logout(Function) 实现注销
|
||||
*
|
||||
* Promise<boolean> 作为返回值类型时,泛型内容为 true 时视为注销成功,则清除 bodyTab 缓存
|
||||
*
|
||||
* 否则视为注销失败,不做任何处置。
|
||||
*/
|
||||
body.on("click", ".logout", function () {
|
||||
var promise = logout();
|
||||
if (promise != undefined) {
|
||||
promise.then((asyncResult) => {
|
||||
if (asyncResult) {
|
||||
bodyTab.clear();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
bodyTab.clear();
|
||||
}
|
||||
});
|
||||
|
||||
body.on("click", ".collapse,.pear-cover", function () {
|
||||
collapse();
|
||||
});
|
||||
|
||||
body.on("click", ".fullScreen", function () {
|
||||
if ($(this).hasClass("layui-icon-screen-restore")) {
|
||||
fullscreen.fullClose().then(function () {
|
||||
$(".fullScreen").eq(0).removeClass("layui-icon-screen-restore");
|
||||
});
|
||||
} else {
|
||||
fullscreen.fullScreen().then(function () {
|
||||
$(".fullScreen").eq(0).addClass("layui-icon-screen-restore");
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
body.on("click", "[user-menu-id]", function () {
|
||||
if (
|
||||
isMuiltTab(configurationCache) === "true" ||
|
||||
isMuiltTab(configurationCache) === true
|
||||
) {
|
||||
bodyTab.addTabOnly(
|
||||
{
|
||||
id: $(this).attr("user-menu-id"),
|
||||
title: $(this).attr("user-menu-title"),
|
||||
url: $(this).attr("user-menu-url"),
|
||||
icon: "",
|
||||
close: true,
|
||||
},
|
||||
300,
|
||||
);
|
||||
} else {
|
||||
bodyFrame.changePage($(this).attr("user-menu-url"), true);
|
||||
}
|
||||
});
|
||||
|
||||
body.on("click", ".setting", function () {
|
||||
var menuItem =
|
||||
'<li class="layui-this" data-select-bgcolor="dark-theme" >' +
|
||||
'<a href="javascript:;" data-skin="skin-blue" style="" class="clearfix full-opacity-hover">' +
|
||||
'<div><span style="display:block; width: 20%; float: left; height: 12px; background: #28333E;"></span><span style="display:block; width: 80%; float: left; height: 12px; background: white;"></span></div>' +
|
||||
'<div><span style="display:block; width: 20%; float: left; height: 40px; background: #28333E;"></span><span style="display:block; width: 80%; float: left; height: 40px; background: #f4f5f7;"></span></div>' +
|
||||
"</a>" +
|
||||
"</li>";
|
||||
|
||||
menuItem +=
|
||||
'<li data-select-bgcolor="light-theme" >' +
|
||||
'<a href="javascript:;" data-skin="skin-blue" style="" class="clearfix full-opacity-hover">' +
|
||||
'<div><span style="display:block; width: 20%; float: left; height: 12px; background: white;"></span><span style="display:block; width: 80%; float: left; height: 12px; background: white;"></span></div>' +
|
||||
'<div><span style="display:block; width: 20%; float: left; height: 40px; background: white;"></span><span style="display:block; width: 80%; float: left; height: 40px; background: #f4f5f7;"></span></div>' +
|
||||
"</a>" +
|
||||
"</li>";
|
||||
|
||||
var menuHtml =
|
||||
'<div class="pearone-color">\n' +
|
||||
'<div class="color-title">菜单风格</div>\n' +
|
||||
'<div class="color-content">\n' +
|
||||
"<ul>\n" +
|
||||
menuItem +
|
||||
"</ul>\n" +
|
||||
"</div>\n" +
|
||||
"</div>";
|
||||
|
||||
var headItem =
|
||||
'<li class="layui-this" data-select-header="light-theme" >' +
|
||||
'<a href="javascript:;" data-skin="skin-blue" style="" class="clearfix full-opacity-hover">' +
|
||||
'<div><span style="display:block; width: 20%; float: left; height: 12px; background: #28333E;"></span><span style="display:block; width: 80%; float: left; height: 12px; background: white;"></span></div>' +
|
||||
'<div><span style="display:block; width: 20%; float: left; height: 40px; background: #28333E;"></span><span style="display:block; width: 80%; float: left; height: 40px; background: #f4f5f7;"></span></div>' +
|
||||
"</a>" +
|
||||
"</li>";
|
||||
|
||||
headItem +=
|
||||
'<li data-select-header="dark-theme" >' +
|
||||
'<a href="javascript:;" data-skin="skin-blue" style="" class="clearfix full-opacity-hover">' +
|
||||
'<div><span style="display:block; width: 20%; float: left; height: 12px; background: #28333E;"></span><span style="display:block; width: 80%; float: left; height: 12px; background: #28333E;"></span></div>' +
|
||||
'<div><span style="display:block; width: 20%; float: left; height: 40px; background: #28333E;"></span><span style="display:block; width: 80%; float: left; height: 40px; background: #f4f5f7;"></span></div>' +
|
||||
"</a>" +
|
||||
"</li>";
|
||||
|
||||
headItem +=
|
||||
'<li data-select-header="auto-theme" >' +
|
||||
'<a href="javascript:;" data-skin="skin-blue" style="" class="clearfix full-opacity-hover">' +
|
||||
'<div><span style="display:block; width: 20%; float: left; height: 12px; background: #28333E;"></span><span style="display:block; width: 80%; float: left; height: 12px; background: var(--global-primary-color);" ></span></div>' +
|
||||
'<div><span style="display:block; width: 20%; float: left; height: 40px; background: #28333E;"></span><span style="display:block; width: 80%; float: left; height: 40px; background: #f4f5f7;"></span></div>' +
|
||||
"</a>" +
|
||||
"</li>";
|
||||
|
||||
var headHtml =
|
||||
'<div class="pearone-color">\n' +
|
||||
'<div class="color-title">顶栏风格</div>\n' +
|
||||
'<div class="color-content">\n' +
|
||||
"<ul>\n" +
|
||||
headItem +
|
||||
"</ul>\n" +
|
||||
"</div>\n" +
|
||||
"</div>";
|
||||
|
||||
var moreItem =
|
||||
'<div class="layui-form-item"><div class="layui-input-inline" style="width:200px;"><input type="checkbox" name="control" lay-filter="control" lay-skin="switch" lay-text="开|关"></div><span class="set-text">菜单分割</span></div>';
|
||||
|
||||
moreItem +=
|
||||
'<div class="layui-form-item"><div class="layui-input-inline" style="width:200px;"><input type="checkbox" name="muilt-tab" lay-filter="muilt-tab" lay-skin="switch" lay-text="开|关"></div><span class="set-text">多选项卡</span></div>';
|
||||
|
||||
moreItem +=
|
||||
'<div class="layui-form-item"><div class="layui-input-inline" style="width:200px;"><input type="checkbox" name="banner" lay-filter="banner" lay-skin="switch" lay-text="开|关"></div><span class="set-text">通栏布局</span></div>';
|
||||
|
||||
moreItem +=
|
||||
'<div class="layui-form-item"><div class="layui-input-inline" style="width:200px;"><input type="checkbox" name="footer" lay-filter="footer" lay-skin="switch" lay-text="开|关"></div><span class="set-text">开启页脚</span></div>';
|
||||
|
||||
moreItem +=
|
||||
'<div class="layui-form-item"><div class="layui-input-inline" style="width:200px;"><input type="checkbox" name="dark" lay-filter="dark" lay-skin="switch" lay-text="开|关"></div><span class="set-text">夜间模式</span></div>';
|
||||
|
||||
var moreHtml =
|
||||
'<br><div class="pearone-color">\n' +
|
||||
'<div class="color-title">更多设置</div>\n' +
|
||||
'<div class="color-content">\n' +
|
||||
'<form class="layui-form">\n' +
|
||||
moreItem +
|
||||
"</form>\n" +
|
||||
"</div>\n" +
|
||||
"</div>";
|
||||
|
||||
layer.open({
|
||||
type: 1,
|
||||
offset: "r",
|
||||
area: ["320px", "100%"],
|
||||
title: false,
|
||||
shade: 0.1,
|
||||
closeBtn: 0,
|
||||
shadeClose: false,
|
||||
anim: -1,
|
||||
skin: "layer-anim-right",
|
||||
move: false,
|
||||
content: menuHtml + headHtml + buildColorHtml() + moreHtml,
|
||||
success: function (layero, index) {
|
||||
form.render();
|
||||
|
||||
var color = localStorage.getItem("theme-color");
|
||||
var menu = localStorage.getItem("theme-menu");
|
||||
var header = localStorage.getItem("theme-header");
|
||||
|
||||
if (color !== "null") {
|
||||
$(".select-color-item")
|
||||
.removeClass("layui-icon")
|
||||
.removeClass("layui-icon-ok");
|
||||
$("*[color-id='" + color + "']")
|
||||
.addClass("layui-icon")
|
||||
.addClass("layui-icon-ok");
|
||||
}
|
||||
|
||||
if (menu !== "null") {
|
||||
$("*[data-select-bgcolor]").removeClass("layui-this");
|
||||
$("[data-select-bgcolor='" + menu + "']").addClass("layui-this");
|
||||
}
|
||||
|
||||
if (header !== "null") {
|
||||
$("*[data-select-header]").removeClass("layui-this");
|
||||
$("[data-select-header='" + header + "']").addClass("layui-this");
|
||||
}
|
||||
|
||||
$("#layui-layer-shade" + index).click(function () {
|
||||
var $layero = $("#layui-layer" + index);
|
||||
$layero.animate(
|
||||
{
|
||||
left: $layero.offset().left + $layero.width(),
|
||||
},
|
||||
200,
|
||||
function () {
|
||||
layer.close(index);
|
||||
},
|
||||
);
|
||||
});
|
||||
|
||||
form.on("switch(control)", function (data) {
|
||||
localStorage.setItem("control", this.checked);
|
||||
window.location.reload();
|
||||
});
|
||||
|
||||
form.on("switch(muilt-tab)", function (data) {
|
||||
localStorage.setItem("muilt-tab", this.checked);
|
||||
window.location.reload();
|
||||
});
|
||||
|
||||
form.on("switch(auto-head)", function (data) {
|
||||
localStorage.setItem("auto-head", this.checked);
|
||||
pearAdmin.changeTheme();
|
||||
});
|
||||
|
||||
form.on("switch(banner)", function (data) {
|
||||
localStorage.setItem("theme-banner", this.checked);
|
||||
pearAdmin.bannerSkin(this.checked);
|
||||
});
|
||||
|
||||
form.on("switch(footer)", function (data) {
|
||||
localStorage.setItem("footer", this.checked);
|
||||
pearAdmin.footer(this.checked);
|
||||
});
|
||||
|
||||
form.on("switch(dark)", function (data) {
|
||||
localStorage.setItem("dark", this.checked);
|
||||
pearAdmin.enableDark(this.checked);
|
||||
});
|
||||
|
||||
if (localStorage.getItem("theme-banner") === "true") {
|
||||
$('input[name="banner"]').attr("checked", "checked");
|
||||
} else {
|
||||
$('input[name="banner"]').removeAttr("checked");
|
||||
}
|
||||
|
||||
if (localStorage.getItem("control") === "true") {
|
||||
$('input[name="control"]').attr("checked", "checked");
|
||||
} else {
|
||||
$('input[name="control"]').removeAttr("checked");
|
||||
}
|
||||
|
||||
if (localStorage.getItem("muilt-tab") === "true") {
|
||||
$('input[name="muilt-tab"]').attr("checked", "checked");
|
||||
} else {
|
||||
$('input[name="muilt-tab"]').removeAttr("checked");
|
||||
}
|
||||
|
||||
if (localStorage.getItem("footer") === "true") {
|
||||
$('input[name="footer"]').attr("checked", "checked");
|
||||
} else {
|
||||
$('input[name="footer"]').removeAttr("checked");
|
||||
}
|
||||
|
||||
if (localStorage.getItem("dark") === "true") {
|
||||
$('input[name="dark"]').attr("checked", "checked");
|
||||
} else {
|
||||
$('input[name="dark"]').removeAttr("checked");
|
||||
}
|
||||
|
||||
form.render("checkbox");
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
body.on("click", "[data-select-bgcolor]", function () {
|
||||
var theme = $(this).attr("data-select-bgcolor");
|
||||
$("[data-select-bgcolor]").removeClass("layui-this");
|
||||
$(this).addClass("layui-this");
|
||||
localStorage.setItem("theme-menu", theme);
|
||||
pearAdmin.menuSkin(theme);
|
||||
});
|
||||
|
||||
body.on("click", "[data-select-header]", function () {
|
||||
var headerColor = $(this).attr("data-select-header");
|
||||
$("[data-select-header]").removeClass("layui-this");
|
||||
$(this).addClass("layui-this");
|
||||
localStorage.setItem("theme-header", headerColor);
|
||||
if (headerColor == "auto-theme") {
|
||||
localStorage.setItem("auto-head", true);
|
||||
pearAdmin.changeTheme();
|
||||
} else {
|
||||
localStorage.setItem("auto-head", false);
|
||||
pearAdmin.changeTheme();
|
||||
}
|
||||
pearAdmin.headerSkin(headerColor);
|
||||
});
|
||||
|
||||
body.on("click", ".select-color-item", function () {
|
||||
$(".select-color-item")
|
||||
.removeClass("layui-icon")
|
||||
.removeClass("layui-icon-ok");
|
||||
$(this).addClass("layui-icon").addClass("layui-icon-ok");
|
||||
var colorId = $(".select-color-item.layui-icon-ok").attr("color-id");
|
||||
var currentColor = getColorById(colorId);
|
||||
localStorage.setItem("theme-color", currentColor.id);
|
||||
localStorage.setItem("theme-color-color", currentColor.color);
|
||||
localStorage.setItem("theme-color-second", currentColor.second);
|
||||
pearAdmin.changeTheme();
|
||||
});
|
||||
|
||||
function getColorById(id) {
|
||||
var color;
|
||||
var flag = false;
|
||||
$.each(configurationCache.colors, function (i, value) {
|
||||
if (value.id === id) {
|
||||
color = value;
|
||||
flag = true;
|
||||
}
|
||||
});
|
||||
if (flag === false || configurationCache.theme.allowCustom === false) {
|
||||
$.each(configurationCache.colors, function (i, value) {
|
||||
if (value.id === configurationCache.theme.defaultColor) {
|
||||
color = value;
|
||||
}
|
||||
});
|
||||
}
|
||||
return color;
|
||||
}
|
||||
|
||||
function buildColorHtml() {
|
||||
var colors = "";
|
||||
$.each(configurationCache.colors, function (i, value) {
|
||||
colors +=
|
||||
"<span class='select-color-item' color-id='" +
|
||||
value.id +
|
||||
"' style='background-color:" +
|
||||
value.color +
|
||||
";'></span>";
|
||||
});
|
||||
return (
|
||||
"<div class='select-color'><div class='select-color-title'>主题颜色</div><div class='select-color-content'>" +
|
||||
colors +
|
||||
"</div></div>"
|
||||
);
|
||||
}
|
||||
|
||||
function compatible() {
|
||||
if ($(window).width() <= 768) {
|
||||
collapse();
|
||||
}
|
||||
}
|
||||
|
||||
function isControl(option) {
|
||||
if (option.theme.allowCustom) {
|
||||
if (localStorage.getItem("control") != null) {
|
||||
return localStorage.getItem("control");
|
||||
} else {
|
||||
return option.menu.control;
|
||||
}
|
||||
} else {
|
||||
return option.menu.control;
|
||||
}
|
||||
}
|
||||
|
||||
function isMuiltTab(option) {
|
||||
if (option.theme.allowCustom) {
|
||||
if (localStorage.getItem("muilt-tab") != null) {
|
||||
return localStorage.getItem("muilt-tab");
|
||||
} else {
|
||||
return option.tab.enable;
|
||||
}
|
||||
} else {
|
||||
return option.tab.enable;
|
||||
}
|
||||
}
|
||||
|
||||
window.onresize = function () {
|
||||
if (!fullscreen.isFullscreen()) {
|
||||
$(".fullScreen").eq(0).removeClass("layui-icon-screen-restore");
|
||||
}
|
||||
};
|
||||
|
||||
$(window).on(
|
||||
"resize",
|
||||
tools.debounce(function () {
|
||||
if (sideMenu && !sideMenu.isCollapse && $(window).width() <= 768) {
|
||||
collapse();
|
||||
}
|
||||
}, 50),
|
||||
);
|
||||
|
||||
exports("admin", pearAdmin);
|
||||
},
|
||||
);
|
||||
@@ -0,0 +1,60 @@
|
||||
layui.define(["jquery"], function (exports) {
|
||||
"use strict";
|
||||
|
||||
/**
|
||||
* @since Pear Admin 4.0
|
||||
*
|
||||
* Button component
|
||||
* */
|
||||
var MOD_NAME = "button",
|
||||
$ = layui.jquery;
|
||||
|
||||
var button = function (opt) {
|
||||
this.option = opt;
|
||||
};
|
||||
|
||||
/**
|
||||
* @since Pear Admin 4.0
|
||||
*
|
||||
* Button start loading
|
||||
* */
|
||||
button.prototype.load = function (opt) {
|
||||
var options = {
|
||||
elem: opt.elem,
|
||||
time: opt.time ? opt.time : false,
|
||||
done: opt.done ? opt.done : function () {},
|
||||
};
|
||||
|
||||
var text = $(options.elem).html();
|
||||
|
||||
$(options.elem).html(
|
||||
"<i class='layui-anim layui-anim-rotate layui-icon layui-anim-loop layui-icon-loading'/>",
|
||||
);
|
||||
$(options.elem).attr("disabled", "disabled");
|
||||
|
||||
var $button = $(options.elem);
|
||||
|
||||
if (options.time != "" || options.time != false) {
|
||||
setTimeout(function () {
|
||||
$button.attr("disabled", false);
|
||||
$button.html(text);
|
||||
options.done();
|
||||
}, options.time);
|
||||
}
|
||||
options.text = text;
|
||||
return new button(options);
|
||||
};
|
||||
|
||||
/**
|
||||
* @since Pear Admin 4.0
|
||||
*
|
||||
* Button stop loaded
|
||||
* */
|
||||
button.prototype.stop = function (success) {
|
||||
$(this.option.elem).attr("disabled", false);
|
||||
$(this.option.elem).html(this.option.text);
|
||||
success && success();
|
||||
};
|
||||
|
||||
exports(MOD_NAME, new button());
|
||||
});
|
||||
@@ -0,0 +1,34 @@
|
||||
layui.define(["jquery", "element"], function (exports) {
|
||||
"use strict";
|
||||
|
||||
var MOD_NAME = "count",
|
||||
$ = layui.jquery,
|
||||
element = layui.element;
|
||||
|
||||
var count = new (function () {
|
||||
this.up = function (targetEle, options) {
|
||||
options = options || {};
|
||||
|
||||
var $this = document.getElementById(targetEle),
|
||||
time = options.time,
|
||||
finalNum = options.num,
|
||||
regulator = options.regulator,
|
||||
step = finalNum / (time / regulator),
|
||||
count = 0.0,
|
||||
initial = 0;
|
||||
|
||||
var timer = setInterval(function () {
|
||||
count = count + step;
|
||||
if (count >= finalNum) {
|
||||
clearInterval(timer);
|
||||
count = finalNum;
|
||||
}
|
||||
var t = count.toFixed(options.bit ? options.bit : 0);
|
||||
if (t == initial) return;
|
||||
initial = t;
|
||||
$this.innerHTML = initial;
|
||||
}, 30);
|
||||
};
|
||||
})();
|
||||
exports(MOD_NAME, count);
|
||||
});
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,406 @@
|
||||
layui.define(function (exports) {
|
||||
exports("echartsTheme", {
|
||||
color: ["#3fb1e3", "#6be6c1", "#626c91", "#a0a7e6", "#c4ebad", "#96dee8"],
|
||||
backgroundColor: "rgba(252,252,252,0)",
|
||||
textStyle: {},
|
||||
title: {
|
||||
textStyle: {
|
||||
color: "#666666",
|
||||
},
|
||||
subtextStyle: {
|
||||
color: "#999999",
|
||||
},
|
||||
},
|
||||
line: {
|
||||
itemStyle: {
|
||||
borderWidth: "3",
|
||||
},
|
||||
lineStyle: {
|
||||
width: "4",
|
||||
},
|
||||
symbolSize: "10",
|
||||
symbol: "emptyCircle",
|
||||
smooth: true,
|
||||
},
|
||||
radar: {
|
||||
itemStyle: {
|
||||
borderWidth: "3",
|
||||
},
|
||||
lineStyle: {
|
||||
width: "4",
|
||||
},
|
||||
symbolSize: "10",
|
||||
symbol: "emptyCircle",
|
||||
smooth: true,
|
||||
},
|
||||
bar: {
|
||||
itemStyle: {
|
||||
barBorderWidth: 0,
|
||||
barBorderColor: "#ccc",
|
||||
},
|
||||
emphasis: {
|
||||
itemStyle: {
|
||||
barBorderWidth: 0,
|
||||
barBorderColor: "#ccc",
|
||||
},
|
||||
},
|
||||
},
|
||||
pie: {
|
||||
itemStyle: {
|
||||
borderWidth: 0,
|
||||
borderColor: "#ccc",
|
||||
},
|
||||
emphasis: {
|
||||
itemStyle: {
|
||||
borderWidth: 0,
|
||||
borderColor: "#ccc",
|
||||
},
|
||||
},
|
||||
},
|
||||
scatter: {
|
||||
itemStyle: {
|
||||
borderWidth: 0,
|
||||
borderColor: "#ccc",
|
||||
},
|
||||
emphasis: {
|
||||
itemStyle: {
|
||||
borderWidth: 0,
|
||||
borderColor: "#ccc",
|
||||
},
|
||||
},
|
||||
},
|
||||
boxplot: {
|
||||
itemStyle: {
|
||||
borderWidth: 0,
|
||||
borderColor: "#ccc",
|
||||
},
|
||||
emphasis: {
|
||||
itemStyle: {
|
||||
borderWidth: 0,
|
||||
borderColor: "#ccc",
|
||||
},
|
||||
},
|
||||
},
|
||||
parallel: {
|
||||
itemStyle: {
|
||||
borderWidth: 0,
|
||||
borderColor: "#ccc",
|
||||
},
|
||||
emphasis: {
|
||||
itemStyle: {
|
||||
borderWidth: 0,
|
||||
borderColor: "#ccc",
|
||||
},
|
||||
},
|
||||
},
|
||||
sankey: {
|
||||
itemStyle: {
|
||||
borderWidth: 0,
|
||||
borderColor: "#ccc",
|
||||
},
|
||||
emphasis: {
|
||||
itemStyle: {
|
||||
borderWidth: 0,
|
||||
borderColor: "#ccc",
|
||||
},
|
||||
},
|
||||
},
|
||||
funnel: {
|
||||
itemStyle: {
|
||||
borderWidth: 0,
|
||||
borderColor: "#ccc",
|
||||
},
|
||||
emphasis: {
|
||||
itemStyle: {
|
||||
borderWidth: 0,
|
||||
borderColor: "#ccc",
|
||||
},
|
||||
},
|
||||
},
|
||||
gauge: {
|
||||
itemStyle: {
|
||||
borderWidth: 0,
|
||||
borderColor: "#ccc",
|
||||
},
|
||||
emphasis: {
|
||||
itemStyle: {
|
||||
borderWidth: 0,
|
||||
borderColor: "#ccc",
|
||||
},
|
||||
},
|
||||
},
|
||||
candlestick: {
|
||||
itemStyle: {
|
||||
color: "#e6a0d2",
|
||||
color0: "transparent",
|
||||
borderColor: "#e6a0d2",
|
||||
borderColor0: "#3fb1e3",
|
||||
borderWidth: "2",
|
||||
},
|
||||
},
|
||||
graph: {
|
||||
itemStyle: {
|
||||
borderWidth: 0,
|
||||
borderColor: "#ccc",
|
||||
},
|
||||
lineStyle: {
|
||||
width: "1",
|
||||
color: "#cccccc",
|
||||
},
|
||||
symbolSize: "10",
|
||||
symbol: "emptyCircle",
|
||||
smooth: true,
|
||||
color: ["#3fb1e3", "#6be6c1", "#626c91", "#a0a7e6", "#c4ebad", "#96dee8"],
|
||||
label: {
|
||||
color: "#ffffff",
|
||||
},
|
||||
},
|
||||
map: {
|
||||
itemStyle: {
|
||||
areaColor: "#eeeeee",
|
||||
borderColor: "#aaaaaa",
|
||||
borderWidth: 0.5,
|
||||
},
|
||||
label: {
|
||||
color: "#ffffff",
|
||||
},
|
||||
emphasis: {
|
||||
itemStyle: {
|
||||
areaColor: "rgba(63,177,227,0.25)",
|
||||
borderColor: "#3fb1e3",
|
||||
borderWidth: 1,
|
||||
},
|
||||
label: {
|
||||
color: "rgb(63,177,227)",
|
||||
},
|
||||
},
|
||||
},
|
||||
geo: {
|
||||
itemStyle: {
|
||||
areaColor: "#eeeeee",
|
||||
borderColor: "#aaaaaa",
|
||||
borderWidth: 0.5,
|
||||
},
|
||||
label: {
|
||||
color: "#ffffff",
|
||||
},
|
||||
emphasis: {
|
||||
itemStyle: {
|
||||
areaColor: "rgba(63,177,227,0.25)",
|
||||
borderColor: "#3fb1e3",
|
||||
borderWidth: 1,
|
||||
},
|
||||
label: {
|
||||
color: "rgb(63,177,227)",
|
||||
},
|
||||
},
|
||||
},
|
||||
categoryAxis: {
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: "#cccccc",
|
||||
},
|
||||
},
|
||||
axisTick: {
|
||||
show: false,
|
||||
lineStyle: {
|
||||
color: "#333",
|
||||
},
|
||||
},
|
||||
axisLabel: {
|
||||
show: true,
|
||||
|
||||
color: "#999999",
|
||||
},
|
||||
splitLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: ["#eeeeee"],
|
||||
},
|
||||
},
|
||||
splitArea: {
|
||||
show: false,
|
||||
areaStyle: {
|
||||
color: ["rgba(250,250,250,0.05)", "rgba(200,200,200,0.02)"],
|
||||
},
|
||||
},
|
||||
},
|
||||
valueAxis: {
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: "#cccccc",
|
||||
},
|
||||
},
|
||||
axisTick: {
|
||||
show: false,
|
||||
lineStyle: {
|
||||
color: "#333",
|
||||
},
|
||||
},
|
||||
axisLabel: {
|
||||
show: true,
|
||||
color: "#999999",
|
||||
},
|
||||
splitLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: ["#eeeeee"],
|
||||
},
|
||||
},
|
||||
splitArea: {
|
||||
show: false,
|
||||
areaStyle: {
|
||||
color: ["rgba(250,250,250,0.05)", "rgba(200,200,200,0.02)"],
|
||||
},
|
||||
},
|
||||
},
|
||||
logAxis: {
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: "#cccccc",
|
||||
},
|
||||
},
|
||||
axisTick: {
|
||||
show: false,
|
||||
lineStyle: {
|
||||
color: "#333",
|
||||
},
|
||||
},
|
||||
axisLabel: {
|
||||
show: true,
|
||||
color: "#999999",
|
||||
},
|
||||
splitLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: ["#eeeeee"],
|
||||
},
|
||||
},
|
||||
splitArea: {
|
||||
show: false,
|
||||
areaStyle: {
|
||||
color: ["rgba(250,250,250,0.05)", "rgba(200,200,200,0.02)"],
|
||||
},
|
||||
},
|
||||
},
|
||||
timeAxis: {
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: "#cccccc",
|
||||
},
|
||||
},
|
||||
axisTick: {
|
||||
show: false,
|
||||
lineStyle: {
|
||||
color: "#333",
|
||||
},
|
||||
},
|
||||
axisLabel: {
|
||||
show: true,
|
||||
|
||||
color: "#999999",
|
||||
},
|
||||
splitLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: ["#eeeeee"],
|
||||
},
|
||||
},
|
||||
splitArea: {
|
||||
show: false,
|
||||
areaStyle: {
|
||||
color: ["rgba(250,250,250,0.05)", "rgba(200,200,200,0.02)"],
|
||||
},
|
||||
},
|
||||
},
|
||||
toolbox: {
|
||||
iconStyle: {
|
||||
borderColor: "#999999",
|
||||
},
|
||||
emphasis: {
|
||||
iconStyle: {
|
||||
borderColor: "#666666",
|
||||
},
|
||||
},
|
||||
},
|
||||
legend: {
|
||||
textStyle: {
|
||||
color: "#999999",
|
||||
},
|
||||
},
|
||||
tooltip: {
|
||||
axisPointer: {
|
||||
lineStyle: {
|
||||
color: "#cccccc",
|
||||
width: 1,
|
||||
},
|
||||
crossStyle: {
|
||||
color: "#cccccc",
|
||||
width: 1,
|
||||
},
|
||||
},
|
||||
},
|
||||
timeline: {
|
||||
lineStyle: {
|
||||
color: "#626c91",
|
||||
width: 1,
|
||||
},
|
||||
itemStyle: {
|
||||
color: "#626c91",
|
||||
borderWidth: 1,
|
||||
},
|
||||
controlStyle: {
|
||||
color: "#626c91",
|
||||
borderColor: "#626c91",
|
||||
borderWidth: 0.5,
|
||||
},
|
||||
checkpointStyle: {
|
||||
color: "#3fb1e3",
|
||||
borderColor: "rgba(63,177,227,0.15)",
|
||||
},
|
||||
label: {
|
||||
color: "#626c91",
|
||||
},
|
||||
emphasis: {
|
||||
itemStyle: {
|
||||
color: "#626c91",
|
||||
},
|
||||
controlStyle: {
|
||||
color: "#626c91",
|
||||
borderColor: "#626c91",
|
||||
borderWidth: 0.5,
|
||||
},
|
||||
label: {
|
||||
color: "#626c91",
|
||||
},
|
||||
},
|
||||
},
|
||||
visualMap: {
|
||||
color: ["#2a99c9", "#afe8ff"],
|
||||
},
|
||||
dataZoom: {
|
||||
backgroundColor: "rgba(255,255,255,0)",
|
||||
dataBackgroundColor: "rgba(222,222,222,1)",
|
||||
fillerColor: "rgba(114,230,212,0.25)",
|
||||
handleColor: "#cccccc",
|
||||
handleSize: "100%",
|
||||
textStyle: {
|
||||
color: "#999999",
|
||||
},
|
||||
},
|
||||
markPoint: {
|
||||
label: {
|
||||
color: "#ffffff",
|
||||
},
|
||||
emphasis: {
|
||||
label: {
|
||||
color: "#ffffff",
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,519 @@
|
||||
/* NProgress, (c) 2013, 2014 Rico Sta. Cruz - http://ricostacruz.com/nprogress
|
||||
* @license MIT */
|
||||
|
||||
(function (root, factory) {
|
||||
if (typeof define === "function" && define.amd) {
|
||||
define(factory);
|
||||
} else if (typeof exports === "object") {
|
||||
module.exports = factory();
|
||||
} else {
|
||||
root.NProgress = factory();
|
||||
}
|
||||
})(this, function () {
|
||||
var NProgress = {};
|
||||
|
||||
NProgress.version = "0.2.0";
|
||||
|
||||
var Settings = (NProgress.settings = {
|
||||
minimum: 0.08,
|
||||
easing: "linear",
|
||||
positionUsing: "",
|
||||
speed: 200,
|
||||
trickle: true,
|
||||
trickleSpeed: 200,
|
||||
showSpinner: true,
|
||||
barSelector: '[role="bar"]',
|
||||
spinnerSelector: '[role="spinner"]',
|
||||
parent: "body",
|
||||
template:
|
||||
'<div class="bar" role="bar"><div class="peg"></div></div><div class="spinner" role="spinner"><div class="spinner-icon"></div></div>',
|
||||
});
|
||||
|
||||
/**
|
||||
* Updates configuration.
|
||||
*
|
||||
* NProgress.configure({
|
||||
* minimum: 0.1
|
||||
* });
|
||||
*/
|
||||
NProgress.configure = function (options) {
|
||||
var key, value;
|
||||
for (key in options) {
|
||||
value = options[key];
|
||||
if (value !== undefined && options.hasOwnProperty(key))
|
||||
Settings[key] = value;
|
||||
}
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
/**
|
||||
* Last number.
|
||||
*/
|
||||
|
||||
NProgress.status = null;
|
||||
|
||||
/**
|
||||
* Sets the progress bar status, where `n` is a number from `0.0` to `1.0`.
|
||||
*
|
||||
* NProgress.set(0.4);
|
||||
* NProgress.set(1.0);
|
||||
*/
|
||||
|
||||
NProgress.set = function (n) {
|
||||
var started = NProgress.isStarted();
|
||||
|
||||
n = clamp(n, Settings.minimum, 1);
|
||||
NProgress.status = n === 1 ? null : n;
|
||||
|
||||
var progress = NProgress.render(!started),
|
||||
bar = progress.querySelector(Settings.barSelector),
|
||||
speed = Settings.speed,
|
||||
ease = Settings.easing;
|
||||
|
||||
progress.offsetWidth; /* Repaint */
|
||||
|
||||
queue(function (next) {
|
||||
// Set positionUsing if it hasn't already been set
|
||||
if (Settings.positionUsing === "")
|
||||
Settings.positionUsing = NProgress.getPositioningCSS();
|
||||
|
||||
// Add transition
|
||||
css(bar, barPositionCSS(n, speed, ease));
|
||||
|
||||
if (n === 1) {
|
||||
// Fade out
|
||||
css(progress, {
|
||||
transition: "none",
|
||||
opacity: 1,
|
||||
});
|
||||
progress.offsetWidth; /* Repaint */
|
||||
|
||||
setTimeout(function () {
|
||||
css(progress, {
|
||||
transition: "all " + speed + "ms linear",
|
||||
opacity: 0,
|
||||
});
|
||||
setTimeout(function () {
|
||||
NProgress.remove();
|
||||
next();
|
||||
}, speed);
|
||||
}, speed);
|
||||
} else {
|
||||
setTimeout(next, speed);
|
||||
}
|
||||
});
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
NProgress.isStarted = function () {
|
||||
return typeof NProgress.status === "number";
|
||||
};
|
||||
|
||||
/**
|
||||
* Shows the progress bar.
|
||||
* This is the same as setting the status to 0%, except that it doesn't go backwards.
|
||||
*
|
||||
* NProgress.start();
|
||||
*
|
||||
*/
|
||||
NProgress.start = function () {
|
||||
if (!NProgress.status) NProgress.set(0);
|
||||
|
||||
var work = function () {
|
||||
setTimeout(function () {
|
||||
if (!NProgress.status) return;
|
||||
NProgress.trickle();
|
||||
work();
|
||||
}, Settings.trickleSpeed);
|
||||
};
|
||||
|
||||
if (Settings.trickle) work();
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
/**
|
||||
* Hides the progress bar.
|
||||
* This is the *sort of* the same as setting the status to 100%, with the
|
||||
* difference being `done()` makes some placebo effect of some realistic motion.
|
||||
*
|
||||
* NProgress.done();
|
||||
*
|
||||
* If `true` is passed, it will show the progress bar even if its hidden.
|
||||
*
|
||||
* NProgress.done(true);
|
||||
*/
|
||||
|
||||
NProgress.done = function (force) {
|
||||
if (!force && !NProgress.status) return this;
|
||||
|
||||
return NProgress.inc(0.3 + 0.5 * Math.random()).set(1);
|
||||
};
|
||||
|
||||
/**
|
||||
* Increments by a random amount.
|
||||
*/
|
||||
|
||||
NProgress.inc = function (amount) {
|
||||
var n = NProgress.status;
|
||||
|
||||
if (!n) {
|
||||
return NProgress.start();
|
||||
} else if (n > 1) {
|
||||
return;
|
||||
} else {
|
||||
if (typeof amount !== "number") {
|
||||
if (n >= 0 && n < 0.2) {
|
||||
amount = 0.1;
|
||||
} else if (n >= 0.2 && n < 0.5) {
|
||||
amount = 0.04;
|
||||
} else if (n >= 0.5 && n < 0.8) {
|
||||
amount = 0.02;
|
||||
} else if (n >= 0.8 && n < 0.99) {
|
||||
amount = 0.005;
|
||||
} else {
|
||||
amount = 0;
|
||||
}
|
||||
}
|
||||
|
||||
n = clamp(n + amount, 0, 0.994);
|
||||
return NProgress.set(n);
|
||||
}
|
||||
};
|
||||
|
||||
NProgress.trickle = function () {
|
||||
return NProgress.inc();
|
||||
};
|
||||
|
||||
/**
|
||||
* Waits for all supplied jQuery promises and
|
||||
* increases the progress as the promises resolve.
|
||||
*
|
||||
* @param $promise jQUery Promise
|
||||
*/
|
||||
(function () {
|
||||
var initial = 0,
|
||||
current = 0;
|
||||
|
||||
NProgress.promise = function ($promise) {
|
||||
if (!$promise || $promise.state() === "resolved") {
|
||||
return this;
|
||||
}
|
||||
|
||||
if (current === 0) {
|
||||
NProgress.start();
|
||||
}
|
||||
|
||||
initial++;
|
||||
current++;
|
||||
|
||||
$promise.always(function () {
|
||||
current--;
|
||||
if (current === 0) {
|
||||
initial = 0;
|
||||
NProgress.done();
|
||||
} else {
|
||||
NProgress.set((initial - current) / initial);
|
||||
}
|
||||
});
|
||||
|
||||
return this;
|
||||
};
|
||||
})();
|
||||
|
||||
/**
|
||||
* (Internal) renders the progress bar markup based on the `template`
|
||||
* setting.
|
||||
*/
|
||||
|
||||
NProgress.render = function (fromStart) {
|
||||
if (NProgress.isRendered()) return document.getElementById("nprogress");
|
||||
|
||||
addClass(document.documentElement, "nprogress-busy");
|
||||
|
||||
var progress = document.createElement("div");
|
||||
progress.id = "nprogress";
|
||||
progress.innerHTML = Settings.template;
|
||||
|
||||
var bar = progress.querySelector(Settings.barSelector),
|
||||
perc = fromStart ? "-100" : toBarPerc(NProgress.status || 0),
|
||||
parent = isDOM(Settings.parent)
|
||||
? Settings.parent
|
||||
: document.querySelector(Settings.parent),
|
||||
spinner;
|
||||
|
||||
css(bar, {
|
||||
transition: "all 0 linear",
|
||||
transform: "translate3d(" + perc + "%,0,0)",
|
||||
});
|
||||
|
||||
if (!Settings.showSpinner) {
|
||||
spinner = progress.querySelector(Settings.spinnerSelector);
|
||||
spinner && removeElement(spinner);
|
||||
}
|
||||
|
||||
if (parent != document.body) {
|
||||
addClass(parent, "nprogress-custom-parent");
|
||||
}
|
||||
|
||||
parent.appendChild(progress);
|
||||
return progress;
|
||||
};
|
||||
|
||||
/**
|
||||
* Removes the element. Opposite of render().
|
||||
*/
|
||||
|
||||
NProgress.remove = function () {
|
||||
removeClass(document.documentElement, "nprogress-busy");
|
||||
var parent = isDOM(Settings.parent)
|
||||
? Settings.parent
|
||||
: document.querySelector(Settings.parent);
|
||||
removeClass(parent, "nprogress-custom-parent");
|
||||
var progress = document.getElementById("nprogress");
|
||||
progress && removeElement(progress);
|
||||
};
|
||||
|
||||
/**
|
||||
* Checks if the progress bar is rendered.
|
||||
*/
|
||||
|
||||
NProgress.isRendered = function () {
|
||||
return !!document.getElementById("nprogress");
|
||||
};
|
||||
|
||||
/**
|
||||
* Determine which positioning CSS rule to use.
|
||||
*/
|
||||
|
||||
NProgress.getPositioningCSS = function () {
|
||||
// Sniff on document.body.style
|
||||
var bodyStyle = document.body.style;
|
||||
|
||||
// Sniff prefixes
|
||||
var vendorPrefix =
|
||||
"WebkitTransform" in bodyStyle
|
||||
? "Webkit"
|
||||
: "MozTransform" in bodyStyle
|
||||
? "Moz"
|
||||
: "msTransform" in bodyStyle
|
||||
? "ms"
|
||||
: "OTransform" in bodyStyle
|
||||
? "O"
|
||||
: "";
|
||||
|
||||
if (vendorPrefix + "Perspective" in bodyStyle) {
|
||||
// Modern browsers with 3D support, e.g. Webkit, IE10
|
||||
return "translate3d";
|
||||
} else if (vendorPrefix + "Transform" in bodyStyle) {
|
||||
// Browsers without 3D support, e.g. IE9
|
||||
return "translate";
|
||||
} else {
|
||||
// Browsers without translate() support, e.g. IE7-8
|
||||
return "margin";
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Helpers
|
||||
*/
|
||||
|
||||
function isDOM(obj) {
|
||||
if (typeof HTMLElement === "object") {
|
||||
return obj instanceof HTMLElement;
|
||||
}
|
||||
return (
|
||||
obj &&
|
||||
typeof obj === "object" &&
|
||||
obj.nodeType === 1 &&
|
||||
typeof obj.nodeName === "string"
|
||||
);
|
||||
}
|
||||
|
||||
function clamp(n, min, max) {
|
||||
if (n < min) return min;
|
||||
if (n > max) return max;
|
||||
return n;
|
||||
}
|
||||
|
||||
/**
|
||||
* (Internal) converts a percentage (`0..1`) to a bar translateX
|
||||
* percentage (`-100%..0%`).
|
||||
*/
|
||||
|
||||
function toBarPerc(n) {
|
||||
return (-1 + n) * 100;
|
||||
}
|
||||
|
||||
/**
|
||||
* (Internal) returns the correct CSS for changing the bar's
|
||||
* position given an n percentage, and speed and ease from Settings
|
||||
*/
|
||||
|
||||
function barPositionCSS(n, speed, ease) {
|
||||
var barCSS;
|
||||
|
||||
if (Settings.positionUsing === "translate3d") {
|
||||
barCSS = { transform: "translate3d(" + toBarPerc(n) + "%,0,0)" };
|
||||
} else if (Settings.positionUsing === "translate") {
|
||||
barCSS = { transform: "translate(" + toBarPerc(n) + "%,0)" };
|
||||
} else {
|
||||
barCSS = { "margin-left": toBarPerc(n) + "%" };
|
||||
}
|
||||
|
||||
barCSS.transition = "all " + speed + "ms " + ease;
|
||||
|
||||
return barCSS;
|
||||
}
|
||||
|
||||
/**
|
||||
* (Internal) Queues a function to be executed.
|
||||
*/
|
||||
|
||||
var queue = (function () {
|
||||
var pending = [];
|
||||
|
||||
function next() {
|
||||
var fn = pending.shift();
|
||||
if (fn) {
|
||||
fn(next);
|
||||
}
|
||||
}
|
||||
|
||||
return function (fn) {
|
||||
pending.push(fn);
|
||||
if (pending.length == 1) next();
|
||||
};
|
||||
})();
|
||||
|
||||
/**
|
||||
* (Internal) Applies css properties to an element, similar to the jQuery
|
||||
* css method.
|
||||
*
|
||||
* While this helper does assist with vendor prefixed property names, it
|
||||
* does not perform any manipulation of values prior to setting styles.
|
||||
*/
|
||||
|
||||
var css = (function () {
|
||||
var cssPrefixes = ["Webkit", "O", "Moz", "ms"],
|
||||
cssProps = {};
|
||||
|
||||
function camelCase(string) {
|
||||
return string
|
||||
.replace(/^-ms-/, "ms-")
|
||||
.replace(/-([\da-z])/gi, function (match, letter) {
|
||||
return letter.toUpperCase();
|
||||
});
|
||||
}
|
||||
|
||||
function getVendorProp(name) {
|
||||
var style = document.body.style;
|
||||
if (name in style) return name;
|
||||
|
||||
var i = cssPrefixes.length,
|
||||
capName = name.charAt(0).toUpperCase() + name.slice(1),
|
||||
vendorName;
|
||||
while (i--) {
|
||||
vendorName = cssPrefixes[i] + capName;
|
||||
if (vendorName in style) return vendorName;
|
||||
}
|
||||
|
||||
return name;
|
||||
}
|
||||
|
||||
function getStyleProp(name) {
|
||||
name = camelCase(name);
|
||||
return cssProps[name] || (cssProps[name] = getVendorProp(name));
|
||||
}
|
||||
|
||||
function applyCss(element, prop, value) {
|
||||
prop = getStyleProp(prop);
|
||||
element.style[prop] = value;
|
||||
}
|
||||
|
||||
return function (element, properties) {
|
||||
var args = arguments,
|
||||
prop,
|
||||
value;
|
||||
|
||||
if (args.length == 2) {
|
||||
for (prop in properties) {
|
||||
value = properties[prop];
|
||||
if (value !== undefined && properties.hasOwnProperty(prop))
|
||||
applyCss(element, prop, value);
|
||||
}
|
||||
} else {
|
||||
applyCss(element, args[1], args[2]);
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
/**
|
||||
* (Internal) Determines if an element or space separated list of class names contains a class name.
|
||||
*/
|
||||
|
||||
function hasClass(element, name) {
|
||||
var list = typeof element == "string" ? element : classList(element);
|
||||
return list.indexOf(" " + name + " ") >= 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* (Internal) Adds a class to an element.
|
||||
*/
|
||||
|
||||
function addClass(element, name) {
|
||||
var oldList = classList(element),
|
||||
newList = oldList + name;
|
||||
|
||||
if (hasClass(oldList, name)) return;
|
||||
|
||||
// Trim the opening space.
|
||||
element.className = newList.substring(1);
|
||||
}
|
||||
|
||||
/**
|
||||
* (Internal) Removes a class from an element.
|
||||
*/
|
||||
|
||||
function removeClass(element, name) {
|
||||
var oldList = classList(element),
|
||||
newList;
|
||||
|
||||
if (!hasClass(element, name)) return;
|
||||
|
||||
// Replace the class name.
|
||||
newList = oldList.replace(" " + name + " ", " ");
|
||||
|
||||
// Trim the opening and closing spaces.
|
||||
element.className = newList.substring(1, newList.length - 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* (Internal) Gets a space separated list of the class names on the element.
|
||||
* The list is wrapped with a single space on each end to facilitate finding
|
||||
* matches within the list.
|
||||
*/
|
||||
|
||||
function classList(element) {
|
||||
return (" " + ((element && element.className) || "") + " ").replace(
|
||||
/\s+/gi,
|
||||
" ",
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* (Internal) Removes an element from the DOM.
|
||||
*/
|
||||
|
||||
function removeElement(element) {
|
||||
element && element.parentNode && element.parentNode.removeChild(element);
|
||||
}
|
||||
|
||||
return NProgress;
|
||||
});
|
||||
|
||||
layui.define([], function (exports) {
|
||||
exports("nprogress", NProgress);
|
||||
});
|
||||
@@ -0,0 +1,58 @@
|
||||
layui.define(["layer"], function (exports) {
|
||||
"use strict";
|
||||
|
||||
var MOD_NAME = "popup",
|
||||
layer = layui.layer;
|
||||
|
||||
var popup = new (function () {
|
||||
(this.success = function (msg) {
|
||||
layer.msg(msg, {
|
||||
icon: 1,
|
||||
time: 1000,
|
||||
});
|
||||
}),
|
||||
(this.failure = function (msg) {
|
||||
layer.msg(msg, {
|
||||
icon: 2,
|
||||
time: 1000,
|
||||
});
|
||||
}),
|
||||
(this.warning = function (msg) {
|
||||
layer.msg(msg, {
|
||||
icon: 3,
|
||||
time: 1000,
|
||||
});
|
||||
}),
|
||||
(this.success = function (msg, callback) {
|
||||
layer.msg(
|
||||
msg,
|
||||
{
|
||||
icon: 1,
|
||||
time: 1000,
|
||||
},
|
||||
callback,
|
||||
);
|
||||
}),
|
||||
(this.failure = function (msg, callback) {
|
||||
layer.msg(
|
||||
msg,
|
||||
{
|
||||
icon: 2,
|
||||
time: 1000,
|
||||
},
|
||||
callback,
|
||||
);
|
||||
}),
|
||||
(this.warming = function (msg, callback) {
|
||||
layer.msg(
|
||||
msg,
|
||||
{
|
||||
icon: 3,
|
||||
time: 1000,
|
||||
},
|
||||
callback,
|
||||
);
|
||||
});
|
||||
})();
|
||||
exports(MOD_NAME, popup);
|
||||
});
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,65 @@
|
||||
layui.define(["jquery", "element"], function (exports) {
|
||||
var $ = layui.jquery;
|
||||
var defer = $.Deferred();
|
||||
var fullScreen = new (function () {
|
||||
this.func = null;
|
||||
|
||||
this.onFullchange = function (func) {
|
||||
this.func = func;
|
||||
var evts = [
|
||||
"fullscreenchange",
|
||||
"webkitfullscreenchange",
|
||||
"mozfullscreenchange",
|
||||
"MSFullscreenChange",
|
||||
];
|
||||
for (var i = 0; i < evts.length && func; i++) {
|
||||
window.addEventListener(evts[i], this.func);
|
||||
}
|
||||
};
|
||||
|
||||
this.fullScreen = function (dom) {
|
||||
var docElm =
|
||||
(dom && document.querySelector(dom)) || document.documentElement;
|
||||
if (docElm.requestFullscreen) {
|
||||
docElm.requestFullscreen();
|
||||
} else if (docElm.mozRequestFullScreen) {
|
||||
docElm.mozRequestFullScreen();
|
||||
} else if (docElm.webkitRequestFullScreen) {
|
||||
docElm.webkitRequestFullScreen();
|
||||
} else if (docElm.msRequestFullscreen) {
|
||||
docElm.msRequestFullscreen();
|
||||
} else {
|
||||
defer.reject("");
|
||||
}
|
||||
defer.resolve("返回值");
|
||||
return defer.promise();
|
||||
};
|
||||
|
||||
this.fullClose = function () {
|
||||
if (this.isFullscreen()) {
|
||||
if (document.exitFullscreen) {
|
||||
document.exitFullscreen();
|
||||
} else if (document.mozCancelFullScreen) {
|
||||
document.mozCancelFullScreen();
|
||||
} else if (document.webkitCancelFullScreen) {
|
||||
document.webkitCancelFullScreen();
|
||||
} else if (document.msExitFullscreen) {
|
||||
document.msExitFullscreen();
|
||||
}
|
||||
}
|
||||
defer.resolve("返回值");
|
||||
return defer.promise();
|
||||
};
|
||||
|
||||
this.isFullscreen = function () {
|
||||
return (
|
||||
document.fullscreenElement ||
|
||||
document.msFullscreenElement ||
|
||||
document.mozFullScreenElement ||
|
||||
document.webkitFullscreenElement ||
|
||||
false
|
||||
);
|
||||
};
|
||||
})();
|
||||
exports("fullscreen", fullScreen);
|
||||
});
|
||||
@@ -0,0 +1,834 @@
|
||||
layui.define(["table", "jquery", "element"], function (exports) {
|
||||
"use strict";
|
||||
|
||||
var MOD_NAME = "menu",
|
||||
$ = layui.jquery,
|
||||
element = layui.element;
|
||||
|
||||
var menu = function (opt) {
|
||||
this.option = opt;
|
||||
};
|
||||
|
||||
menu.prototype.render = function (opt) {
|
||||
var option = {
|
||||
elem: opt.elem,
|
||||
async: opt.async || true,
|
||||
parseData: opt.parseData,
|
||||
url: opt.url,
|
||||
method: opt.method ? opt.method : "GET",
|
||||
defaultOpen: opt.defaultOpen,
|
||||
defaultSelect: opt.defaultSelect,
|
||||
control: opt.control,
|
||||
controlWidth: opt.controlWidth ? opt.controlWidth : "auto",
|
||||
defaultMenu: opt.defaultMenu || 0,
|
||||
accordion: opt.accordion,
|
||||
height: opt.height || "100%",
|
||||
theme: opt.theme || "dark-theme",
|
||||
data: opt.data ? opt.data : [],
|
||||
change: opt.change ? opt.change : function () {},
|
||||
done: opt.done ? opt.done : function () {},
|
||||
};
|
||||
|
||||
var tempDone = option.done;
|
||||
|
||||
option.done = function () {
|
||||
if (option.control) {
|
||||
rationalizeHeaderControlWidthAuto(option);
|
||||
}
|
||||
tempDone();
|
||||
};
|
||||
|
||||
if (option.async) {
|
||||
if (option.method === "GET") {
|
||||
getData(option.url).then(function (data) {
|
||||
option.data = data;
|
||||
renderMenu(option);
|
||||
});
|
||||
} else {
|
||||
postData(option.url).then(function (data) {
|
||||
option.data = data;
|
||||
renderMenu(option);
|
||||
});
|
||||
}
|
||||
} else {
|
||||
window.setTimeout(function () {
|
||||
renderMenu(option);
|
||||
}, 500);
|
||||
}
|
||||
|
||||
$("#" + opt.elem).height(option.height);
|
||||
|
||||
setTimeout(function () {
|
||||
$("#" + opt.control + " .control").on(
|
||||
"mousewheel DOMMouseScroll",
|
||||
function (event) {
|
||||
var delta =
|
||||
(event.originalEvent.wheelDelta &&
|
||||
(event.originalEvent.wheelDelta > 0 ? 1 : -1)) || // chrome & ie
|
||||
(event.originalEvent.detail &&
|
||||
(event.originalEvent.detail > 0 ? -1 : 1)); // firefox
|
||||
|
||||
if (delta > 0) {
|
||||
for (var num = 1; num < 20; num++) {
|
||||
setTimeout(function () {
|
||||
if (
|
||||
$("#" + opt.control + " .control ul")
|
||||
.css("left")
|
||||
.replace("px", "") < 0
|
||||
) {
|
||||
$("#" + opt.control + " .control ul").css("left", "+=2px");
|
||||
}
|
||||
}, 10);
|
||||
}
|
||||
} else if (delta < 0) {
|
||||
if (
|
||||
Number(
|
||||
$("#" + opt.control + " .control ul")
|
||||
.css("left")
|
||||
.replace("px", ""),
|
||||
) +
|
||||
($("#" + opt.control + " .control ul").width() -
|
||||
$("#" + opt.control + " .control").width()) >
|
||||
0
|
||||
) {
|
||||
for (var num = 1; num < 20; num++) {
|
||||
setTimeout(function () {
|
||||
$("#" + opt.control + " .control ul").css("left", "-=2px");
|
||||
}, 10);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
);
|
||||
}, 1000);
|
||||
|
||||
return new menu(option);
|
||||
};
|
||||
|
||||
menu.prototype.cache = function () {
|
||||
return this.option.data;
|
||||
};
|
||||
|
||||
menu.prototype.click = function (clickEvent) {
|
||||
var _this = this;
|
||||
$("body").on(
|
||||
"click",
|
||||
"#" + _this.option.elem + " .site-demo-active",
|
||||
function () {
|
||||
var dom = $(this);
|
||||
var data = {
|
||||
menuId: dom.attr("menu-id"),
|
||||
menuTitle: dom.attr("menu-title"),
|
||||
menuPath: dom.attr("menu-title"),
|
||||
menuIcon: dom.attr("menu-icon"),
|
||||
menuUrl: dom.attr("menu-url"),
|
||||
menuType: dom.attr("menu-type"),
|
||||
menuOpenType: dom.attr("menu-open-type"),
|
||||
};
|
||||
var doms = hash(dom);
|
||||
if (doms != null) {
|
||||
if (doms.text() != "") {
|
||||
data["menuPath"] =
|
||||
doms.find("span").text() + " / " + data["menuPath"];
|
||||
}
|
||||
}
|
||||
if (doms != null) {
|
||||
var domss = hash(doms);
|
||||
if (domss != null) {
|
||||
if (domss.text() != "") {
|
||||
data["menuPath"] =
|
||||
domss.find("span").text() + " / " + data["menuPath"];
|
||||
}
|
||||
}
|
||||
}
|
||||
if (domss != null) {
|
||||
var domsss = hash(domss);
|
||||
if (domsss != null) {
|
||||
if (domsss.text() != "") {
|
||||
data["menuPath"] =
|
||||
domsss.find("span").text() + " / " + data["menuPath"];
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($("#" + _this.option.elem).is(".pear-nav-mini")) {
|
||||
if (_this.option.accordion) {
|
||||
activeMenus = $(this).parent().parent().parent().children("a");
|
||||
} else {
|
||||
activeMenus.push($(this).parent().parent().parent().children("a"));
|
||||
}
|
||||
}
|
||||
clickEvent(dom, data);
|
||||
},
|
||||
);
|
||||
};
|
||||
|
||||
function hash(dom) {
|
||||
var d = dom.parent().parent().prev();
|
||||
if (d.prop("tagName") === "UL") {
|
||||
return null;
|
||||
}
|
||||
return d;
|
||||
}
|
||||
|
||||
menu.prototype.skin = function (skin) {
|
||||
var menu = $(
|
||||
".pear-nav-tree[lay-filter='" + this.option.elem + "']",
|
||||
).parent();
|
||||
menu.removeClass("dark-theme");
|
||||
menu.removeClass("light-theme");
|
||||
menu.addClass(skin);
|
||||
};
|
||||
|
||||
menu.prototype.selectItem = function (pearId) {
|
||||
if (this.option.control != false) {
|
||||
$("#" + this.option.elem + " a[menu-id='" + pearId + "']")
|
||||
.parents(".layui-side-scroll ")
|
||||
.find("ul")
|
||||
.css({
|
||||
display: "none",
|
||||
});
|
||||
$("#" + this.option.elem + " a[menu-id='" + pearId + "']")
|
||||
.parents(".layui-side-scroll ")
|
||||
.find(".layui-this")
|
||||
.removeClass("layui-this");
|
||||
$("#" + this.option.elem + " a[menu-id='" + pearId + "']")
|
||||
.parents("ul")
|
||||
.css({
|
||||
display: "block",
|
||||
});
|
||||
var controlId = $("#" + this.option.elem + " a[menu-id='" + pearId + "']")
|
||||
.parents("ul")
|
||||
.attr("pear-id");
|
||||
if (controlId != undefined) {
|
||||
$("#" + this.option.control)
|
||||
.find(".layui-this")
|
||||
.removeClass("layui-this");
|
||||
$("#" + this.option.control)
|
||||
.find("[pear-id='" + controlId + "']")
|
||||
.addClass("layui-this");
|
||||
}
|
||||
}
|
||||
|
||||
$("#" + this.option.elem + " a[menu-id='" + pearId + "']")
|
||||
.parents(".pear-nav-tree")
|
||||
.find(".layui-this")
|
||||
.removeClass("layui-this");
|
||||
if (!$("#" + this.option.elem).is(".pear-nav-mini")) {
|
||||
var openEle = null;
|
||||
var openEleHeight = 0;
|
||||
$(
|
||||
$("#" + this.option.elem + " a[menu-id='" + pearId + "']")
|
||||
.parents(".layui-nav-child")
|
||||
.get()
|
||||
.reverse(),
|
||||
).each(function () {
|
||||
if (!$(this).parent().is(".layui-nav-itemed")) {
|
||||
if (openEleHeight == 0) {
|
||||
openEle = $(this);
|
||||
} else {
|
||||
$(this).parent().addClass("layui-nav-itemed");
|
||||
$(this).css({
|
||||
height: "auto",
|
||||
});
|
||||
}
|
||||
openEleHeight += $(this).children("dd").length * 48;
|
||||
}
|
||||
});
|
||||
if (this.option.accordion) {
|
||||
if (openEleHeight > 0) {
|
||||
var currentDom = openEle
|
||||
.parent()
|
||||
.siblings(".layui-nav-itemed")
|
||||
.children(".layui-nav-child");
|
||||
currentDom.animate(
|
||||
{
|
||||
height: "0px",
|
||||
},
|
||||
240,
|
||||
function () {
|
||||
currentDom.css({
|
||||
height: "auto",
|
||||
});
|
||||
$(this).parent().removeClass("layui-nav-itemed");
|
||||
$(this).find(".layui-nav-itemed").removeClass("layui-nav-itemed");
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
if (openEleHeight > 0) {
|
||||
openEle.parent().addClass("layui-nav-itemed");
|
||||
openEle.height(0);
|
||||
openEle.animate(
|
||||
{
|
||||
height: openEleHeight + "px",
|
||||
},
|
||||
240,
|
||||
function () {
|
||||
$(this).css({ height: "auto" });
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
$("#" + this.option.elem + " a[menu-id='" + pearId + "']")
|
||||
.parent()
|
||||
.addClass("layui-this");
|
||||
};
|
||||
|
||||
var activeMenus;
|
||||
menu.prototype.collapse = function (time) {
|
||||
var elem = this.option.elem;
|
||||
var config = this.option;
|
||||
if ($("#" + this.option.elem).is(".pear-nav-mini")) {
|
||||
$.each(activeMenus, function (i, item) {
|
||||
$("#" + elem + " a[menu-id='" + $(this).attr("menu-id") + "']")
|
||||
.parent()
|
||||
.addClass("layui-nav-itemed");
|
||||
});
|
||||
$("#" + this.option.elem).removeClass("pear-nav-mini");
|
||||
$("#" + this.option.elem).animate(
|
||||
{
|
||||
width: "220px",
|
||||
},
|
||||
180,
|
||||
);
|
||||
isHoverMenu(false, config);
|
||||
var that = this;
|
||||
$("#" + this.option.elem)
|
||||
.promise()
|
||||
.done(function () {
|
||||
if (that.option.control) {
|
||||
rationalizeHeaderControlWidth(that.option);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
activeMenus = $("#" + this.option.elem).find(".layui-nav-itemed>a");
|
||||
$("#" + this.option.elem)
|
||||
.find(".layui-nav-itemed")
|
||||
.removeClass("layui-nav-itemed");
|
||||
$("#" + this.option.elem).addClass("pear-nav-mini");
|
||||
$("#" + this.option.elem).animate(
|
||||
{
|
||||
width: "60px",
|
||||
},
|
||||
400,
|
||||
);
|
||||
var that = this;
|
||||
$("#" + this.option.elem)
|
||||
.promise()
|
||||
.done(function () {
|
||||
isHoverMenu(true, config);
|
||||
if (that.option.control) {
|
||||
rationalizeHeaderControlWidth(that.option);
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
function getData(url) {
|
||||
var defer = $.Deferred();
|
||||
var symbol = url.indexOf("?") !== -1 ? "&" : "?";
|
||||
$.get(url + symbol + "fresh=" + Math.random(), function (result) {
|
||||
defer.resolve(result);
|
||||
});
|
||||
return defer.promise();
|
||||
}
|
||||
|
||||
function postData(url) {
|
||||
var defer = $.Deferred();
|
||||
var symbol = url.indexOf("?") !== -1 ? "&" : "?";
|
||||
$.post(
|
||||
url + symbol + "fresh=" + Math.random(),
|
||||
function (result) {
|
||||
defer.resolve(result);
|
||||
},
|
||||
"json",
|
||||
);
|
||||
return defer.promise();
|
||||
}
|
||||
|
||||
function renderMenu(option) {
|
||||
if (option.parseData != false) {
|
||||
option.parseData(option.data);
|
||||
}
|
||||
if (option.data.length > 0) {
|
||||
if (option.control != false) {
|
||||
createMenuAndControl(option);
|
||||
} else {
|
||||
createMenu(option);
|
||||
}
|
||||
}
|
||||
element.init();
|
||||
downShow(option);
|
||||
option.done();
|
||||
}
|
||||
|
||||
function createMenu(option) {
|
||||
var menuHtml =
|
||||
'<div style="height:100%!important;" class="pear-side-scroll layui-side-scroll ' +
|
||||
option.theme +
|
||||
'"><ul lay-filter="' +
|
||||
option.elem +
|
||||
'" class="layui-nav arrow pear-menu layui-nav-tree pear-nav-tree">';
|
||||
$.each(option.data, function (i, item) {
|
||||
var content = '<li class="layui-nav-item" >';
|
||||
if (i == option.defaultOpen) {
|
||||
content = '<li class="layui-nav-item layui-nav-itemed" >';
|
||||
}
|
||||
var href = "javascript:;";
|
||||
var target = "";
|
||||
var className = "site-demo-active";
|
||||
if (item.openType == "_blank" && item.type == 1) {
|
||||
href = item.href;
|
||||
target = "target='_blank'";
|
||||
className = "";
|
||||
}
|
||||
if (item.type == 0) {
|
||||
// 创 建 目 录 结 构
|
||||
content +=
|
||||
'<a href="javascript:;" menu-type="' +
|
||||
item.type +
|
||||
'" menu-id="' +
|
||||
item.id +
|
||||
'" href="' +
|
||||
href +
|
||||
'" ' +
|
||||
target +
|
||||
'><i class="' +
|
||||
item.icon +
|
||||
'"></i><span>' +
|
||||
item.title +
|
||||
"</span></a>";
|
||||
} else if (item.type == 1) {
|
||||
content +=
|
||||
'<a class="' +
|
||||
className +
|
||||
'" menu-type="' +
|
||||
item.type +
|
||||
'" menu-open-type="' +
|
||||
item.openType +
|
||||
'" menu-url="' +
|
||||
item.href +
|
||||
'" menu-id="' +
|
||||
item.id +
|
||||
'" menu-title="' +
|
||||
item.title +
|
||||
'" href="' +
|
||||
href +
|
||||
'" ' +
|
||||
target +
|
||||
'><i class="' +
|
||||
item.icon +
|
||||
'"></i><span>' +
|
||||
item.title +
|
||||
"</span></a>";
|
||||
}
|
||||
// 调 用 递 归 方 法 加 载 无 限 层 级 的 子 菜 单
|
||||
content += loadchild(item);
|
||||
// 结 束 一 个 根 菜 单 项
|
||||
content += "</li>";
|
||||
menuHtml += content;
|
||||
});
|
||||
// 结 束 菜 单 结 构 的 初 始 化
|
||||
menuHtml += "</ul></div>";
|
||||
// 将 菜 单 拼 接 到 初 始 化 容 器 中
|
||||
$("#" + option.elem).html(menuHtml);
|
||||
}
|
||||
|
||||
function createMenuAndControl(option) {
|
||||
var control =
|
||||
'<div style="width: ' +
|
||||
option.controlWidth +
|
||||
'px;white-space: nowrap;overflow-x: scroll;overflow: hidden;" class="control"><ul class="layui-nav pear-nav-control pc layui-hide-xs" style="width: fit-content;">';
|
||||
var controlPe = '<ul class="layui-nav pear-nav-control layui-hide-sm">';
|
||||
// 声 明 头 部
|
||||
var menu = '<div class="layui-side-scroll ' + option.theme + '">';
|
||||
// 开 启 同 步 操 作
|
||||
var index = 0;
|
||||
var controlItemPe = '<dl class="layui-nav-child">';
|
||||
$.each(option.data, function (i, item) {
|
||||
var menuItem = "";
|
||||
var controlItem = "";
|
||||
if (i === option.defaultMenu) {
|
||||
controlItem =
|
||||
'<li pear-href="' +
|
||||
item.href +
|
||||
'" pear-title="' +
|
||||
item.title +
|
||||
'" pear-id="' +
|
||||
item.id +
|
||||
'" class="layui-this layui-nav-item"><a href="#">' +
|
||||
item.title +
|
||||
"</a></li>";
|
||||
menuItem =
|
||||
'<ul pear-id="' +
|
||||
item.id +
|
||||
'" lay-filter="' +
|
||||
option.elem +
|
||||
'" class="layui-nav arrow layui-nav-tree pear-nav-tree">';
|
||||
|
||||
controlPe +=
|
||||
'<li class="layui-nav-item"><a class="pe-title" href="javascript:;" >' +
|
||||
item.title +
|
||||
"</a>";
|
||||
|
||||
controlItemPe +=
|
||||
'<dd pear-href="' +
|
||||
item.href +
|
||||
'" pear-title="' +
|
||||
item.title +
|
||||
'" pear-id="' +
|
||||
item.id +
|
||||
'"><a href="javascript:void(0);">' +
|
||||
item.title +
|
||||
"</a></dd>";
|
||||
} else {
|
||||
controlItem =
|
||||
'<li pear-href="' +
|
||||
item.href +
|
||||
'" pear-title="' +
|
||||
item.title +
|
||||
'" pear-id="' +
|
||||
item.id +
|
||||
'" class="layui-nav-item"><a href="#">' +
|
||||
item.title +
|
||||
"</a></li>";
|
||||
|
||||
menuItem =
|
||||
'<ul style="display:none" pear-id="' +
|
||||
item.id +
|
||||
'" lay-filter="' +
|
||||
option.elem +
|
||||
'" class="layui-nav arrow layui-nav-tree pear-nav-tree">';
|
||||
|
||||
controlItemPe +=
|
||||
'<dd pear-href="' +
|
||||
item.href +
|
||||
'" pear-title="' +
|
||||
item.title +
|
||||
'" pear-id="' +
|
||||
item.id +
|
||||
'"><a href="javascript:void(0);">' +
|
||||
item.title +
|
||||
"</a></dd>";
|
||||
}
|
||||
index++;
|
||||
$.each(item.children, function (i, note) {
|
||||
// 创 建 每 一 个 菜 单 项
|
||||
var content = '<li class="layui-nav-item" >';
|
||||
var href = "javascript:;";
|
||||
var target = "";
|
||||
var className = "site-demo-active";
|
||||
if (note.openType == "_blank" && note.type == 1) {
|
||||
href = note.href;
|
||||
target = "target='_blank'";
|
||||
className = "";
|
||||
}
|
||||
// 判 断 菜 单 类 型 0 是 不可跳转的目录 1 是 可 点 击 跳 转 的 菜 单
|
||||
if (note.type == 0) {
|
||||
// 创 建 目 录 结 构
|
||||
content +=
|
||||
'<a href="' +
|
||||
href +
|
||||
'" ' +
|
||||
target +
|
||||
' menu-type="' +
|
||||
note.type +
|
||||
'" menu-id="' +
|
||||
note.id +
|
||||
'" ><i class="' +
|
||||
note.icon +
|
||||
'"></i><span>' +
|
||||
note.title +
|
||||
"</span></a>";
|
||||
} else if (note.type == 1) {
|
||||
// 创 建 菜 单 结 构
|
||||
content +=
|
||||
"<a " +
|
||||
target +
|
||||
' class="' +
|
||||
className +
|
||||
'" menu-open-type="' +
|
||||
note.openType +
|
||||
'" menu-type="' +
|
||||
note.type +
|
||||
'" menu-url="' +
|
||||
note.href +
|
||||
'" menu-id="' +
|
||||
note.id +
|
||||
'" menu-title="' +
|
||||
note.title +
|
||||
'" href="' +
|
||||
href +
|
||||
'"><i class="' +
|
||||
note.icon +
|
||||
'"></i><span>' +
|
||||
note.title +
|
||||
"</span></a>";
|
||||
}
|
||||
content += loadchild(note);
|
||||
content += "</li>";
|
||||
menuItem += content;
|
||||
});
|
||||
menu += menuItem + "</ul>";
|
||||
control += controlItem;
|
||||
});
|
||||
controlItemPe += "</li></dl></ul>";
|
||||
controlPe += controlItemPe;
|
||||
$("#" + option.control).html(control + "</div>");
|
||||
$("#" + option.control).append(controlPe);
|
||||
$("#" + option.elem).html(menu);
|
||||
$("#" + option.control + " .pear-nav-control").on(
|
||||
"click",
|
||||
"[pear-id]",
|
||||
function () {
|
||||
$("#" + option.elem)
|
||||
.find(".pear-nav-tree")
|
||||
.css({
|
||||
display: "none",
|
||||
});
|
||||
$("#" + option.elem)
|
||||
.find(".pear-nav-tree[pear-id='" + $(this).attr("pear-id") + "']")
|
||||
.css({
|
||||
display: "block",
|
||||
});
|
||||
$("#" + option.control)
|
||||
.find(".pe-title")
|
||||
.html($(this).attr("pear-title"));
|
||||
$("#" + option.control).find("");
|
||||
option.change(
|
||||
$(this).attr("pear-id"),
|
||||
$(this).attr("pear-title"),
|
||||
$(this).attr("pear-href"),
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/** 加载子菜单 (递归)*/
|
||||
function loadchild(obj) {
|
||||
// 判 单 是 否 是 菜 单, 如 果 是 菜 单 直 接 返 回
|
||||
if (obj.type == 1) {
|
||||
return "";
|
||||
}
|
||||
// 创 建 子 菜 单 结 构
|
||||
var content = '<dl class="layui-nav-child">';
|
||||
// 如 果 嵌 套 不 等 于 空
|
||||
if (obj.children != null && obj.children.length > 0) {
|
||||
// 遍 历 子 项 目
|
||||
$.each(obj.children, function (i, note) {
|
||||
// 创 建 子 项 结 构
|
||||
content += "<dd>";
|
||||
var href = "javascript:;";
|
||||
var target = "";
|
||||
var className = "site-demo-active";
|
||||
if (note.openType == "_blank" && note.type == 1) {
|
||||
href = note.href;
|
||||
target = "target='_blank'";
|
||||
className = "";
|
||||
}
|
||||
// 判 断 子 项 类 型
|
||||
if (note.type == 0) {
|
||||
// 创 建 目 录 结 构
|
||||
content +=
|
||||
"<a " +
|
||||
target +
|
||||
' href="' +
|
||||
href +
|
||||
'" menu-type="' +
|
||||
note.type +
|
||||
'" menu-id="' +
|
||||
note.id +
|
||||
'"><i class="' +
|
||||
note.icon +
|
||||
'"></i><span>' +
|
||||
note.title +
|
||||
"</span></a>";
|
||||
} else if (note.type == 1) {
|
||||
// 创 建 菜 单 结 构
|
||||
content +=
|
||||
"<a " +
|
||||
target +
|
||||
' class="' +
|
||||
className +
|
||||
'" menu-open-type="' +
|
||||
note.openType +
|
||||
'" menu-type="' +
|
||||
note.type +
|
||||
'" menu-url="' +
|
||||
note.href +
|
||||
'" menu-id="' +
|
||||
note.id +
|
||||
'" menu-title="' +
|
||||
note.title +
|
||||
'" menu-icon="' +
|
||||
note.icon +
|
||||
'" href="' +
|
||||
href +
|
||||
'" ><i class="' +
|
||||
note.icon +
|
||||
'"></i><span>' +
|
||||
note.title +
|
||||
"</span></a>";
|
||||
}
|
||||
// 加 载 子 项 目 录
|
||||
content += loadchild(note);
|
||||
// 结 束 当 前 子 菜 单
|
||||
content += "</dd>";
|
||||
});
|
||||
// 封 装
|
||||
} else {
|
||||
content +=
|
||||
'<dd style="background-color: transparent!important;"><a style="background-color: transparent!important;margin-left: 26px">目录为空</a></dd>';
|
||||
}
|
||||
content += "</dl>";
|
||||
return content;
|
||||
}
|
||||
|
||||
function downShow(option) {
|
||||
$("body #" + option.elem).on("click", "a[menu-type='0']", function () {
|
||||
if (!$("#" + option.elem).is(".pear-nav-mini")) {
|
||||
var superEle = $(this).parent();
|
||||
var ele = $(this).next(".layui-nav-child");
|
||||
var heights = ele.children("dd").length * 48;
|
||||
|
||||
if ($(this).parent().is(".layui-nav-itemed")) {
|
||||
if (option.accordion) {
|
||||
var currentDom = $(this)
|
||||
.parent()
|
||||
.siblings(".layui-nav-itemed")
|
||||
.children(".layui-nav-child");
|
||||
currentDom.animate(
|
||||
{
|
||||
height: "0px",
|
||||
},
|
||||
240,
|
||||
function () {
|
||||
currentDom.css({
|
||||
height: "auto",
|
||||
});
|
||||
$(this).parent().removeClass("layui-nav-itemed");
|
||||
$(this)
|
||||
.find(".layui-nav-itemed")
|
||||
.removeClass("layui-nav-itemed");
|
||||
},
|
||||
);
|
||||
}
|
||||
ele.height(0);
|
||||
ele.animate(
|
||||
{
|
||||
height: heights + "px",
|
||||
},
|
||||
240,
|
||||
function () {
|
||||
ele.css({
|
||||
height: "auto",
|
||||
});
|
||||
},
|
||||
);
|
||||
} else {
|
||||
$(this).parent().addClass("layui-nav-itemed");
|
||||
ele.animate(
|
||||
{
|
||||
height: "0px",
|
||||
},
|
||||
240,
|
||||
function () {
|
||||
ele.css({
|
||||
height: "auto",
|
||||
});
|
||||
$(this).parent().removeClass("layui-nav-itemed");
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/** 二 级 悬 浮 菜 单*/
|
||||
function isHoverMenu(b, option) {
|
||||
if (b) {
|
||||
var navItem = "#" + option.elem + ".pear-nav-mini .layui-nav-item";
|
||||
var navChildDl = navItem + " .layui-nav-child>dl";
|
||||
var navChildDd = navItem + " .layui-nav-child>dd";
|
||||
|
||||
$(navItem + "," + navChildDd).mouseenter(function () {
|
||||
var _this = $(this);
|
||||
_this
|
||||
.siblings()
|
||||
.find(".layui-nav-child")
|
||||
.removeClass("layui-nav-hover")
|
||||
.css({
|
||||
left: 0,
|
||||
top: 0,
|
||||
});
|
||||
_this.children(".layui-nav-child").addClass("layui-nav-hover");
|
||||
var height = $(window).height();
|
||||
var topLength = _this.offset().top;
|
||||
var thisHeight = _this.children(".layui-nav-child").height();
|
||||
if (thisHeight + topLength > height) {
|
||||
topLength = height - thisHeight - 10;
|
||||
}
|
||||
var left = _this.offset().left + 60;
|
||||
if (!_this.hasClass("layui-nav-item")) {
|
||||
left = _this.offset().left + _this.width();
|
||||
}
|
||||
_this.children(".layui-nav-child").offset({
|
||||
top: topLength,
|
||||
left: left,
|
||||
});
|
||||
});
|
||||
|
||||
$(navItem + "," + navChildDl).mouseleave(function () {
|
||||
var _this = $(this);
|
||||
_this
|
||||
.closest(".layui-nav-item")
|
||||
.find(".layui-nav-child")
|
||||
.removeClass("layui-nav-hover")
|
||||
.css({
|
||||
left: 0,
|
||||
top: 0,
|
||||
});
|
||||
});
|
||||
} else {
|
||||
$("#" + option.elem + " .layui-nav-item")
|
||||
.off("mouseenter")
|
||||
.unbind("mouseleave");
|
||||
$("#" + option.elem + " dd")
|
||||
.off("mouseenter")
|
||||
.unbind("mouseleave");
|
||||
}
|
||||
}
|
||||
|
||||
function rationalizeHeaderControlWidth(option) {
|
||||
var $headerControl = $("#" + option.control);
|
||||
var $nextEl = $headerControl.next();
|
||||
var rationalizeWidth;
|
||||
if ($nextEl.length) {
|
||||
rationalizeWidth =
|
||||
$nextEl.position().left - $headerControl.position().left;
|
||||
} else {
|
||||
rationalizeWidth =
|
||||
$headerControl.parent().innerWidth() - $headerControl.position().left;
|
||||
}
|
||||
|
||||
if (option.controlWidth && rationalizeWidth >= option.controlWidth) {
|
||||
rationalizeWidth = option.controlWidth;
|
||||
}
|
||||
$("#" + option.control + " .control").css({
|
||||
width: rationalizeWidth,
|
||||
transition: "width .15s",
|
||||
});
|
||||
}
|
||||
|
||||
function rationalizeHeaderControlWidthAuto(option) {
|
||||
$(window).on("resize", function () {
|
||||
rationalizeHeaderControlWidth(option);
|
||||
});
|
||||
|
||||
$(document).ready(function () {
|
||||
rationalizeHeaderControlWidth(option);
|
||||
});
|
||||
}
|
||||
|
||||
exports(MOD_NAME, new menu());
|
||||
});
|
||||
@@ -0,0 +1,241 @@
|
||||
layui.define(["jquery", "tools"], function (exports) {
|
||||
"use strict";
|
||||
|
||||
/**
|
||||
* @since Pear Admin 4.0
|
||||
*
|
||||
* Button component
|
||||
* */
|
||||
var MOD_NAME = "menuSearch",
|
||||
tools = layui.tools,
|
||||
$ = layui.jquery;
|
||||
|
||||
var menuSearch = function (opt) {
|
||||
this.option = opt;
|
||||
};
|
||||
|
||||
/**
|
||||
* @since Pear Admin 4.0
|
||||
*
|
||||
* Button start loading
|
||||
* */
|
||||
menuSearch.prototype.render = function (opt) {
|
||||
var options = {
|
||||
select: opt.select,
|
||||
elem: opt.elem,
|
||||
dataProvider: opt.dataProvider,
|
||||
};
|
||||
|
||||
$("body").on("click", options.elem, function () {
|
||||
var _html = [
|
||||
`<div class="menu-search-content">
|
||||
<div class="layui-form menu-search-input-wrapper">
|
||||
<div class=" layui-input-wrap layui-input-wrap-prefix">
|
||||
<div class="layui-input-prefix">
|
||||
<i class="layui-icon layui-icon-search"></i>
|
||||
</div>
|
||||
<input type="text" name="menuSearch" value="" placeholder="搜索菜单" autocomplete="off" class="layui-input" lay-affix="clear">
|
||||
</div>
|
||||
</div>
|
||||
<div class="menu-search-no-data">暂 无 信 息</div>
|
||||
<ul class="menu-search-list">
|
||||
</ul>
|
||||
<div class="menu-search-tips">
|
||||
<div>
|
||||
<span class="mr-1">选择</span><kbd class="mr-1 w-5"> ↑ </kbd><kbd class="mr-5 w-5"> ↓ </kbd>
|
||||
<span class="mr-1">确定</span><kbd class="mr-5"> Enter </kbd><span class="mr-1">关闭</span><kbd class="mr-1"> Esc </kbd>
|
||||
</div>
|
||||
</div>
|
||||
</div>`,
|
||||
].join("");
|
||||
|
||||
layer.open({
|
||||
type: 1,
|
||||
offset: "10%",
|
||||
area: ["600px"],
|
||||
title: false,
|
||||
closeBtn: 0,
|
||||
shadeClose: true,
|
||||
anim: 0,
|
||||
move: false,
|
||||
content: _html,
|
||||
success: function (layero, layeridx) {
|
||||
var $layer = layero;
|
||||
var $content = $(layero).children(".layui-layer-content");
|
||||
var $input = $(".menu-search-input-wrapper input");
|
||||
var $noData = $(".menu-search-no-data");
|
||||
var $list = $(".menu-search-list");
|
||||
var menuData = options.dataProvider();
|
||||
|
||||
$layer.css("border-radius", "6px");
|
||||
$input.off("focus").focus();
|
||||
|
||||
// 搜索输入事件
|
||||
$input.off("input").on(
|
||||
"input",
|
||||
tools.debounce(function () {
|
||||
var keywords = $input.val().trim();
|
||||
var filteredMenus = filterHandle(menuData, keywords);
|
||||
|
||||
if (filteredMenus.length) {
|
||||
var tiledMenus = tiledHandle(filteredMenus);
|
||||
var listHtml = createList(tiledMenus);
|
||||
$noData.css("display", "none");
|
||||
$list
|
||||
.html("")
|
||||
.append(listHtml)
|
||||
.children(":first")
|
||||
.addClass("this");
|
||||
} else {
|
||||
$list.html("");
|
||||
$noData.css("display", "flex");
|
||||
}
|
||||
var currentHeight = $(".menu-search-content").outerHeight();
|
||||
$layer.css("height", currentHeight);
|
||||
$content.css("height", currentHeight);
|
||||
}, 500),
|
||||
);
|
||||
|
||||
// 列表点击事件
|
||||
$list.off("click").on("click", "li", function () {
|
||||
var id = $(this).attr("smenu-id");
|
||||
var title = $(this).attr("smenu-title");
|
||||
var url = $(this).attr("smenu-url");
|
||||
var type = $(this).attr("smenu-type");
|
||||
var openType = $(this).attr("smenu-open-type");
|
||||
|
||||
options.select({ id, title, url, type, openType });
|
||||
|
||||
layer.close(layeridx);
|
||||
});
|
||||
|
||||
$list
|
||||
.off("mouseenter")
|
||||
.on("mouseenter", "li", function () {
|
||||
$(".menu-search-list li.this").removeClass("this");
|
||||
$(this).addClass("this");
|
||||
})
|
||||
.off("mouseleave")
|
||||
.on("mouseleave", "li", function () {
|
||||
$(this).removeClass("this");
|
||||
});
|
||||
|
||||
// 监听键盘事件
|
||||
$(document)
|
||||
.off("keydown")
|
||||
.keydown(function (e) {
|
||||
if (e.keyCode === 13 || e.keyCode === 32) {
|
||||
e.preventDefault();
|
||||
var id = $(this).attr("smenu-id");
|
||||
var title = $(this).attr("smenu-title");
|
||||
var url = $(this).attr("smenu-url");
|
||||
var type = $(this).attr("smenu-type");
|
||||
var openType = $(this).attr("smenu-open-type");
|
||||
|
||||
options.select({ id, title, url, type, openType });
|
||||
|
||||
layer.close(layeridx);
|
||||
} else if (e.keyCode === 38) {
|
||||
e.preventDefault();
|
||||
var prevEl = $(".menu-search-list li.this").prev();
|
||||
$(".menu-search-list li.this").removeClass("this");
|
||||
if (prevEl.length !== 0) {
|
||||
prevEl.addClass("this");
|
||||
} else {
|
||||
$list.children().last().addClass("this");
|
||||
}
|
||||
} else if (e.keyCode === 40) {
|
||||
e.preventDefault();
|
||||
var nextEl = $(".menu-search-list li.this").next();
|
||||
$(".menu-search-list li.this").removeClass("this");
|
||||
if (nextEl.length !== 0) {
|
||||
nextEl.addClass("this");
|
||||
} else {
|
||||
$list.children().first().addClass("this");
|
||||
}
|
||||
} else if (e.keyCode === 27) {
|
||||
e.preventDefault();
|
||||
layer.close(layeridx);
|
||||
}
|
||||
});
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
return new menuSearch(options);
|
||||
};
|
||||
|
||||
/**
|
||||
* @since Pear Admin 4.0
|
||||
*
|
||||
* 创建结果列表
|
||||
*/
|
||||
var createList = function (data) {
|
||||
var listHtml = "";
|
||||
$.each(data, function (index, item) {
|
||||
listHtml += `<li smenu-open-type="${item.info.openType}" smenu-id="${item.info.id}" smenu-icon="'${item.info.icon}" smenu-url="${item.info.href}" smenu-title="${item.info.title}" smenu-type="${item.info.type}">
|
||||
<span><i style="margin-right:10px" class="${item.info.icon}"></i>${item.path}</span>
|
||||
<i class="layui-icon layui-icon-right"></i>
|
||||
</li>`;
|
||||
});
|
||||
return listHtml;
|
||||
};
|
||||
|
||||
/**
|
||||
* @since Pear Admin 4.0
|
||||
*
|
||||
* Tree 转 path 列表
|
||||
*/
|
||||
var tiledHandle = function (data) {
|
||||
var tiledMenus = [];
|
||||
var treeTiled = function (data, content) {
|
||||
var path = "";
|
||||
var separator = " / ";
|
||||
if (!content) content = "";
|
||||
$.each(data, function (index, item) {
|
||||
if (item.children && item.children.length) {
|
||||
path += content + item.title + separator;
|
||||
var childPath = treeTiled(item.children, path);
|
||||
path += childPath;
|
||||
if (!childPath) path = ""; // 重置路径
|
||||
} else {
|
||||
path += content + item.title;
|
||||
tiledMenus.push({ path: path, info: item });
|
||||
path = ""; //重置路径
|
||||
}
|
||||
});
|
||||
return path;
|
||||
};
|
||||
treeTiled(data);
|
||||
|
||||
return tiledMenus;
|
||||
};
|
||||
|
||||
/**
|
||||
* @since Pear Admin 4.0
|
||||
*
|
||||
* 查询匹配算法
|
||||
*/
|
||||
var filterHandle = function (filterData, val) {
|
||||
if (!val) return [];
|
||||
var filteredMenus = [];
|
||||
filterData = $.extend(true, {}, filterData);
|
||||
$.each(filterData, function (index, item) {
|
||||
if (item.children && item.children.length) {
|
||||
var children = filterHandle(item.children, val);
|
||||
var obj = $.extend({}, item, { children: children });
|
||||
if (children && children.length) {
|
||||
filteredMenus.push(obj);
|
||||
} else if (item.title.indexOf(val) >= 0) {
|
||||
item.children = []; // 父级匹配但子级不匹配,就去除子级
|
||||
filteredMenus.push($.extend({}, item));
|
||||
}
|
||||
} else if (item.title.indexOf(val) >= 0) {
|
||||
filteredMenus.push(item);
|
||||
}
|
||||
});
|
||||
return filteredMenus;
|
||||
};
|
||||
|
||||
exports(MOD_NAME, new menuSearch());
|
||||
});
|
||||
@@ -0,0 +1,103 @@
|
||||
layui.define(["table", "jquery", "element", "dropdown"], function (exports) {
|
||||
"use strict";
|
||||
|
||||
var MOD_NAME = "messageCenter",
|
||||
$ = layui.jquery,
|
||||
dropdown = layui.dropdown;
|
||||
|
||||
var message = function (opt) {
|
||||
this.option = opt;
|
||||
};
|
||||
|
||||
message.prototype.render = function (opt) {
|
||||
var option = {
|
||||
elem: opt.elem,
|
||||
url: opt.url ? opt.url : false,
|
||||
height: opt.height,
|
||||
data: opt.data,
|
||||
};
|
||||
if (option.url != false) {
|
||||
$.get(option.url, function (result) {
|
||||
const { code, success, data } = result;
|
||||
$(`${opt.elem}`).append(`<li class="layui-nav-item" lay-unselect="">
|
||||
<a href="#" class="notice layui-icon layui-icon-notice"></a>
|
||||
</li>`);
|
||||
if (code == 200 || success) {
|
||||
option.data = data;
|
||||
dropdown.render({
|
||||
elem: option.elem,
|
||||
align: "center",
|
||||
content: createHtml(option),
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
return new message(option);
|
||||
};
|
||||
|
||||
message.prototype.click = function (callback) {
|
||||
$("*[notice-id]").click(function (event) {
|
||||
event.preventDefault();
|
||||
var id = $(this).attr("notice-id");
|
||||
var title = $(this).attr("notice-title");
|
||||
var context = $(this).attr("notice-context");
|
||||
var form = $(this).attr("notice-form");
|
||||
callback(id, title, context, form);
|
||||
});
|
||||
};
|
||||
|
||||
function createHtml(option) {
|
||||
var count = 0;
|
||||
var notice =
|
||||
'<div class="pear-message-center"><div class="layui-tab layui-tab-brief">';
|
||||
var noticeTitle = '<ul class="layui-tab-title">';
|
||||
var noticeContent =
|
||||
'<div class="layui-tab-content" style="height:' +
|
||||
option.height +
|
||||
';overflow-x: hidden;padding:0px;">';
|
||||
|
||||
$.each(option.data, function (i, item) {
|
||||
noticeTitle += `<li class="${i === 0 ? "layui-this" : ""}">${
|
||||
item.title
|
||||
}</li>`;
|
||||
noticeContent += '<div class="layui-tab-item layui-show">';
|
||||
|
||||
$.each(item.children, function (i, note) {
|
||||
count++;
|
||||
noticeContent +=
|
||||
'<div class="message-item" notice-form="' +
|
||||
note.form +
|
||||
'" notice-context="' +
|
||||
note.context +
|
||||
'" notice-title="' +
|
||||
note.title +
|
||||
'" notice-id="' +
|
||||
note.id +
|
||||
'">';
|
||||
|
||||
noticeContent +=
|
||||
'<img src="' +
|
||||
note.avatar +
|
||||
'"/><div style="display:inline-block;">' +
|
||||
note.title +
|
||||
"</div>" +
|
||||
'<div class="extra">' +
|
||||
note.time +
|
||||
"</div>" +
|
||||
"</div>";
|
||||
});
|
||||
|
||||
noticeContent += "</div>";
|
||||
});
|
||||
|
||||
noticeTitle += "</ul>";
|
||||
noticeContent += "</div>";
|
||||
notice += noticeTitle;
|
||||
notice += noticeContent;
|
||||
notice += "</div></div>";
|
||||
|
||||
return notice;
|
||||
}
|
||||
|
||||
exports(MOD_NAME, new message());
|
||||
});
|
||||
@@ -0,0 +1,138 @@
|
||||
layui.define(["jquery", "element"], function (exports) {
|
||||
"use strict";
|
||||
|
||||
var $ = layui.jquery;
|
||||
var element = layui.element;
|
||||
|
||||
var page = function (opt) {
|
||||
this.option = opt;
|
||||
};
|
||||
|
||||
/**
|
||||
* @since Pear Admin 4.0
|
||||
*
|
||||
* 创建 Page 页面
|
||||
*/
|
||||
page.prototype.render = function (opt) {
|
||||
var option = {
|
||||
elem: opt.elem,
|
||||
url: opt.url,
|
||||
width: opt.width || "100%",
|
||||
height: opt.height || "100%",
|
||||
title: opt.title,
|
||||
};
|
||||
renderContent(option);
|
||||
return new page(option);
|
||||
};
|
||||
|
||||
/**
|
||||
* @since Pear Admin 4.0
|
||||
*
|
||||
* 切换 Page 页面
|
||||
*/
|
||||
page.prototype.changePage = function (options) {
|
||||
const $frame = $(`#${this.option.elem} .pear-page-content`);
|
||||
|
||||
if (options.type === "_iframe") {
|
||||
$frame.html(
|
||||
`<iframe src='${options.href}' scrolling='auto' frameborder='0' allowfullscreen='true'></iframe>`,
|
||||
);
|
||||
} else {
|
||||
$.ajax({
|
||||
url: options.href,
|
||||
type: "get",
|
||||
dataType: "html",
|
||||
success: function (data) {
|
||||
$frame.html(data);
|
||||
},
|
||||
error: function (xhr) {
|
||||
return layer.msg(
|
||||
"Status:" + xhr.status + "," + xhr.statusText + ",请稍后再试!",
|
||||
);
|
||||
},
|
||||
});
|
||||
}
|
||||
$frame.attr("type", options.type);
|
||||
$frame.attr("href", options.href);
|
||||
};
|
||||
|
||||
page.prototype.refresh = function (loading) {
|
||||
var $frameLoad = $(`#${this.option.elem} .pear-page-loading`);
|
||||
var $frame = $(`#${this.option.elem} .pear-page-content`);
|
||||
|
||||
if (loading) {
|
||||
$frameLoad.css({
|
||||
display: "block",
|
||||
});
|
||||
}
|
||||
|
||||
if ($frame.attr("type") === "_iframe") {
|
||||
$frame.html(
|
||||
`<iframe src='${$frame.attr(
|
||||
"href",
|
||||
)}' scrolling='auto' frameborder='0' allowfullscreen='true'></iframe>`,
|
||||
);
|
||||
|
||||
const $contentFrame = $frame.find("iframe");
|
||||
|
||||
$contentFrame.on("load", () => {
|
||||
$frameLoad.fadeOut(1000);
|
||||
});
|
||||
} else {
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: $frame.attr("href"),
|
||||
dataType: "html",
|
||||
success: function (data) {
|
||||
$frame.html(data);
|
||||
$frameLoad.fadeOut(1000);
|
||||
element.init();
|
||||
},
|
||||
error: function (xhr) {
|
||||
return layer.msg(
|
||||
"Status:" + xhr.status + "," + xhr.statusText + ",请稍后再试!",
|
||||
);
|
||||
},
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
function renderContent(option) {
|
||||
$("#" + option.elem).html(`
|
||||
<div class='pear-page'>
|
||||
<div class='pear-page-content' type='${option.type}' href='${option.url}'></div>
|
||||
<div class="pear-page-loading">
|
||||
<div class="ball-loader">
|
||||
<span></span>
|
||||
<span></span>
|
||||
<span></span>
|
||||
<span></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>`);
|
||||
|
||||
var $frame = $("#" + option.elem).find(".pear-page-content");
|
||||
|
||||
if (option.type === "_iframe") {
|
||||
$frame.html(
|
||||
`<iframe src='${option.url}' scrolling='auto' frameborder='0' allowfullscreen='true'></iframe>`,
|
||||
);
|
||||
} else {
|
||||
$.ajax({
|
||||
url: option.url,
|
||||
type: "get",
|
||||
dataType: "html",
|
||||
success: function (data) {
|
||||
$frame.html(data);
|
||||
},
|
||||
error: function (xhr) {
|
||||
return layer.msg(
|
||||
"Status:" + xhr.status + "," + xhr.statusText + ",请稍后再试!",
|
||||
);
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
exports("page", new page());
|
||||
});
|
||||
@@ -0,0 +1,797 @@
|
||||
layui.define(["jquery", "element", "dropdown"], function (exports) {
|
||||
"use strict";
|
||||
|
||||
var MOD_NAME = "tabPage",
|
||||
$ = layui.jquery,
|
||||
dropdown = layui.dropdown,
|
||||
element = layui.element;
|
||||
|
||||
var tabPage = function (opt) {
|
||||
this.option = opt;
|
||||
};
|
||||
|
||||
var tabData = new Array();
|
||||
var tabDataCurrent = 0;
|
||||
var contextTabDOM;
|
||||
|
||||
tabPage.prototype.render = function (opt) {
|
||||
var option = {
|
||||
elem: opt.elem,
|
||||
data: opt.data,
|
||||
index: opt.index,
|
||||
tool: opt.tool || true,
|
||||
roll: opt.roll || true,
|
||||
success: opt.success ? opt.success : function (id) {},
|
||||
session: opt.session ? opt.session : false,
|
||||
preload: opt.preload ? opt.preload : false,
|
||||
height: opt.height || "100%",
|
||||
width: opt.width || "100%",
|
||||
closeEvent: opt.closeEvent,
|
||||
tabMax: opt.tabMax,
|
||||
};
|
||||
|
||||
if (option.session) {
|
||||
if (sessionStorage.getItem(option.elem + "-pear-tab-page-data") != null) {
|
||||
tabData = JSON.parse(
|
||||
sessionStorage.getItem(option.elem + "-pear-tab-page-data"),
|
||||
);
|
||||
option.data = JSON.parse(
|
||||
sessionStorage.getItem(option.elem + "-pear-tab-page-data"),
|
||||
);
|
||||
tabDataCurrent = sessionStorage.getItem(
|
||||
option.elem + "-pear-tab-page-data-current",
|
||||
);
|
||||
tabData.forEach(function (item, index) {
|
||||
if (item.id == tabDataCurrent) {
|
||||
option.index = index;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
tabData = opt.data;
|
||||
}
|
||||
}
|
||||
|
||||
var lastIndex;
|
||||
var tab = createTab(option);
|
||||
$("#" + option.elem).html(tab);
|
||||
$(".layui-tab[lay-filter='" + option.elem + "'] .layui-tab-prev").click(
|
||||
function () {
|
||||
rollPage("left", option);
|
||||
},
|
||||
);
|
||||
$(".layui-tab[lay-filter='" + option.elem + "'] .layui-tab-next").click(
|
||||
function () {
|
||||
rollPage("right", option);
|
||||
},
|
||||
);
|
||||
element.init();
|
||||
|
||||
$("#" + option.elem).width(opt.width);
|
||||
$("#" + option.elem).height(opt.height);
|
||||
$("#" + option.elem).css({
|
||||
position: "relative",
|
||||
});
|
||||
closeEvent(option);
|
||||
|
||||
option.success(
|
||||
sessionStorage.getItem(option.elem + "-pear-tab-page-data-current"),
|
||||
);
|
||||
|
||||
dropdown.render({
|
||||
elem: `#${option.elem} .layui-icon-down`,
|
||||
trigger: "hover",
|
||||
data: [
|
||||
{
|
||||
title: "关 闭 当 前",
|
||||
id: 1,
|
||||
},
|
||||
{
|
||||
title: "关 闭 其 他",
|
||||
id: 2,
|
||||
},
|
||||
{
|
||||
title: "关 闭 全 部",
|
||||
id: 3,
|
||||
},
|
||||
],
|
||||
click: function (obj) {
|
||||
const id = obj.id;
|
||||
|
||||
if (id === 1) {
|
||||
var currentTab = $(
|
||||
".layui-tab[lay-filter='" +
|
||||
option.elem +
|
||||
"'] .layui-tab-title .layui-this",
|
||||
);
|
||||
if (currentTab.find("span").is(".able-close")) {
|
||||
var currentId = currentTab.attr("lay-id");
|
||||
tabDelete(option.elem, currentId, option.closeEvent, option);
|
||||
} else {
|
||||
layer.msg("当前页面不允许关闭", {
|
||||
icon: 3,
|
||||
time: 1000,
|
||||
});
|
||||
}
|
||||
} else if (id === 2) {
|
||||
var currentId = $(
|
||||
".layui-tab[lay-filter='" +
|
||||
option.elem +
|
||||
"'] .layui-tab-title .layui-this",
|
||||
).attr("lay-id");
|
||||
var tabtitle = $(
|
||||
".layui-tab[lay-filter='" + option.elem + "'] .layui-tab-title li",
|
||||
);
|
||||
$.each(tabtitle, function (i) {
|
||||
if ($(this).attr("lay-id") != currentId) {
|
||||
if ($(this).find("span").is(".able-close")) {
|
||||
tabDelete(
|
||||
option.elem,
|
||||
$(this).attr("lay-id"),
|
||||
option.closeEvent,
|
||||
option,
|
||||
);
|
||||
}
|
||||
}
|
||||
});
|
||||
} else {
|
||||
var currentId = $(
|
||||
".layui-tab[lay-filter='" +
|
||||
option.elem +
|
||||
"'] .layui-tab-title .layui-this",
|
||||
).attr("lay-id");
|
||||
var tabtitle = $(
|
||||
".layui-tab[lay-filter='" + option.elem + "'] .layui-tab-title li",
|
||||
);
|
||||
$.each(tabtitle, function (i) {
|
||||
if ($(this).find("span").is(".able-close")) {
|
||||
tabDelete(
|
||||
option.elem,
|
||||
$(this).attr("lay-id"),
|
||||
option.closeEvent,
|
||||
option,
|
||||
);
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
$("body .layui-tab[lay-filter='" + option.elem + "'] .layui-tab-title").on(
|
||||
"contextmenu",
|
||||
"li",
|
||||
function (e) {
|
||||
var top = e.clientY;
|
||||
var left = e.clientX;
|
||||
var menuWidth = 100;
|
||||
var currentId = $(this).attr("lay-id");
|
||||
var menu = `<ul>
|
||||
<li class='item' id='${option.elem}closeThis'>关闭当前</li>
|
||||
<li class='item' id='${option.elem}closeOther'>关闭其他</li>
|
||||
<li class='item' id='${option.elem}closeAll'>关闭所有</li>
|
||||
</ul>`;
|
||||
|
||||
contextTabDOM = $(this);
|
||||
var isOutsideBounds = left + menuWidth > $(window).width();
|
||||
if (isOutsideBounds) {
|
||||
left = $(window).width() - menuWidth;
|
||||
}
|
||||
|
||||
layer.open({
|
||||
type: 1,
|
||||
title: false,
|
||||
shade: false,
|
||||
skin: "pear-tab-page-menu",
|
||||
closeBtn: false,
|
||||
area: [menuWidth + "px", "108px"],
|
||||
fixed: true,
|
||||
anim: false,
|
||||
isOutAnim: false,
|
||||
offset: [top, left],
|
||||
content: menu,
|
||||
success: function (layero, index) {
|
||||
layer.close(lastIndex);
|
||||
lastIndex = index;
|
||||
menuEvent(option, index);
|
||||
var timer;
|
||||
$(layero).on("mouseout", function () {
|
||||
timer = setTimeout(function () {
|
||||
layer.close(index);
|
||||
}, 30);
|
||||
});
|
||||
|
||||
$(layero).on("mouseover", function () {
|
||||
clearTimeout(timer);
|
||||
});
|
||||
|
||||
$(layero).on("contextmenu", function () {
|
||||
return false;
|
||||
});
|
||||
},
|
||||
});
|
||||
return false;
|
||||
},
|
||||
);
|
||||
|
||||
mousewheelAndTouchmoveHandler(option);
|
||||
return new tabPage(option);
|
||||
};
|
||||
|
||||
tabPage.prototype.click = function (callback) {
|
||||
var option = this.option;
|
||||
var elem = this.option.elem;
|
||||
element.on("tab(" + this.option.elem + ")", function (data) {
|
||||
var id = $("#" + elem + " .layui-tab-title .layui-this").attr("lay-id");
|
||||
sessionStorage.setItem(option.elem + "-pear-tab-page-data-current", id);
|
||||
callback(id);
|
||||
});
|
||||
};
|
||||
|
||||
tabPage.prototype.positionTab = function () {
|
||||
var $tabTitle = $(
|
||||
".layui-tab[lay-filter=" + this.option.elem + "] .layui-tab-title",
|
||||
);
|
||||
var autoLeft = 0;
|
||||
$tabTitle.children("li").each(function () {
|
||||
if ($(this).hasClass("layui-this")) {
|
||||
return false;
|
||||
} else {
|
||||
autoLeft += $(this).outerWidth();
|
||||
}
|
||||
});
|
||||
$tabTitle.animate(
|
||||
{
|
||||
scrollLeft: autoLeft - $tabTitle.width() / 3,
|
||||
},
|
||||
200,
|
||||
);
|
||||
};
|
||||
|
||||
tabPage.prototype.clear = function () {
|
||||
sessionStorage.removeItem(this.option.elem + "-pear-tab-page-data");
|
||||
sessionStorage.removeItem(this.option.elem + "-pear-tab-page-data-current");
|
||||
};
|
||||
|
||||
var index = 0;
|
||||
// 根据过滤 fliter 标识, 重置选项卡标题
|
||||
tabPage.prototype.changeTabTitleById = function (elem, id, title) {
|
||||
var currentTab = $(
|
||||
".layui-tab[lay-filter='" +
|
||||
elem +
|
||||
"'] .layui-tab-title [lay-id='" +
|
||||
id +
|
||||
"'] .title",
|
||||
);
|
||||
currentTab.html(title);
|
||||
};
|
||||
|
||||
// 根据过滤 filter 标识, 删除指定选项卡
|
||||
tabPage.prototype.delTabByElem = function (elem, id, callback) {
|
||||
var currentTab = $(
|
||||
".layui-tab[lay-filter='" +
|
||||
elem +
|
||||
"'] .layui-tab-title [lay-id='" +
|
||||
id +
|
||||
"']",
|
||||
);
|
||||
if (currentTab.find("span").is(".able-close")) {
|
||||
tabDelete(elem, id, callback);
|
||||
}
|
||||
};
|
||||
// 根据过滤 filter 标识, 删除其他选项卡
|
||||
tabPage.prototype.delOtherTabByElem = function (elem, callback) {
|
||||
var currentId = $(
|
||||
".layui-tab[lay-filter='" + elem + "'] .layui-tab-title .layui-this",
|
||||
).attr("lay-id");
|
||||
var tabtitle = $(
|
||||
".layui-tab[lay-filter='" + elem + "'] .layui-tab-title li",
|
||||
);
|
||||
$.each(tabtitle, function (i) {
|
||||
if ($(this).attr("lay-id") != currentId) {
|
||||
if ($(this).find("span").is(".able-close")) {
|
||||
tabDelete(elem, $(this).attr("lay-id"), callback);
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
// 根据过滤 filter 标识, 删除全部选项卡
|
||||
tabPage.prototype.delAllTabByElem = function (elem, callback) {
|
||||
var currentId = $(
|
||||
".layui-tab[lay-filter='" + elem + "'] .layui-tab-title .layui-this",
|
||||
).attr("lay-id");
|
||||
var tabtitle = $(
|
||||
".layui-tab[lay-filter='" + elem + "'] .layui-tab-title li",
|
||||
);
|
||||
$.each(tabtitle, function (i) {
|
||||
if ($(this).find("span").is(".able-close")) {
|
||||
tabDelete(elem, $(this).attr("lay-id"), callback);
|
||||
}
|
||||
});
|
||||
};
|
||||
// 根据过滤 filter 标识, 删除当前选项卡
|
||||
tabPage.prototype.delCurrentTabByElem = function (elem, callback) {
|
||||
var currentTab = $(
|
||||
".layui-tab[lay-filter='" + elem + "'] .layui-tab-title .layui-this",
|
||||
);
|
||||
if (currentTab.find("span").is(".able-close")) {
|
||||
var currentId = currentTab.attr("lay-id");
|
||||
tabDelete(elem, currentId, callback);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* @since Pear Admin 4.0
|
||||
*/
|
||||
tabPage.prototype.addTabOnly = function (opt, time) {
|
||||
var title = `<span class="pear-tab-page-active"></span>
|
||||
<span class="${opt.close ? "able-close" : "disable-close"} title">${
|
||||
opt.title
|
||||
}</span>
|
||||
<i class="layui-icon layui-unselect layui-tab-close">ဆ</i>`;
|
||||
|
||||
if (
|
||||
$(
|
||||
".layui-tab[lay-filter='" +
|
||||
this.option.elem +
|
||||
"'] .layui-tab-title li[lay-id]",
|
||||
).length <= 0
|
||||
) {
|
||||
var that = this;
|
||||
|
||||
if (opt.type === "_iframe") {
|
||||
element.tabAdd(this.option.elem, {
|
||||
id: opt.id,
|
||||
title: title,
|
||||
content: `<iframe id="${opt.id}" type="${opt.type}" data-frameid="${opt.id}" scrolling="auto" frameborder="0" src="${opt.url}" style="width:100%;height:100%;" allowfullscreen="true"></iframe>`,
|
||||
});
|
||||
} else {
|
||||
$.ajax({
|
||||
url: opt.url,
|
||||
type: "get",
|
||||
dataType: "html",
|
||||
async: false,
|
||||
success: function (data) {
|
||||
element.tabAdd(that.option.elem, {
|
||||
id: opt.id,
|
||||
title: title,
|
||||
content: `<div id="${opt.id}" type="${opt.type}" data-frameid="${opt.id}" src="${opt.url}">${data}</div>`,
|
||||
});
|
||||
},
|
||||
error: function (xhr, textstatus, thrown) {
|
||||
return layer.msg(
|
||||
"Status:" + xhr.status + "," + xhr.statusText + ",请稍后再试!",
|
||||
);
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
tabData.push(opt);
|
||||
sessionStorage.setItem(
|
||||
that.option.elem + "-pear-tab-page-data",
|
||||
JSON.stringify(tabData),
|
||||
);
|
||||
sessionStorage.setItem(
|
||||
that.option.elem + "-pear-tab-page-data-current",
|
||||
opt.id,
|
||||
);
|
||||
} else {
|
||||
var isData = false;
|
||||
$.each(
|
||||
$(
|
||||
".layui-tab[lay-filter='" +
|
||||
this.option.elem +
|
||||
"'] .layui-tab-title li[lay-id]",
|
||||
),
|
||||
function () {
|
||||
if ($(this).attr("lay-id") == opt.id) {
|
||||
isData = true;
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
if (isData == false) {
|
||||
if (this.option.tabMax != false) {
|
||||
if (
|
||||
$(
|
||||
".layui-tab[lay-filter='" +
|
||||
this.option.elem +
|
||||
"'] .layui-tab-title li[lay-id]",
|
||||
).length >= this.option.tabMax
|
||||
) {
|
||||
layer.msg("最多打开" + this.option.tabMax + "个标签页", {
|
||||
icon: 2,
|
||||
time: 1000,
|
||||
shift: 6,
|
||||
});
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
var that = this;
|
||||
if (opt.type === "_iframe") {
|
||||
element.tabAdd(this.option.elem, {
|
||||
id: opt.id,
|
||||
title: title,
|
||||
content: `<iframe id="${opt.id}" type="${opt.type}" data-frameid="${opt.id}" scrolling="auto" frameborder="0" src="${opt.url}" style="width:100%;height:100%;" allowfullscreen="true"></iframe>`,
|
||||
});
|
||||
} else {
|
||||
$.ajax({
|
||||
url: opt.url,
|
||||
type: "get",
|
||||
dataType: "html",
|
||||
async: false,
|
||||
success: function (data) {
|
||||
element.tabAdd(that.option.elem, {
|
||||
id: opt.id,
|
||||
title: title,
|
||||
content: `<div id="${opt.id}" type="${opt.type}" data-frameid="${opt.id}" src="${opt.url}">${data}</div>`,
|
||||
});
|
||||
},
|
||||
error: function (xhr, textstatus, thrown) {
|
||||
return layer.msg(
|
||||
"Status:" +
|
||||
xhr.status +
|
||||
"," +
|
||||
xhr.statusText +
|
||||
",请稍后再试!",
|
||||
);
|
||||
},
|
||||
});
|
||||
}
|
||||
tabData.push(opt);
|
||||
sessionStorage.setItem(
|
||||
that.option.elem + "-pear-tab-page-data",
|
||||
JSON.stringify(tabData),
|
||||
);
|
||||
sessionStorage.setItem(
|
||||
that.option.elem + "-pear-tab-page-data-current",
|
||||
opt.id,
|
||||
);
|
||||
}
|
||||
}
|
||||
element.tabChange(this.option.elem, opt.id);
|
||||
sessionStorage.setItem(
|
||||
this.option.elem + "-pear-tab-page-data-current",
|
||||
opt.id,
|
||||
);
|
||||
};
|
||||
|
||||
// 刷 新 指 定 的 选 项 卡
|
||||
tabPage.prototype.refresh = function (time) {
|
||||
var $iframe = $(
|
||||
".layui-tab[lay-filter='" +
|
||||
this.option.elem +
|
||||
"'] .layui-tab-content .layui-show > *",
|
||||
);
|
||||
var $iframeLoad;
|
||||
|
||||
if (time != false && time != 0) {
|
||||
$iframe
|
||||
.parent()
|
||||
.append(
|
||||
`<div id="pear-tab-page-loading${index}" class="pear-tab-page-loading"><div class="ball-loader"><span></span><span></span><span></span><span></span></div></div>`,
|
||||
);
|
||||
$iframeLoad = $("#" + this.option.elem).find(
|
||||
"#pear-tab-page-loading" + index++,
|
||||
);
|
||||
$iframeLoad.css({
|
||||
display: "block",
|
||||
});
|
||||
}
|
||||
|
||||
if ($iframe.attr("type") === "_iframe") {
|
||||
$iframe.attr("src", $iframe.attr("src"));
|
||||
$iframe.on("load", function () {
|
||||
$iframeLoad.fadeOut(1000, function () {
|
||||
$iframeLoad.remove();
|
||||
});
|
||||
});
|
||||
} else {
|
||||
$.ajax({
|
||||
url: $iframe.attr("src"),
|
||||
type: "get",
|
||||
dataType: "html",
|
||||
success: function (data) {
|
||||
$iframe.html(data);
|
||||
if ($iframeLoad != undefined) {
|
||||
$iframeLoad.fadeOut(1000, function () {
|
||||
$iframeLoad.remove();
|
||||
});
|
||||
}
|
||||
},
|
||||
error: function (xhr) {
|
||||
return layer.msg(
|
||||
"Status:" + xhr.status + "," + xhr.statusText + ",请稍后再试!",
|
||||
);
|
||||
},
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
function tabDelete(elem, id, callback, option) {
|
||||
var tabTitle = $(".layui-tab[lay-filter='" + elem + "']").find(
|
||||
".layui-tab-title",
|
||||
);
|
||||
var removeTab = tabTitle.find("li[lay-id='" + id + "']");
|
||||
var nextNode = removeTab.next("li");
|
||||
if (!removeTab.hasClass("layui-this")) {
|
||||
removeTab.remove();
|
||||
var tabContent = $(".layui-tab[lay-filter='" + elem + "']")
|
||||
.find("*[id='" + id + "']")
|
||||
.parent();
|
||||
tabContent.remove();
|
||||
|
||||
tabData = JSON.parse(
|
||||
sessionStorage.getItem(elem + "-pear-tab-page-data"),
|
||||
);
|
||||
tabDataCurrent = sessionStorage.getItem(
|
||||
elem + "-pear-tab-page-data-current",
|
||||
);
|
||||
tabData = tabData.filter(function (item) {
|
||||
return item.id != id;
|
||||
});
|
||||
sessionStorage.setItem(
|
||||
elem + "-pear-tab-page-data",
|
||||
JSON.stringify(tabData),
|
||||
);
|
||||
return false;
|
||||
}
|
||||
|
||||
var currId;
|
||||
if (nextNode.length) {
|
||||
nextNode.addClass("layui-this");
|
||||
currId = nextNode.attr("lay-id");
|
||||
$("#" + elem + " [id='" + currId + "']")
|
||||
.parent()
|
||||
.addClass("layui-show");
|
||||
} else {
|
||||
var prevNode = removeTab.prev("li");
|
||||
prevNode.addClass("layui-this");
|
||||
currId = prevNode.attr("lay-id");
|
||||
$("#" + elem + " [id='" + currId + "']")
|
||||
.parent()
|
||||
.addClass("layui-show");
|
||||
}
|
||||
callback(currId);
|
||||
tabData = JSON.parse(sessionStorage.getItem(elem + "-pear-tab-page-data"));
|
||||
tabDataCurrent = sessionStorage.getItem(
|
||||
elem + "-pear-tab-page-data-current",
|
||||
);
|
||||
tabData = tabData.filter(function (item) {
|
||||
return item.id != id;
|
||||
});
|
||||
sessionStorage.setItem(
|
||||
elem + "-pear-tab-page-data",
|
||||
JSON.stringify(tabData),
|
||||
);
|
||||
sessionStorage.setItem(elem + "-pear-tab-page-data-current", currId);
|
||||
|
||||
removeTab.remove();
|
||||
// 删除 content
|
||||
var tabContent = $(".layui-tab[lay-filter='" + elem + "']")
|
||||
.find("*[id='" + id + "']")
|
||||
.parent();
|
||||
// 删除
|
||||
tabContent.remove();
|
||||
}
|
||||
|
||||
/**
|
||||
* @since Pear Admin 4.0
|
||||
*/
|
||||
function createTab(option) {
|
||||
var type = "";
|
||||
var types = option.type + " ";
|
||||
if (option.roll == true) {
|
||||
type = "layui-tab-roll";
|
||||
}
|
||||
if (option.tool != false) {
|
||||
type = "layui-tab-tool";
|
||||
}
|
||||
if (option.roll == true && option.tool != false) {
|
||||
type = "layui-tab-rollTool";
|
||||
}
|
||||
var tab =
|
||||
'<div class="pear-tab-page ' +
|
||||
types +
|
||||
type +
|
||||
' layui-tab" lay-filter="' +
|
||||
option.elem +
|
||||
'" lay-allowClose="true">';
|
||||
|
||||
var title = '<ul class="layui-tab-title">';
|
||||
var content = '<div class="layui-tab-content">';
|
||||
var control = `<div class="layui-tab-control">
|
||||
<li class="layui-tab-prev layui-icon layui-icon-left"></li>
|
||||
<li class="layui-tab-next layui-icon layui-icon-right"></li>
|
||||
<li class="layui-tab-tool layui-icon layui-icon-down"></li>
|
||||
</div>`;
|
||||
|
||||
// 处 理 选 项 卡 头 部
|
||||
var index = 0;
|
||||
$.each(option.data, function (i, item) {
|
||||
var titleItem = `<li lay-id="${item.id}" class="${
|
||||
option.index == index ? "layui-this" : ""
|
||||
}">
|
||||
<span class="pear-tab-page-active"></span>
|
||||
<span class="${item.close ? "able-close" : "disable-close"} title">
|
||||
${item.title}
|
||||
</span>
|
||||
<i class="layui-icon layui-unselect layui-tab-close">ဆ</i></li>
|
||||
</li>`;
|
||||
|
||||
title += titleItem;
|
||||
|
||||
if (item.type === "_iframe") {
|
||||
content += `<div class="${
|
||||
option.index == index ? "layui-show" : ""
|
||||
} layui-tab-item"><iframe id="${item.id}" type="${
|
||||
item.type
|
||||
}" data-frameid="${item.id}" scrolling="auto" frameborder="0" src="${
|
||||
item.url
|
||||
}" style="width:100%;height:100%;" allowfullscreen="true"></iframe></div>`;
|
||||
} else {
|
||||
$.ajax({
|
||||
url: item.url,
|
||||
type: "get",
|
||||
dataType: "html",
|
||||
async: false,
|
||||
success: function (data) {
|
||||
content += `<div class="${
|
||||
option.index == index ? "layui-show" : ""
|
||||
} layui-tab-item"><div id="${item.id}" type="${
|
||||
item.type
|
||||
}" data-frameid="${item.id}" src="${
|
||||
item.url
|
||||
}">${data}</div></div>`;
|
||||
},
|
||||
error: function (xhr) {
|
||||
return layer.msg(
|
||||
"Status:" + xhr.status + "," + xhr.statusText + ",请稍后再试!",
|
||||
);
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
index++;
|
||||
});
|
||||
|
||||
title += "</ul>";
|
||||
content += "</div>";
|
||||
|
||||
tab += title;
|
||||
tab += control;
|
||||
tab += content;
|
||||
tab += "</div>";
|
||||
tab += "";
|
||||
return tab;
|
||||
}
|
||||
|
||||
function rollPage(d, option) {
|
||||
var $tabTitle = $("#" + option.elem + " .layui-tab-title");
|
||||
var left = $tabTitle.scrollLeft();
|
||||
if ("left" === d) {
|
||||
$tabTitle.animate(
|
||||
{
|
||||
scrollLeft: left - 450,
|
||||
},
|
||||
200,
|
||||
);
|
||||
} else {
|
||||
$tabTitle.animate(
|
||||
{
|
||||
scrollLeft: left + 450,
|
||||
},
|
||||
200,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
function closeEvent(option) {
|
||||
$(".layui-tab[lay-filter='" + option.elem + "']").on(
|
||||
"click",
|
||||
".layui-tab-close",
|
||||
function () {
|
||||
var layid = $(this).parent().attr("lay-id");
|
||||
tabDelete(option.elem, layid, option.closeEvent, option);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
function menuEvent(option, index) {
|
||||
$("#" + option.elem + "closeThis").click(function () {
|
||||
var currentTab = contextTabDOM;
|
||||
|
||||
if (currentTab.find("span").is(".able-close")) {
|
||||
var currentId = currentTab.attr("lay-id");
|
||||
tabDelete(option.elem, currentId, option.closeEvent, option);
|
||||
} else {
|
||||
layer.msg("当前页面不允许关闭", {
|
||||
icon: 3,
|
||||
time: 800,
|
||||
});
|
||||
}
|
||||
layer.close(index);
|
||||
});
|
||||
|
||||
$("#" + option.elem + "closeOther").click(function () {
|
||||
var currentId = contextTabDOM.attr("lay-id");
|
||||
var tabtitle = $(
|
||||
".layui-tab[lay-filter='" + option.elem + "'] .layui-tab-title li",
|
||||
);
|
||||
$.each(tabtitle, function (i) {
|
||||
if ($(this).attr("lay-id") != currentId) {
|
||||
if ($(this).find("span").is(".able-close")) {
|
||||
tabDelete(
|
||||
option.elem,
|
||||
$(this).attr("lay-id"),
|
||||
option.closeEvent,
|
||||
option,
|
||||
);
|
||||
}
|
||||
}
|
||||
});
|
||||
layer.close(index);
|
||||
});
|
||||
|
||||
$("#" + option.elem + "closeAll").click(function () {
|
||||
var tabtitle = $(
|
||||
".layui-tab[lay-filter='" + option.elem + "'] .layui-tab-title li",
|
||||
);
|
||||
$.each(tabtitle, function (i) {
|
||||
if ($(this).find("span").is(".able-close")) {
|
||||
tabDelete(
|
||||
option.elem,
|
||||
$(this).attr("lay-id"),
|
||||
option.closeEvent,
|
||||
option,
|
||||
);
|
||||
}
|
||||
});
|
||||
layer.close(index);
|
||||
});
|
||||
}
|
||||
|
||||
function mousewheelAndTouchmoveHandler(option) {
|
||||
var $bodyTab = $(
|
||||
"body .layui-tab[lay-filter='" + option.elem + "'] .layui-tab-title",
|
||||
);
|
||||
var $tabTitle = $("#" + option.elem + " .layui-tab-title");
|
||||
var mouseScrollStep = 100;
|
||||
// 鼠标滚轮
|
||||
$bodyTab.on("mousewheel DOMMouseScroll", function (e) {
|
||||
e.originalEvent.preventDefault();
|
||||
var delta =
|
||||
(e.originalEvent.wheelDelta &&
|
||||
(e.originalEvent.wheelDelta > 0 ? "top" : "down")) || // chrome & ie
|
||||
(e.originalEvent.detail &&
|
||||
(e.originalEvent.detail > 0 ? "down" : "top")); // firefox
|
||||
var scrollLeft = $tabTitle.scrollLeft();
|
||||
|
||||
if (delta === "top") {
|
||||
scrollLeft -= mouseScrollStep;
|
||||
} else if (delta === "down") {
|
||||
scrollLeft += mouseScrollStep;
|
||||
}
|
||||
$tabTitle.scrollLeft(scrollLeft);
|
||||
});
|
||||
|
||||
// 触摸移动
|
||||
var touchX = 0;
|
||||
$bodyTab.on("touchstart", function (e) {
|
||||
var touch = e.originalEvent.targetTouches[0];
|
||||
touchX = touch.pageX;
|
||||
});
|
||||
$bodyTab.on("touchmove", function (e) {
|
||||
var event = e.originalEvent;
|
||||
if (event.targetTouches.length > 1) return;
|
||||
event.preventDefault();
|
||||
var touch = event.targetTouches[0];
|
||||
var distanceX = touchX - touch.pageX;
|
||||
var scrollLeft = $tabTitle.scrollLeft();
|
||||
touchX = touch.pageX;
|
||||
$tabTitle.scrollLeft((scrollLeft += distanceX));
|
||||
});
|
||||
}
|
||||
|
||||
exports(MOD_NAME, new tabPage());
|
||||
});
|
||||
@@ -0,0 +1,25 @@
|
||||
layui.define(["jquery", "element"], function (exports) {
|
||||
var $ = layui.jquery;
|
||||
var tools = new (function () {
|
||||
/**
|
||||
* @since 防抖算法
|
||||
*
|
||||
* @param fn 要执行的方法
|
||||
* @param time 防抖时间参数
|
||||
*/
|
||||
this.debounce = function (fn, time) {
|
||||
var timer = null;
|
||||
return function () {
|
||||
var arguments = arguments[0];
|
||||
if (timer) {
|
||||
clearTimeout(timer);
|
||||
}
|
||||
timer = setTimeout(function () {
|
||||
fn(arguments);
|
||||
}, time);
|
||||
};
|
||||
};
|
||||
})();
|
||||
|
||||
exports("tools", tools);
|
||||
});
|
||||
@@ -0,0 +1,30 @@
|
||||
window.rootPath = (function (src) {
|
||||
src = document.currentScript
|
||||
? document.currentScript.src
|
||||
: document.scripts[document.scripts.length - 1].src;
|
||||
return src.substring(0, src.lastIndexOf("/") + 1);
|
||||
})();
|
||||
|
||||
layui
|
||||
.config({
|
||||
base: rootPath + "module/",
|
||||
version: "4.0.0-alpha.1",
|
||||
})
|
||||
.extend({
|
||||
admin: "admin",
|
||||
page: "page",
|
||||
tabPage: "tabPage",
|
||||
menu: "menu",
|
||||
fullscreen: "fullscreen",
|
||||
messageCenter: "messageCenter",
|
||||
menuSearch: "menuSearch",
|
||||
button: "button",
|
||||
popup: "extends/popup",
|
||||
count: "extends/count",
|
||||
toast: "extends/toast",
|
||||
nprogress: "extends/nprogress",
|
||||
echarts: "extends/echarts",
|
||||
echartsTheme: "extends/echartsTheme",
|
||||
yaml: "extends/yaml",
|
||||
})
|
||||
.use([], function () {});
|
||||
Reference in New Issue
Block a user