front_foundation #5
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="project">
|
<div @click="goToLink" class="project">
|
||||||
<div class="project-header">
|
<div class="project-header">
|
||||||
<h2 @click="goToLink">{{ projectName }}</h2>
|
<h2 >{{ projectName }}</h2>
|
||||||
mohamed_maoulainine marked this conversation as resolved
Outdated
|
|||||||
<div class="project-buttons">
|
<div class="project-buttons">
|
||||||
<button class="contact-btn">Contact</button>
|
<button class="contact-btn">Contact</button>
|
||||||
</div>
|
</div>
|
||||||
@ -17,6 +17,7 @@
|
|||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { defineProps } from "vue";
|
import { defineProps } from "vue";
|
||||||
|
import { useRouter } from 'vue-router'
|
||||||
|
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
@ -25,10 +26,17 @@ const props = defineProps<{
|
|||||||
projectLink: string;
|
projectLink: string;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
|
const router = useRouter();
|
||||||
|
|
||||||
piair marked this conversation as resolved
Outdated
piair
commented
C'est comme un href, a ne pas utiliser C'est comme un href, a ne pas utiliser
je le corrige après parce que je n'ai pas une idée claire sur comment sera le résultat du request, pour le moment je ferais en sorte de rediriger tout les projets vers le même canvas. je le corrige après parce que je n'ai pas une idée claire sur comment sera le résultat du request, pour le moment je ferais en sorte de rediriger tout les projets vers le même canvas.
|
|||||||
const goToLink = () => {
|
const goToLink = () => {
|
||||||
if (props.projectLink) {
|
if (props.projectLink) {
|
||||||
|
router.push(props.projectLink);
|
||||||
|
/*
|
||||||
window.location.href = props.projectLink;
|
window.location.href = props.projectLink;
|
||||||
|
*/
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -27,12 +27,12 @@ import { ref } from "vue";
|
|||||||
const projects = ref([
|
const projects = ref([
|
||||||
{
|
{
|
||||||
name: "Projet Alpha",
|
name: "Projet Alpha",
|
||||||
link: "/project-alpha.html", // to test
|
link: "/canvas", // to test
|
||||||
members: ["Alice", "Bob", "Charlie"],
|
members: ["Alice", "Bob", "Charlie"],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "Projet Beta",
|
name: "Projet Beta",
|
||||||
link: "./project-beta.html", // to test
|
link: "./canvas", // to test
|
||||||
members: ["David", "Eve", "Frank"],
|
members: ["David", "Eve", "Frank"],
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user
Toute la case devrait être clickable, pas que le titre