| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135 |
- <template>
- <v-card @hover="onHover">
- <div class="frame">
- <v-img
- :src="img"
- :alt="title"
- :width="24"
- />
- <div class="details">
- <v-card-title :class="small ? 'small' : ''">{{ title }}</v-card-title>
- <v-card-subtitle v-if="subtitle">{{ subtitle }}</v-card-subtitle>
- </div>
- <!-- <v-card-actions>-->
- <!-- <v-btn icon="fas fa-plus" variant="flat" @click="onMoreClick" />-->
- <!-- </v-card-actions>-->
- </div>
- </v-card>
- </template>
- <script setup lang="ts">
- import type { PropType } from '@vue/runtime-core'
- import type { Ref } from '@vue/reactivity'
- defineProps({
- title: {
- type: String,
- required: true
- },
- img: {
- type: String,
- required: true
- },
- subtitle: {
- type: String as PropType<string | null>,
- required: false,
- default: null
- },
- details: {
- type: String as PropType<string | null>,
- required: false,
- default: null
- },
- small: {
- type: Boolean,
- required: false,
- defualt: false
- }
- })
- const expanded: Ref<boolean> = ref(false)
- const onHover = () => {
- }
- const onMoreClick = () => {
- }
- </script>
- <style scoped lang="scss">
- .v-card {
- height: 62px;
- width: 95%;
- padding: 10px;
- .frame {
- height: 42px;
- display: flex;
- flex-direction: row;
- justify-content: space-between;
- align-items: center;
- flex-wrap: nowrap;
- max-height: 100%;
- }
- .details {
- flex: 1;
- max-width: 154px;
- }
- .v-img {
- max-width: 24px;
- height: 24px;
- width: 24px;
- margin: 4px auto;
- :deep(.v-img__img--contain) {
- display: block !important;
- }
- }
- .v-card-title {
- font-size: 15px;
- padding: 0 16px;
- font-weight: 300;
- line-height: 18px;
- white-space: break-spaces;
- }
- .v-card-title.small {
- font-size: 14px;
- line-height: 16px;
- }
- .v-card-subtitle {
- font-size: 13px;
- }
- }
- .v-card-actions {
- width: 24px;
- right: 0;
- padding: 0 8px;
- .v-btn {
- width: 24px;
- font-size: 13px;
- color: rgb(var(--v-theme-primary));
- }
- }
- //.v-card-actions {
- // display: none;
- //}
- //
- //.v-card:hover {
- // .v-card-actions {
- // display: block;
- // }
- //}
- </style>
|