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
| <template>
| <el-card
| class="my-card"
| shadow="hover"
| :style="`height:${outHeight};width:${outWidth};`"
| :body-style="`height:${height};width:${width};`"
| >
| <el-carousel
| :autoplay="false"
| indicator-position="none"
| :arrow="data.list.length > 1 ? 'hover' : 'never'"
| >
| <el-carousel-item v-for="(item, index) in data.list" :key="index">
| <card-item :data="item" :showType="showType" @detailsClick="detailsClick"></card-item>
| </el-carousel-item>
| </el-carousel>
| </el-card>
| </template>
|
| <script>
| import CardItem from "./CardItem2";
| 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);
| }
| },
| 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;
| border:none;
| padding: 13px 11px;
| .el-carousel__arrow {
| height: 20px;
| width: 20px;
| }
| .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%;
| }
| }
| }
| </style>
|
|