Commit 2caf92285eb2e6af0faf6be25152a67d84f5e1ae
1 parent
50b9599a
公共卡片头部
Showing
5 changed files
with
83 additions
and
4 deletions
src/components/VParking.vue
0 → 100644
1 | +<template> | |
2 | + <div class="theme-wrap"> | |
3 | + <card-title> <span>停车场消息</span></card-title> | |
4 | + <div class="theme-body">123</div> | |
5 | + </div> | |
6 | +</template> | |
7 | + | |
8 | +<script> | |
9 | +import CardTitle from './base/CardTitle' | |
10 | +export default { | |
11 | + name: 'VParking', | |
12 | + components: { | |
13 | + CardTitle | |
14 | + } | |
15 | +} | |
16 | +</script> | |
17 | + | |
18 | +<style scoped lang="scss"> | |
19 | + .theme-wrap { | |
20 | + height: 100%; | |
21 | + } | |
22 | + .theme-body { | |
23 | + height: calc(100% - 30px); | |
24 | + background-color: #ff0; | |
25 | + } | |
26 | +</style> | ... | ... |
src/components/base/CardTitle.vue
0 → 100644
1 | +<template> | |
2 | + <div class="theme-title"> | |
3 | + <slot></slot> | |
4 | + </div> | |
5 | +</template> | |
6 | + | |
7 | +<script> | |
8 | +export default { | |
9 | + name: 'CardTitle' | |
10 | +} | |
11 | +</script> | |
12 | + | |
13 | +<style scoped lang="scss"> | |
14 | + .theme-title { | |
15 | + margin-left: -2px; | |
16 | + height: 30px; | |
17 | + line-height: 30px; | |
18 | + background: url("../../images/content/cardTitleBg.png") no-repeat; | |
19 | + background-size: 100% 100%; | |
20 | + } | |
21 | + | |
22 | + .theme-title span { | |
23 | + margin-left: 60px; | |
24 | + position: relative; | |
25 | + font-size: 14px; | |
26 | + } | |
27 | + | |
28 | + .theme-title span:before { | |
29 | + content: ''; | |
30 | + background: url('../../images/content/cardTitleSide.png') no-repeat; | |
31 | + background-size: 100% 100%; | |
32 | + position: absolute; | |
33 | + width: 40px; | |
34 | + height: 13px; | |
35 | + top: 3px; | |
36 | + left: -47px; | |
37 | + } | |
38 | + | |
39 | + .theme-title span:after { | |
40 | + content: ''; | |
41 | + background: url('../../images/content/cardTitleSide.png') no-repeat; | |
42 | + background-size: 100% 100%; | |
43 | + position: absolute; | |
44 | + width: 40px; | |
45 | + height: 13px; | |
46 | + top: 3px; | |
47 | + right: -50px; | |
48 | + } | |
49 | +</style> | ... | ... |
src/images/content/cardTitleBg.png
0 → 100644
2.18 KB
src/images/content/cardTitleSide.png
0 → 100644
1.5 KB
src/view/VHome.vue
... | ... | @@ -3,7 +3,9 @@ |
3 | 3 | <v-header></v-header> |
4 | 4 | <ul class="main-wrap"> |
5 | 5 | <li class="main-left"> |
6 | - <div class="frame-wrap"></div> | |
6 | + <div class="frame-wrap"> | |
7 | + <v-parking></v-parking> | |
8 | + </div> | |
7 | 9 | <div class="frame-wrap frame-wrap-center"></div> |
8 | 10 | <div class="frame-wrap"></div> |
9 | 11 | </li> |
... | ... | @@ -22,11 +24,13 @@ |
22 | 24 | <script> |
23 | 25 | import VHeader from '../components/VHeader' |
24 | 26 | import VMap from '../components/VMap' |
27 | +import VParking from '../components/VParking' | |
25 | 28 | export default { |
26 | 29 | name: 'VHome', |
27 | 30 | components: { |
28 | 31 | VHeader, |
29 | - VMap | |
32 | + VMap, | |
33 | + VParking | |
30 | 34 | } |
31 | 35 | } |
32 | 36 | </script> |
... | ... | @@ -58,8 +62,8 @@ export default { |
58 | 62 | .frame-wrap{ |
59 | 63 | height: calc((100% - 20px)/3); |
60 | 64 | border-image-source: url("../images/content/frame-wrap.png"); |
61 | - border-image-slice: 10 16 15 10 fill; | |
62 | - border-width: 10px 16px 15px 10px; | |
65 | + border-image-slice: 3 16 11 3 fill; | |
66 | + border-width: 3px 18px 11px 3px; | |
63 | 67 | border-style: solid; |
64 | 68 | background-clip: border-box; |
65 | 69 | } | ... | ... |