mirror of
https://gitlab.com/little-lines/frontend.git
synced 2024-11-24 12:46:51 +00:00
fix fav layout, place function for home
This commit is contained in:
parent
763a5babba
commit
d6013d5fa2
1 changed files with 53 additions and 7 deletions
|
@ -1,12 +1,37 @@
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<!-- <h1>Favorites</h1> -->
|
||||||
<h1>Favorites</h1>
|
<!-- แสดงข้อมูล favorites ตามความเหมาะสม -->
|
||||||
<ul class="favorite-list">
|
<!-- <ul class="favorite-list">
|
||||||
<li v-for="(favorite, index) in favorite" :key="index" class="favorite-item">
|
<li v-for="(favorite, index) in favorite" :key="index" class="favorite-item">
|
||||||
{{ favorite.place_name }} <!-- แสดงข้อมูล favorites ตามความเหมาะสม -->
|
{{ favorite.place_name }}
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul> -->
|
||||||
</div>
|
|
||||||
|
<v-card
|
||||||
|
class="mx-auto fav-card">
|
||||||
|
|
||||||
|
<v-list lines="two">
|
||||||
|
<v-list-item
|
||||||
|
v-for="(favorite, index) in favorite"
|
||||||
|
:key="index"
|
||||||
|
@click="handleClick(favorite)"
|
||||||
|
>
|
||||||
|
|
||||||
|
<!-- <template v-slot:prepend>
|
||||||
|
<v-icon class="icon-pin"></v-icon>
|
||||||
|
</template> -->
|
||||||
|
|
||||||
|
<template v-slot:prepend>
|
||||||
|
<v-icon class="icon-pin"></v-icon>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<v-list-item-content>
|
||||||
|
<v-list-item-title>{{ favorite.place_name }}</v-list-item-title>
|
||||||
|
</v-list-item-content>
|
||||||
|
</v-list-item>
|
||||||
|
</v-list>
|
||||||
|
|
||||||
|
</v-card>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
@ -33,6 +58,11 @@ export default {
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const handleClick = (favorite) => {
|
||||||
|
console.log('Clicked:', favorite);
|
||||||
|
};
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
@ -44,7 +74,7 @@ export default {
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
/* CSS เพื่อแสดงแต่ละข้อมูลเป็น block */
|
/* CSS เพื่อแสดงแต่ละข้อมูลเป็น block */
|
||||||
.favorite-list {
|
/* .favorite-list {
|
||||||
list-style-type: none;
|
list-style-type: none;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
@ -54,5 +84,21 @@ export default {
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
border: 1px solid #ccc;
|
border: 1px solid #ccc;
|
||||||
margin-bottom: 5px;
|
margin-bottom: 5px;
|
||||||
|
} */
|
||||||
|
|
||||||
|
.icon-pin{
|
||||||
|
background-color: black;
|
||||||
|
-webkit-mask: url(icons/Adwaita/pin.svg) no-repeat center;
|
||||||
|
mask: url(icons/Adwaita/pin.svg) no-repeat center;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.fav-card
|
||||||
|
{
|
||||||
|
margin-top: 2vh;
|
||||||
|
max-width: 90vw;
|
||||||
|
border-radius: 12px;
|
||||||
|
background-color: rgba(255, 255, 255, 1);
|
||||||
|
box-shadow: 0px 1px 4px 1px rgba(0, 0, 0, 0.13);
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
Loading…
Reference in a new issue