forked from verdnatura/salix-front
96 lines
1.9 KiB
Vue
96 lines
1.9 KiB
Vue
<script setup>
|
|
const $props = defineProps({
|
|
id: { type: Number, default: null },
|
|
title: { type: String, default: null },
|
|
});
|
|
</script>
|
|
<template>
|
|
<QCard class="card q-mb-md cursor-pointer q-hoverable bg-white-7">
|
|
<div>
|
|
<slot name="title">
|
|
<div class="title">
|
|
{{ $props.title ?? `#${$props.id}` }}
|
|
</div>
|
|
</slot>
|
|
<div class="card-list-body">
|
|
<div class="list-items">
|
|
<slot name="list-items" />
|
|
</div>
|
|
|
|
<div class="actions">
|
|
<slot name="actions" />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</QCard>
|
|
</template>
|
|
<style lang="scss">
|
|
.card-list-body {
|
|
.vn-label-value {
|
|
display: flex;
|
|
justify-content: flex-start;
|
|
gap: 2%;
|
|
width: 50%;
|
|
.label {
|
|
width: 30%;
|
|
color: var(--vn-label);
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
.value {
|
|
width: 60%;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
}
|
|
}
|
|
.actions {
|
|
.q-btn {
|
|
width: 30px;
|
|
}
|
|
.q-icon {
|
|
color: $primary;
|
|
font-size: 25px;
|
|
}
|
|
}
|
|
@media (max-width: $breakpoint-xs) {
|
|
.card-list-body {
|
|
.vn-label-value {
|
|
width: 100%;
|
|
}
|
|
}
|
|
}
|
|
</style>
|
|
|
|
<style lang="scss" scoped>
|
|
.card {
|
|
padding: 30px;
|
|
transition: background-color 0.2s;
|
|
}
|
|
.card-list-body {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
}
|
|
.card:hover {
|
|
background-color: var(--vn-gray);
|
|
}
|
|
.title {
|
|
color: $primary;
|
|
font-size: 22px;
|
|
font-weight: bold;
|
|
}
|
|
.list-items {
|
|
width: 100%;
|
|
margin-top: 20px;
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
}
|
|
.actions {
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: center;
|
|
}
|
|
</style>
|