1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
| <template>
| <div
| class="productLeft"
| :style="{
| background: ` url(${data.pic})`,
| backgroundSize: '100% 100%',
| backgroundRepeat: 'no-repeat',
| }"
| >
| <div class="inner">
| <div class="title">
| {{ data.name }}
| </div>
| <div class="des">
| {{ data.desc }}
| </div>
| <div class="button">
| <router-link to="/product">查看全部</router-link>
| </div>
| </div>
| </div>
| </template>
|
| <script>
| export default {
| props: {
| data: {
| type: Object,
| },
| },
| };
| </script>
|
| <style lang="scss" scoped>
| .productLeft {
| position: relative;
| width: 302px;
| height: 100%;
|
| .inner {
| position: absolute;
| top: 40px;
| left: 20px;
|
| .title {
| margin-bottom: 10px;
| font-size: 24px;
| font-weight: 700;
| }
|
| .des {
| margin-bottom: 20px;
| width: 252px;
| color: #666666;
| font-size: 14px;
| }
|
| .button {
| cursor: pointer;
| width: 120px;
| height: 32px;
| line-height: 32px;
| font-size: 14px;
| color: #666666;
| text-align: center;
| border: 1px solid #666666;
| font-weight: 700;
| }
| }
| }
| </style>
|
|