chenrui
2025-02-26 7480271afcd5bbee7cc9829aa845d5679e4e239f
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
<template>
    <div class="card-container" @click="handleCard">
        <div class="card-panel" :class="[isActive == index ? 'isActive' : '']">
            <el-image
                style="width: 80%; height: 140px"
                :src="javaApi + '/img/' + data.logo"
                fit="fill"
            />
        </div>
        <div class="title">
            {{ data.supplierRef }}
        </div>
    </div>
</template>
<script>
 
export default {
    props: {
        data: {
            type: Object,
            default: () => {}
        },
        index: {
            type: Number,
            default: -1
        },
        isActive: {
            type: Number,
            default: -1
        }
    },
    data(){
        return {
 
        }
    },
    mounted() {
      // console.log(1111,this.data)
    },
    methods: {
        handleCard() {
            this.$emit('handleCard', this.data, this.index)
        }
    }
}
</script>
<style scoped>
.card-container  {
    margin: 10px 10px 10px 0;
    text-align: center;
}
.card-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 90%;
    height: 180px;
    box-shadow: 0px 0px 20px 0px #0000001A;
    cursor: pointer;
    border-radius: 5px;
    border: 1px solid transparent;
}
.card-panel:hover {
    border: 1px solid #409EFF;
    background: #1D56C50D;
}
.isActive {
    border: 1px solid #409EFF;
    background: #1D56C50D;
}
.title {
    margin-top: 15px;
}
</style>