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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
| <template>
| <el-card
| class="my-card"
| shadow="never"
| :style="`height:${outHeight};width:${outWidth};max-height:160px;min-height:135px`"
| :body-style="`height:${height};width:${width};`"
| >
| <el-carousel
| :autoplay="false"
| indicator-position="none"
| :arrow="data.list.length > 1 ? 'always' : 'never'"
| >
| <el-carousel-item v-for="(item, index) in data.list" :key="index">
| <card-item :data="item" :showType="showType" @detailsClick="detailsClick" @addToBase="toAdd"></card-item>
| </el-carousel-item>
| </el-carousel>
| </el-card>
| </template>
|
| <script>
| import CardItem from "./CardItem";
| export default {
| components: {
| CardItem
| },
| props: {
| data: {
| type: Object,
| default: null
| },
| showType: {
| type: String,
| default: ""
| },
| height: {
| type: String,
| default: "100%"
| },
| width: {
| type: String,
| default: "100%"
| },
| outHeight: {
| type: String,
| default: "100%"
| },
| outWidth: {
| type: String,
| default: "100%"
| }
| },
| methods: {
| detailsClick(ev) {
| this.$emit("detailsClick", ev);
| },
| toAdd(item) {
| this.$emit("addToBase", item);
| }
| },
| mounted() {
|
| }
| // data :{
| // upload: false
| // },
| // watch:{
| // showType : function(newVal,oldVal){
| // this.upload = this.newVal
| // }
| // }
| };
| </script>
| <style lang="scss">
| .my-active-card {
| border: 2px solid #ff7733 !important;
| // background: rgba(145,197,255, 0.6) !important;
| }
| .my-card {
| box-sizing: border-box;
| padding: 12px 10px;
| cursor: default;
| .el-carousel__arrow {
| top: 90%;
| }
| .el-carousel__arrow {
| height: 20px;
| width: 20px;
| }
| .el-carousel__arrow:hover {
| background-color: rgba(102, 102, 102);
| }
| .el-card__body {
| padding: 0px !important;
| }
| .el-card:hover {
| box-sizing: border-box;
| }
| // .el-carousel__arrow {
| // top: inherit;
| // bottom: 0px;
| // }
| .el-carousel {
| height: 100% !important;
| width: 100%;
| .el-carousel__container {
| height: 100% !important;
| width: 100%;
| }
| }
| }
| .my-card:hover {
| -webkit-box-shadow: 0px 0px 5px 1px rgba(0, 0, 0, 0.3);
| box-shadow: 0px 0px 5px 1px rgba(0, 0, 0, 0.3);
| }
| </style>
| <style lang = "scss" scoped>
| .el-carousel__container {
| height: 100% !important;
| .el-carousel__arrow {
| top: 70% !important;
| }
| .el-carousel__arrow {
| height: 20px;
| width: 20px;
| }
| .el-carousel__arrow--right {
| right: 10px !important;
| }
| .el-carousel__arrow--left {
| left: 10px !important;
| }
| }
| </style>
|
|