feat: page MangaDetails en vue.js
This commit is contained in:
parent
bee8572dc5
commit
41dc3c51aa
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div
|
||||
class="bg-white rounded-lg shadow-md overflow-hidden cursor-pointer transition-transform hover:scale-105"
|
||||
@click="handleClick"
|
||||
@click="navigateToDetails"
|
||||
>
|
||||
<div class="relative pb-[150%]">
|
||||
<img
|
||||
@@ -34,8 +34,11 @@ const props = defineProps({
|
||||
}
|
||||
});
|
||||
|
||||
const handleClick = () => {
|
||||
router.push(`/manga/${props.manga.slug}`);
|
||||
const navigateToDetails = () => {
|
||||
router.push({
|
||||
name: 'manga-details',
|
||||
params: { id: props.manga.id }
|
||||
});
|
||||
};
|
||||
|
||||
const formatDate = (dateString) => {
|
||||
|
||||
Reference in New Issue
Block a user