feat: add hover + on click (emit)
This commit is contained in:
parent
87615a1e2e
commit
0a845e6d4e
1 changed files with 16 additions and 2 deletions
|
|
@ -18,7 +18,11 @@ withDefaults(
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="full-width rounded" :style="`border:1px solid ${color}`">
|
<div
|
||||||
|
class="full-width rounded hover-card"
|
||||||
|
:style="`border:1px solid ${color}`"
|
||||||
|
@click="$emit('onClick')"
|
||||||
|
>
|
||||||
<div class="q-pa-md row justify-between items-center">
|
<div class="q-pa-md row justify-between items-center">
|
||||||
<q-btn
|
<q-btn
|
||||||
round
|
round
|
||||||
|
|
@ -27,7 +31,11 @@ withDefaults(
|
||||||
flat
|
flat
|
||||||
:style="`color:${color};background-color:var(--surface-0)`"
|
:style="`color:${color};background-color:var(--surface-0)`"
|
||||||
/>
|
/>
|
||||||
<AllAroundBtn :label="'viewDetail'" :color="color" />
|
<AllAroundBtn
|
||||||
|
:label="'viewDetail'"
|
||||||
|
:color="color"
|
||||||
|
@view-detail="$emit('viewDetail')"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="q-px-md">
|
<div class="q-px-md">
|
||||||
<div class="text-subtitle1 text-bold">{{ title }}</div>
|
<div class="text-subtitle1 text-bold">{{ title }}</div>
|
||||||
|
|
@ -70,4 +78,10 @@ withDefaults(
|
||||||
border-radius: 0 0 var(--radius-2) var(--radius-2);
|
border-radius: 0 0 var(--radius-2) var(--radius-2);
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.hover-card:hover {
|
||||||
|
cursor: pointer;
|
||||||
|
opacity: 0.8;
|
||||||
|
box-shadow: var(--shadow-3);
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue