Skip to content

Commit caeb826

Browse files
author
吴博
committed
资源页面
1 parent 118086c commit caeb826

File tree

6 files changed

+166
-5
lines changed

6 files changed

+166
-5
lines changed

src/assets/styles/header.less

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,32 @@
1+
//.site-header {
2+
// position: fixed;
3+
// top: 0;
4+
// left: 0;
5+
// right: 0;
6+
// background-color: #f5faff;
7+
// padding: 0 0 0 200px;
8+
// height: 60px;
9+
// z-index: 99;
10+
//}
11+
112
.site-header {
213
position: fixed;
314
top: 0;
415
left: 0;
516
right: 0;
6-
background-color: #f5faff;
7-
padding: 0 0 0 200px;
8-
height: 60px;
917
z-index: 99;
18+
height: 60px;
19+
padding: 0 0 0 200px;
20+
background-color: #fff;
21+
.cd-box-shadow();
1022
}
1123

24+
.site-header.none {
25+
box-shadow: none;
26+
background-color: #f5faff;
27+
}
28+
29+
1230
.site-header__logo {
1331
position: absolute;
1432
top: 0;
@@ -47,4 +65,4 @@
4765
}
4866
}
4967
}
50-
}
68+
}

src/assets/styles/main.less

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@
66
@import './sidebar.less';
77
@import './homepage.less';
88
@import './element-layout.less';
9+
@import './resources-list.less';
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
2+
.resources {
3+
position: fixed;
4+
top: 60px;
5+
right: 0;
6+
bottom: 0;
7+
left: 0;
8+
.title {
9+
padding-top: 40px;
10+
font-family: PingFangSC-Medium;
11+
font-size: 24px;
12+
color: #313131;
13+
text-align: center;
14+
line-height: 32px;
15+
}
16+
.desc {
17+
margin-top: 16px;
18+
margin-bottom: 40px;
19+
font-family: PingFangSC-Regular;
20+
font-size: 14px;
21+
color: #999;
22+
text-align: center;
23+
line-height: 20px;
24+
}
25+
.resources-list {
26+
width: 1200px;
27+
padding: 0 15px;
28+
margin: 0 auto;
29+
&:after {
30+
content: '';
31+
display: block;
32+
clear: both;
33+
}
34+
.resources-item {
35+
float: left;
36+
width: 360px;
37+
height: 366px;
38+
margin: 0 15px;
39+
background-color: #fff;
40+
box-shadow: 0 2px 20px 0 rgba(0,0,0,0.08);
41+
border-radius: 4px;
42+
.img {
43+
width: 288px;
44+
height: 184px;
45+
padding: 36px 36px 30px;
46+
box-sizing: content-box;
47+
img {
48+
width: 288px;
49+
height: 184px;
50+
}
51+
}
52+
.name {
53+
margin-bottom: 12px;
54+
font-family: PingFangSC-Medium;
55+
font-size: 20px;
56+
color: #313131;
57+
text-align: center;
58+
}
59+
.description {
60+
padding: 0 20px;
61+
font-family: PingFangSC-Regular;
62+
font-size: 14px;
63+
line-height: 20px;
64+
color: #999;
65+
text-align: center;
66+
}
67+
}
68+
}
69+
}
70+

src/data/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ const navMenu:any[] = [
237237
},
238238
{
239239
'text': '资源',
240-
'name': 'resource'
240+
'name': 'resources'
241241
}
242242
];
243243

src/router/index.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ const routes = [
2929
name: 'element-layout',
3030
component: (resolve) => require(['@/views/element-layout.vue'], resolve),
3131
},
32+
{
33+
path: '/resources',
34+
name: 'resources',
35+
component: (resolve) => require(['@/views/resources.vue'], resolve),
36+
},
3237
{
3338
path: '/',
3439
name: 'homepage',

src/views/resources.vue

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
<template>
2+
<div id="app" class="site-wrap resources" :class="{ 'hide-sidebar': isHideSidebar }">
3+
<x-header></x-header>
4+
<div class="title">资源</div>
5+
<div class="desc">这里是全栈式可复用资源库供大家下载</div>
6+
<div class="resources-list">
7+
<div class="resources-item">
8+
<div class="img">
9+
<img src="" alt="" />
10+
</div>
11+
<div class="name">模块设计资源</div>
12+
<div class="description">
13+
从 Element Template 快速调用常用组件,在提升设计效率的同时,保证统一的视觉风格
14+
</div>
15+
</div>
16+
<div class="resources-item">
17+
<div class="img">
18+
<img src="" alt="" />
19+
</div>
20+
<div class="name">原型Axure组件资源</div>
21+
<div class="description">
22+
通过在 Axure 中导入 Element 组件库,可以在交互设计阶段方便地调用常用的组件
23+
</div>
24+
</div>
25+
<div class="resources-item">
26+
<div class="img">
27+
<img src="" alt="" />
28+
</div>
29+
<div class="name">设计稿sketch资源</div>
30+
<div class="description">
31+
从 Element Template 快速调用常用组件,在提升设计效率的同时,保证统一的视觉风格
32+
</div>
33+
</div>
34+
</div>
35+
<x-pager></x-pager>
36+
<div id="cd-modal" class="cd-modal cd-fade" v-html="code.modal_base"></div>
37+
</div>
38+
</template>
39+
40+
<script lang="ts">
41+
import Vue from 'vue';
42+
import { Component } from 'vue-property-decorator';
43+
44+
import XHeader from '@/views/header.vue';
45+
import XPager from '@/views/pager.vue';
46+
import menus from '@/data/principle.js';
47+
48+
import * as code from './component/modal';
49+
50+
@Component({
51+
name: 'principle',
52+
components: {
53+
XHeader,
54+
XPager
55+
}
56+
})
57+
58+
export default class extends Vue {
59+
code: any = code;
60+
isHideSidebar: boolean = false;
61+
menus: any = menus;
62+
63+
sidebarToggle() {
64+
return this.isHideSidebar = !this.isHideSidebar;
65+
}
66+
};
67+
</script>

0 commit comments

Comments
 (0)