Browse Source

优化页面

seimin 1 year ago
parent
commit
037304671a

+ 1 - 0
index.html

@@ -4,6 +4,7 @@
4 4
     <meta charset="utf-8" />
5 5
     <link rel="stylesheet" href="./static/css/iconfont.css" />
6 6
     <link rel="stylesheet" href="./static/css/fontnew/iconfont.css" />
7
+    <link rel="stylesheet" href="./static/css/newicon/iconfont.css" />
7 8
     <script src="./static/js/JQ-3.3.1.js"></script>
8 9
     <meta
9 10
       name="viewport"

BIN
src/assets/icon/filter.png


+ 73 - 26
src/views/IncidentNewList.vue

@@ -2,13 +2,18 @@
2 2
   <div class="bgColor">
3 3
     <div slot="content" class="scroll-wrapper">
4 4
       <div class="demo">
5
-        <div class="header">事件列表</div>
6
-        <div class="stateSearchWrap">
5
+        <div class="header">
6
+          <div class="header_left">
7
+            <div class="tab" :class="{active: tab.id == tabTypeIdActive}" v-for="tab in tabTypes" :key="tab.id" @click="typeChange(tab)">{{tab.text}}({{ tab.num }})</div>
8
+          </div>
9
+          <div class="header_right"><div class="filter" @click="showDrawer()"><img src="../assets/icon/filter.png" alt=""></div></div>
10
+        </div>
11
+        <!-- <div class="stateSearchWrap">
7 12
           <div class="stateSearch" @click="typeChange(tab)" v-for="tab in tabTypes" :key="tab.id" :class="{active: tabTypeIdActive == tab.id}">
8 13
             {{ tab.text }}({{ tab.num }})
9 14
             <div class="filter" v-if="tab.id == 2" @click.stop="showDrawer()" :class="{active: tabTypeIdActive == tab.id}"><i class="dash dash-shaixuan"></i></div>
10 15
           </div>
11
-        </div>
16
+        </div> -->
12 17
         <div class="scroll-list-wrap">
13 18
           <cube-scroll
14 19
             ref="scroll"
@@ -26,8 +31,8 @@
26 31
               >
27 32
                 <div class="head">
28 33
                   <p>
29
-                    <i class="iconfont icon-zuixinbaoxiu newPapir"></i>
30
-                    事件编号:{{ item.incidentsign }}
34
+                    <i class="iconfont icon-baoxiuliebiao newPapir"></i>
35
+                    {{ item.incidentsign }}
31 36
                     <span
32 37
                       :class="{
33 38
                         btn: true,
@@ -90,7 +95,7 @@
90 95
                     {{ item.acceptDate | timeFormat("MM-dd HH:mm") }}
91 96
                   </span>
92 97
                 </div>
93
-                <div class="bottom" @click.stop>
98
+                <div class="bottom borderBottomNone" @click.stop>
94 99
                   <span style="width:70%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;">
95 100
                     <template v-if="item.contactsInformation">
96 101
                       联系电话:
@@ -936,23 +941,26 @@ export default {
936 941
 }
937 942
 .btns{
938 943
   display: flex;
939
-  justify-content: space-between
944
+  justify-content: space-between;
945
+  padding: 0 0.1rem 0.2rem 0.1rem;
940 946
   .sub-btn {
941
-    margin:0 2px;
947
+    margin:0 0.1rem;
942 948
     flex:1;
943 949
     background: #ececec;
944 950
     .cube-btn {
945 951
       background-color: #005395 !important;
946
-      border-radius: 8px
952
+      border-radius: 0.08rem;
953
+      height: 0.75rem;
954
+      padding: 0;
955
+      font-size: 0.28rem;
947 956
     }
948 957
   }
949 958
 }
950 959
 .scroll-list-wrap {
951
-  height: calc(100vh - 2.72rem);
960
+  height: 95vh;
952 961
   border-radius: 5px;
953 962
   transform: rotate(0deg); // fix 子元素超出边框圆角部分不隐藏的问题
954 963
   overflow: hidden;
955
-  padding-top: 1.76rem;
956 964
 }
957 965
 
958 966
 .foods-wrapper {
@@ -1053,24 +1061,59 @@ export default {
1053 1061
 }
1054 1062
 </style>
1055 1063
 <style lang="less" scoped>
1056
-.cont {
1057
-  margin-top: 1.86rem;
1064
+.header{
1065
+  height: 0.9rem;
1066
+  display: flex;
1067
+  align-items: center;
1068
+  justify-content: space-between;
1069
+  box-shadow: 0px 3px 6px 1px rgba(0,0,0,0.16);
1070
+  margin-bottom: 0.16rem;
1058 1071
 }
1059
-.scroll-list-wrap {
1060
-  padding-top: 1.76rem;
1072
+.header .header_left{
1073
+  display: flex;
1074
+  align-items: center;
1075
+  font-size: 0.3rem;
1061 1076
 }
1062
-.header {
1063
-  width: 100%;
1064
-  height: 0.88rem;
1065
-  line-height: 0.88rem;
1066
-  text-align: center;
1067
-  color: #fff;
1068
-  font-size: 0.37rem;
1069
-  background: linear-gradient(#2e2f32, #414246);
1070
-  position: fixed;
1071
-  top: 0;
1072
-  z-index: 6;
1077
+.header .header_left .tab{
1078
+  width: 2rem;
1079
+  height: 0.44rem;
1080
+  display: flex;
1081
+  justify-content: center;
1082
+  align-items: center;
1083
+}
1084
+.header .header_left .tab:first-of-type{
1085
+  border-right: 1px solid #515151;
1086
+}
1087
+.header .header_left .tab.active{
1088
+  font-weight: bold;
1089
+  position: relative;
1090
+}
1091
+.header .header_left .tab.active::after{
1092
+  content: "";
1093
+  position: absolute;
1094
+  left: 50%;
1095
+  bottom: -0.1rem;
1096
+  transform: translateX(-50%);
1097
+  width: 0.65rem;
1098
+  height: 0.1rem;
1099
+  background-color: #305D97;
1100
+  border-radius: 0.06rem;
1101
+}
1102
+.header .header_right{
1103
+  display: flex;
1104
+  align-items: center;
1105
+  font-size: 0.26rem;
1106
+  height: 100%;
1107
+  padding: 0 0.2rem 0 0.4rem;
1108
+}
1109
+.header img{
1110
+  width: 0.36rem;
1111
+  height: 0.36rem;
1112
+}
1113
+.cont {
1114
+  margin-top: 1.86rem;
1073 1115
 }
1116
+
1074 1117
 .stateSearchWrap{
1075 1118
   width: 100%;
1076 1119
   position: fixed;
@@ -1242,6 +1285,7 @@ export default {
1242 1285
       color: #333333;
1243 1286
       border-bottom: 0.01rem solid #e6e6e6;
1244 1287
       padding: 0.24rem 0.48rem;
1288
+      font-size: 0.28rem;
1245 1289
       p {
1246 1290
         &.desc {
1247 1291
           overflow: hidden;
@@ -1263,6 +1307,9 @@ export default {
1263 1307
       font-size: 0.24rem;
1264 1308
       color: #999;
1265 1309
       padding: 0 0.24rem 0 0.48rem;
1310
+      &.borderBottomNone{
1311
+        border-bottom: none;
1312
+      }
1266 1313
     }
1267 1314
   }
1268 1315
 }

+ 1 - 1
src/views/Main.vue

@@ -13,7 +13,7 @@
13 13
                 <span>事件</span>
14 14
             </router-link>
15 15
              <router-link to="/main/inspection" class="link" active-class="active">
16
-                <i class="iconfont icon-shouyexian"></i>
16
+                <i class="newicon newicon-shebeixunjian"></i>
17 17
                 <span>巡检</span>
18 18
             </router-link>
19 19
             <router-link to="/main/my" class="link" active-class="active">

+ 539 - 0
static/css/newicon/demo.css

@@ -0,0 +1,539 @@
1
+/* Logo 字体 */
2
+@font-face {
3
+  font-family: "iconfont logo";
4
+  src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834');
5
+  src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834#iefix') format('embedded-opentype'),
6
+    url('https://at.alicdn.com/t/font_985780_km7mi63cihi.woff?t=1545807318834') format('woff'),
7
+    url('https://at.alicdn.com/t/font_985780_km7mi63cihi.ttf?t=1545807318834') format('truetype'),
8
+    url('https://at.alicdn.com/t/font_985780_km7mi63cihi.svg?t=1545807318834#iconfont') format('svg');
9
+}
10
+
11
+.logo {
12
+  font-family: "iconfont logo";
13
+  font-size: 160px;
14
+  font-style: normal;
15
+  -webkit-font-smoothing: antialiased;
16
+  -moz-osx-font-smoothing: grayscale;
17
+}
18
+
19
+/* tabs */
20
+.nav-tabs {
21
+  position: relative;
22
+}
23
+
24
+.nav-tabs .nav-more {
25
+  position: absolute;
26
+  right: 0;
27
+  bottom: 0;
28
+  height: 42px;
29
+  line-height: 42px;
30
+  color: #666;
31
+}
32
+
33
+#tabs {
34
+  border-bottom: 1px solid #eee;
35
+}
36
+
37
+#tabs li {
38
+  cursor: pointer;
39
+  width: 100px;
40
+  height: 40px;
41
+  line-height: 40px;
42
+  text-align: center;
43
+  font-size: 16px;
44
+  border-bottom: 2px solid transparent;
45
+  position: relative;
46
+  z-index: 1;
47
+  margin-bottom: -1px;
48
+  color: #666;
49
+}
50
+
51
+
52
+#tabs .active {
53
+  border-bottom-color: #f00;
54
+  color: #222;
55
+}
56
+
57
+.tab-container .content {
58
+  display: none;
59
+}
60
+
61
+/* 页面布局 */
62
+.main {
63
+  padding: 30px 100px;
64
+  width: 960px;
65
+  margin: 0 auto;
66
+}
67
+
68
+.main .logo {
69
+  color: #333;
70
+  text-align: left;
71
+  margin-bottom: 30px;
72
+  line-height: 1;
73
+  height: 110px;
74
+  margin-top: -50px;
75
+  overflow: hidden;
76
+  *zoom: 1;
77
+}
78
+
79
+.main .logo a {
80
+  font-size: 160px;
81
+  color: #333;
82
+}
83
+
84
+.helps {
85
+  margin-top: 40px;
86
+}
87
+
88
+.helps pre {
89
+  padding: 20px;
90
+  margin: 10px 0;
91
+  border: solid 1px #e7e1cd;
92
+  background-color: #fffdef;
93
+  overflow: auto;
94
+}
95
+
96
+.icon_lists {
97
+  width: 100% !important;
98
+  overflow: hidden;
99
+  *zoom: 1;
100
+}
101
+
102
+.icon_lists li {
103
+  width: 100px;
104
+  margin-bottom: 10px;
105
+  margin-right: 20px;
106
+  text-align: center;
107
+  list-style: none !important;
108
+  cursor: default;
109
+}
110
+
111
+.icon_lists li .code-name {
112
+  line-height: 1.2;
113
+}
114
+
115
+.icon_lists .icon {
116
+  display: block;
117
+  height: 100px;
118
+  line-height: 100px;
119
+  font-size: 42px;
120
+  margin: 10px auto;
121
+  color: #333;
122
+  -webkit-transition: font-size 0.25s linear, width 0.25s linear;
123
+  -moz-transition: font-size 0.25s linear, width 0.25s linear;
124
+  transition: font-size 0.25s linear, width 0.25s linear;
125
+}
126
+
127
+.icon_lists .icon:hover {
128
+  font-size: 100px;
129
+}
130
+
131
+.icon_lists .svg-icon {
132
+  /* 通过设置 font-size 来改变图标大小 */
133
+  width: 1em;
134
+  /* 图标和文字相邻时,垂直对齐 */
135
+  vertical-align: -0.15em;
136
+  /* 通过设置 color 来改变 SVG 的颜色/fill */
137
+  fill: currentColor;
138
+  /* path 和 stroke 溢出 viewBox 部分在 IE 下会显示
139
+      normalize.css 中也包含这行 */
140
+  overflow: hidden;
141
+}
142
+
143
+.icon_lists li .name,
144
+.icon_lists li .code-name {
145
+  color: #666;
146
+}
147
+
148
+/* markdown 样式 */
149
+.markdown {
150
+  color: #666;
151
+  font-size: 14px;
152
+  line-height: 1.8;
153
+}
154
+
155
+.highlight {
156
+  line-height: 1.5;
157
+}
158
+
159
+.markdown img {
160
+  vertical-align: middle;
161
+  max-width: 100%;
162
+}
163
+
164
+.markdown h1 {
165
+  color: #404040;
166
+  font-weight: 500;
167
+  line-height: 40px;
168
+  margin-bottom: 24px;
169
+}
170
+
171
+.markdown h2,
172
+.markdown h3,
173
+.markdown h4,
174
+.markdown h5,
175
+.markdown h6 {
176
+  color: #404040;
177
+  margin: 1.6em 0 0.6em 0;
178
+  font-weight: 500;
179
+  clear: both;
180
+}
181
+
182
+.markdown h1 {
183
+  font-size: 28px;
184
+}
185
+
186
+.markdown h2 {
187
+  font-size: 22px;
188
+}
189
+
190
+.markdown h3 {
191
+  font-size: 16px;
192
+}
193
+
194
+.markdown h4 {
195
+  font-size: 14px;
196
+}
197
+
198
+.markdown h5 {
199
+  font-size: 12px;
200
+}
201
+
202
+.markdown h6 {
203
+  font-size: 12px;
204
+}
205
+
206
+.markdown hr {
207
+  height: 1px;
208
+  border: 0;
209
+  background: #e9e9e9;
210
+  margin: 16px 0;
211
+  clear: both;
212
+}
213
+
214
+.markdown p {
215
+  margin: 1em 0;
216
+}
217
+
218
+.markdown>p,
219
+.markdown>blockquote,
220
+.markdown>.highlight,
221
+.markdown>ol,
222
+.markdown>ul {
223
+  width: 80%;
224
+}
225
+
226
+.markdown ul>li {
227
+  list-style: circle;
228
+}
229
+
230
+.markdown>ul li,
231
+.markdown blockquote ul>li {
232
+  margin-left: 20px;
233
+  padding-left: 4px;
234
+}
235
+
236
+.markdown>ul li p,
237
+.markdown>ol li p {
238
+  margin: 0.6em 0;
239
+}
240
+
241
+.markdown ol>li {
242
+  list-style: decimal;
243
+}
244
+
245
+.markdown>ol li,
246
+.markdown blockquote ol>li {
247
+  margin-left: 20px;
248
+  padding-left: 4px;
249
+}
250
+
251
+.markdown code {
252
+  margin: 0 3px;
253
+  padding: 0 5px;
254
+  background: #eee;
255
+  border-radius: 3px;
256
+}
257
+
258
+.markdown strong,
259
+.markdown b {
260
+  font-weight: 600;
261
+}
262
+
263
+.markdown>table {
264
+  border-collapse: collapse;
265
+  border-spacing: 0px;
266
+  empty-cells: show;
267
+  border: 1px solid #e9e9e9;
268
+  width: 95%;
269
+  margin-bottom: 24px;
270
+}
271
+
272
+.markdown>table th {
273
+  white-space: nowrap;
274
+  color: #333;
275
+  font-weight: 600;
276
+}
277
+
278
+.markdown>table th,
279
+.markdown>table td {
280
+  border: 1px solid #e9e9e9;
281
+  padding: 8px 16px;
282
+  text-align: left;
283
+}
284
+
285
+.markdown>table th {
286
+  background: #F7F7F7;
287
+}
288
+
289
+.markdown blockquote {
290
+  font-size: 90%;
291
+  color: #999;
292
+  border-left: 4px solid #e9e9e9;
293
+  padding-left: 0.8em;
294
+  margin: 1em 0;
295
+}
296
+
297
+.markdown blockquote p {
298
+  margin: 0;
299
+}
300
+
301
+.markdown .anchor {
302
+  opacity: 0;
303
+  transition: opacity 0.3s ease;
304
+  margin-left: 8px;
305
+}
306
+
307
+.markdown .waiting {
308
+  color: #ccc;
309
+}
310
+
311
+.markdown h1:hover .anchor,
312
+.markdown h2:hover .anchor,
313
+.markdown h3:hover .anchor,
314
+.markdown h4:hover .anchor,
315
+.markdown h5:hover .anchor,
316
+.markdown h6:hover .anchor {
317
+  opacity: 1;
318
+  display: inline-block;
319
+}
320
+
321
+.markdown>br,
322
+.markdown>p>br {
323
+  clear: both;
324
+}
325
+
326
+
327
+.hljs {
328
+  display: block;
329
+  background: white;
330
+  padding: 0.5em;
331
+  color: #333333;
332
+  overflow-x: auto;
333
+}
334
+
335
+.hljs-comment,
336
+.hljs-meta {
337
+  color: #969896;
338
+}
339
+
340
+.hljs-string,
341
+.hljs-variable,
342
+.hljs-template-variable,
343
+.hljs-strong,
344
+.hljs-emphasis,
345
+.hljs-quote {
346
+  color: #df5000;
347
+}
348
+
349
+.hljs-keyword,
350
+.hljs-selector-tag,
351
+.hljs-type {
352
+  color: #a71d5d;
353
+}
354
+
355
+.hljs-literal,
356
+.hljs-symbol,
357
+.hljs-bullet,
358
+.hljs-attribute {
359
+  color: #0086b3;
360
+}
361
+
362
+.hljs-section,
363
+.hljs-name {
364
+  color: #63a35c;
365
+}
366
+
367
+.hljs-tag {
368
+  color: #333333;
369
+}
370
+
371
+.hljs-title,
372
+.hljs-attr,
373
+.hljs-selector-id,
374
+.hljs-selector-class,
375
+.hljs-selector-attr,
376
+.hljs-selector-pseudo {
377
+  color: #795da3;
378
+}
379
+
380
+.hljs-addition {
381
+  color: #55a532;
382
+  background-color: #eaffea;
383
+}
384
+
385
+.hljs-deletion {
386
+  color: #bd2c00;
387
+  background-color: #ffecec;
388
+}
389
+
390
+.hljs-link {
391
+  text-decoration: underline;
392
+}
393
+
394
+/* 代码高亮 */
395
+/* PrismJS 1.15.0
396
+https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javascript */
397
+/**
398
+ * prism.js default theme for JavaScript, CSS and HTML
399
+ * Based on dabblet (http://dabblet.com)
400
+ * @author Lea Verou
401
+ */
402
+code[class*="language-"],
403
+pre[class*="language-"] {
404
+  color: black;
405
+  background: none;
406
+  text-shadow: 0 1px white;
407
+  font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
408
+  text-align: left;
409
+  white-space: pre;
410
+  word-spacing: normal;
411
+  word-break: normal;
412
+  word-wrap: normal;
413
+  line-height: 1.5;
414
+
415
+  -moz-tab-size: 4;
416
+  -o-tab-size: 4;
417
+  tab-size: 4;
418
+
419
+  -webkit-hyphens: none;
420
+  -moz-hyphens: none;
421
+  -ms-hyphens: none;
422
+  hyphens: none;
423
+}
424
+
425
+pre[class*="language-"]::-moz-selection,
426
+pre[class*="language-"] ::-moz-selection,
427
+code[class*="language-"]::-moz-selection,
428
+code[class*="language-"] ::-moz-selection {
429
+  text-shadow: none;
430
+  background: #b3d4fc;
431
+}
432
+
433
+pre[class*="language-"]::selection,
434
+pre[class*="language-"] ::selection,
435
+code[class*="language-"]::selection,
436
+code[class*="language-"] ::selection {
437
+  text-shadow: none;
438
+  background: #b3d4fc;
439
+}
440
+
441
+@media print {
442
+
443
+  code[class*="language-"],
444
+  pre[class*="language-"] {
445
+    text-shadow: none;
446
+  }
447
+}
448
+
449
+/* Code blocks */
450
+pre[class*="language-"] {
451
+  padding: 1em;
452
+  margin: .5em 0;
453
+  overflow: auto;
454
+}
455
+
456
+:not(pre)>code[class*="language-"],
457
+pre[class*="language-"] {
458
+  background: #f5f2f0;
459
+}
460
+
461
+/* Inline code */
462
+:not(pre)>code[class*="language-"] {
463
+  padding: .1em;
464
+  border-radius: .3em;
465
+  white-space: normal;
466
+}
467
+
468
+.token.comment,
469
+.token.prolog,
470
+.token.doctype,
471
+.token.cdata {
472
+  color: slategray;
473
+}
474
+
475
+.token.punctuation {
476
+  color: #999;
477
+}
478
+
479
+.namespace {
480
+  opacity: .7;
481
+}
482
+
483
+.token.property,
484
+.token.tag,
485
+.token.boolean,
486
+.token.number,
487
+.token.constant,
488
+.token.symbol,
489
+.token.deleted {
490
+  color: #905;
491
+}
492
+
493
+.token.selector,
494
+.token.attr-name,
495
+.token.string,
496
+.token.char,
497
+.token.builtin,
498
+.token.inserted {
499
+  color: #690;
500
+}
501
+
502
+.token.operator,
503
+.token.entity,
504
+.token.url,
505
+.language-css .token.string,
506
+.style .token.string {
507
+  color: #9a6e3a;
508
+  background: hsla(0, 0%, 100%, .5);
509
+}
510
+
511
+.token.atrule,
512
+.token.attr-value,
513
+.token.keyword {
514
+  color: #07a;
515
+}
516
+
517
+.token.function,
518
+.token.class-name {
519
+  color: #DD4A68;
520
+}
521
+
522
+.token.regex,
523
+.token.important,
524
+.token.variable {
525
+  color: #e90;
526
+}
527
+
528
+.token.important,
529
+.token.bold {
530
+  font-weight: bold;
531
+}
532
+
533
+.token.italic {
534
+  font-style: italic;
535
+}
536
+
537
+.token.entity {
538
+  cursor: help;
539
+}

+ 211 - 0
static/css/newicon/demo_index.html

@@ -0,0 +1,211 @@
1
+<!DOCTYPE html>
2
+<html>
3
+<head>
4
+  <meta charset="utf-8"/>
5
+  <title>iconfont Demo</title>
6
+  <link rel="shortcut icon" href="//img.alicdn.com/imgextra/i4/O1CN01Z5paLz1O0zuCC7osS_!!6000000001644-55-tps-83-82.svg" type="image/x-icon"/>
7
+  <link rel="icon" type="image/svg+xml" href="//img.alicdn.com/imgextra/i4/O1CN01Z5paLz1O0zuCC7osS_!!6000000001644-55-tps-83-82.svg"/>
8
+  <link rel="stylesheet" href="https://g.alicdn.com/thx/cube/1.3.2/cube.min.css">
9
+  <link rel="stylesheet" href="demo.css">
10
+  <link rel="stylesheet" href="iconfont.css">
11
+  <script src="iconfont.js"></script>
12
+  <!-- jQuery -->
13
+  <script src="https://a1.alicdn.com/oss/uploads/2018/12/26/7bfddb60-08e8-11e9-9b04-53e73bb6408b.js"></script>
14
+  <!-- 代码高亮 -->
15
+  <script src="https://a1.alicdn.com/oss/uploads/2018/12/26/a3f714d0-08e6-11e9-8a15-ebf944d7534c.js"></script>
16
+  <style>
17
+    .main .logo {
18
+      margin-top: 0;
19
+      height: auto;
20
+    }
21
+
22
+    .main .logo a {
23
+      display: flex;
24
+      align-items: center;
25
+    }
26
+
27
+    .main .logo .sub-title {
28
+      margin-left: 0.5em;
29
+      font-size: 22px;
30
+      color: #fff;
31
+      background: linear-gradient(-45deg, #3967FF, #B500FE);
32
+      -webkit-background-clip: text;
33
+      -webkit-text-fill-color: transparent;
34
+    }
35
+  </style>
36
+</head>
37
+<body>
38
+  <div class="main">
39
+    <h1 class="logo"><a href="https://www.iconfont.cn/" title="iconfont 首页" target="_blank">
40
+      <img width="200" src="https://img.alicdn.com/imgextra/i3/O1CN01Mn65HV1FfSEzR6DKv_!!6000000000514-55-tps-228-59.svg">
41
+      
42
+    </a></h1>
43
+    <div class="nav-tabs">
44
+      <ul id="tabs" class="dib-box">
45
+        <li class="dib active"><span>Unicode</span></li>
46
+        <li class="dib"><span>Font class</span></li>
47
+        <li class="dib"><span>Symbol</span></li>
48
+      </ul>
49
+      
50
+      <a href="https://www.iconfont.cn/manage/index?manage_type=myprojects&projectId=4304860" target="_blank" class="nav-more">查看项目</a>
51
+      
52
+    </div>
53
+    <div class="tab-container">
54
+      <div class="content unicode" style="display: block;">
55
+          <ul class="icon_lists dib-box">
56
+          
57
+            <li class="dib">
58
+              <span class="icon newicon">&#xe609;</span>
59
+                <div class="name">设备巡检</div>
60
+                <div class="code-name">&amp;#xe609;</div>
61
+              </li>
62
+          
63
+          </ul>
64
+          <div class="article markdown">
65
+          <h2 id="unicode-">Unicode 引用</h2>
66
+          <hr>
67
+
68
+          <p>Unicode 是字体在网页端最原始的应用方式,特点是:</p>
69
+          <ul>
70
+            <li>支持按字体的方式去动态调整图标大小,颜色等等。</li>
71
+            <li>默认情况下不支持多色,直接添加多色图标会自动去色。</li>
72
+          </ul>
73
+          <blockquote>
74
+            <p>注意:新版 iconfont 支持两种方式引用多色图标:SVG symbol 引用方式和彩色字体图标模式。(使用彩色字体图标需要在「编辑项目」中开启「彩色」选项后并重新生成。)</p>
75
+          </blockquote>
76
+          <p>Unicode 使用步骤如下:</p>
77
+          <h3 id="-font-face">第一步:拷贝项目下面生成的 <code>@font-face</code></h3>
78
+<pre><code class="language-css"
79
+>@font-face {
80
+  font-family: 'newicon';
81
+  src: url('iconfont.woff2?t=1705398572308') format('woff2'),
82
+       url('iconfont.woff?t=1705398572308') format('woff'),
83
+       url('iconfont.ttf?t=1705398572308') format('truetype');
84
+}
85
+</code></pre>
86
+          <h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
87
+<pre><code class="language-css"
88
+>.newicon {
89
+  font-family: "newicon" !important;
90
+  font-size: 16px;
91
+  font-style: normal;
92
+  -webkit-font-smoothing: antialiased;
93
+  -moz-osx-font-smoothing: grayscale;
94
+}
95
+</code></pre>
96
+          <h3 id="-">第三步:挑选相应图标并获取字体编码,应用于页面</h3>
97
+<pre>
98
+<code class="language-html"
99
+>&lt;span class="newicon"&gt;&amp;#x33;&lt;/span&gt;
100
+</code></pre>
101
+          <blockquote>
102
+            <p>"newicon" 是你项目下的 font-family。可以通过编辑项目查看,默认是 "iconfont"。</p>
103
+          </blockquote>
104
+          </div>
105
+      </div>
106
+      <div class="content font-class">
107
+        <ul class="icon_lists dib-box">
108
+          
109
+          <li class="dib">
110
+            <span class="icon newicon newicon-shebeixunjian"></span>
111
+            <div class="name">
112
+              设备巡检
113
+            </div>
114
+            <div class="code-name">.newicon-shebeixunjian
115
+            </div>
116
+          </li>
117
+          
118
+        </ul>
119
+        <div class="article markdown">
120
+        <h2 id="font-class-">font-class 引用</h2>
121
+        <hr>
122
+
123
+        <p>font-class 是 Unicode 使用方式的一种变种,主要是解决 Unicode 书写不直观,语意不明确的问题。</p>
124
+        <p>与 Unicode 使用方式相比,具有如下特点:</p>
125
+        <ul>
126
+          <li>相比于 Unicode 语意明确,书写更直观。可以很容易分辨这个 icon 是什么。</li>
127
+          <li>因为使用 class 来定义图标,所以当要替换图标时,只需要修改 class 里面的 Unicode 引用。</li>
128
+        </ul>
129
+        <p>使用步骤如下:</p>
130
+        <h3 id="-fontclass-">第一步:引入项目下面生成的 fontclass 代码:</h3>
131
+<pre><code class="language-html">&lt;link rel="stylesheet" href="./iconfont.css"&gt;
132
+</code></pre>
133
+        <h3 id="-">第二步:挑选相应图标并获取类名,应用于页面:</h3>
134
+<pre><code class="language-html">&lt;span class="newicon newicon-xxx"&gt;&lt;/span&gt;
135
+</code></pre>
136
+        <blockquote>
137
+          <p>"
138
+            newicon" 是你项目下的 font-family。可以通过编辑项目查看,默认是 "iconfont"。</p>
139
+        </blockquote>
140
+      </div>
141
+      </div>
142
+      <div class="content symbol">
143
+          <ul class="icon_lists dib-box">
144
+          
145
+            <li class="dib">
146
+                <svg class="icon svg-icon" aria-hidden="true">
147
+                  <use xlink:href="#newicon-shebeixunjian"></use>
148
+                </svg>
149
+                <div class="name">设备巡检</div>
150
+                <div class="code-name">#newicon-shebeixunjian</div>
151
+            </li>
152
+          
153
+          </ul>
154
+          <div class="article markdown">
155
+          <h2 id="symbol-">Symbol 引用</h2>
156
+          <hr>
157
+
158
+          <p>这是一种全新的使用方式,应该说这才是未来的主流,也是平台目前推荐的用法。相关介绍可以参考这篇<a href="">文章</a>
159
+            这种用法其实是做了一个 SVG 的集合,与另外两种相比具有如下特点:</p>
160
+          <ul>
161
+            <li>支持多色图标了,不再受单色限制。</li>
162
+            <li>通过一些技巧,支持像字体那样,通过 <code>font-size</code>, <code>color</code> 来调整样式。</li>
163
+            <li>兼容性较差,支持 IE9+,及现代浏览器。</li>
164
+            <li>浏览器渲染 SVG 的性能一般,还不如 png。</li>
165
+          </ul>
166
+          <p>使用步骤如下:</p>
167
+          <h3 id="-symbol-">第一步:引入项目下面生成的 symbol 代码:</h3>
168
+<pre><code class="language-html">&lt;script src="./iconfont.js"&gt;&lt;/script&gt;
169
+</code></pre>
170
+          <h3 id="-css-">第二步:加入通用 CSS 代码(引入一次就行):</h3>
171
+<pre><code class="language-html">&lt;style&gt;
172
+.icon {
173
+  width: 1em;
174
+  height: 1em;
175
+  vertical-align: -0.15em;
176
+  fill: currentColor;
177
+  overflow: hidden;
178
+}
179
+&lt;/style&gt;
180
+</code></pre>
181
+          <h3 id="-">第三步:挑选相应图标并获取类名,应用于页面:</h3>
182
+<pre><code class="language-html">&lt;svg class="icon" aria-hidden="true"&gt;
183
+  &lt;use xlink:href="#icon-xxx"&gt;&lt;/use&gt;
184
+&lt;/svg&gt;
185
+</code></pre>
186
+          </div>
187
+      </div>
188
+
189
+    </div>
190
+  </div>
191
+  <script>
192
+  $(document).ready(function () {
193
+      $('.tab-container .content:first').show()
194
+
195
+      $('#tabs li').click(function (e) {
196
+        var tabContent = $('.tab-container .content')
197
+        var index = $(this).index()
198
+
199
+        if ($(this).hasClass('active')) {
200
+          return
201
+        } else {
202
+          $('#tabs li').removeClass('active')
203
+          $(this).addClass('active')
204
+
205
+          tabContent.hide().eq(index).fadeIn()
206
+        }
207
+      })
208
+    })
209
+  </script>
210
+</body>
211
+</html>

+ 19 - 0
static/css/newicon/iconfont.css

@@ -0,0 +1,19 @@
1
+@font-face {
2
+  font-family: "newicon"; /* Project id 4304860 */
3
+  src: url('iconfont.woff2?t=1705398572308') format('woff2'),
4
+       url('iconfont.woff?t=1705398572308') format('woff'),
5
+       url('iconfont.ttf?t=1705398572308') format('truetype');
6
+}
7
+
8
+.newicon {
9
+  font-family: "newicon" !important;
10
+  font-size: 16px;
11
+  font-style: normal;
12
+  -webkit-font-smoothing: antialiased;
13
+  -moz-osx-font-smoothing: grayscale;
14
+}
15
+
16
+.newicon-shebeixunjian:before {
17
+  content: "\e609";
18
+}
19
+

File diff suppressed because it is too large
+ 1 - 0
static/css/newicon/iconfont.js


+ 16 - 0
static/css/newicon/iconfont.json

@@ -0,0 +1,16 @@
1
+{
2
+  "id": "4304860",
3
+  "name": "新itsm",
4
+  "font_family": "newicon",
5
+  "css_prefix_text": "newicon-",
6
+  "description": "",
7
+  "glyphs": [
8
+    {
9
+      "icon_id": "2492912",
10
+      "name": "设备巡检",
11
+      "font_class": "shebeixunjian",
12
+      "unicode": "e609",
13
+      "unicode_decimal": 58889
14
+    }
15
+  ]
16
+}

BIN
static/css/newicon/iconfont.ttf


BIN
static/css/newicon/iconfont.woff


BIN
static/css/newicon/iconfont.woff2