feat(frontend): learnwarecard click -> to

This commit is contained in:
AnnyTerfect 2023-10-30 23:23:26 +08:00
parent 6877ddeae1
commit cc1716e112
2 changed files with 1 additions and 10 deletions

2
.gitignore vendored
View File

@ -22,8 +22,6 @@ files/*
*.pyd
*.ipynb
.ipynb_checkpoints
learnware
learnware_pool/
# Frontend
logs

View File

@ -1,7 +1,6 @@
<script setup lang="ts">
import { computed } from "vue";
import { useDisplay } from "vuetify";
import { useRouter } from "vue-router";
import { useI18n } from "vue-i18n";
import LearnwareCard from "./LearnwareCard.vue";
import oopsImg from "../../assets/images/public/oops.svg?url";
@ -11,8 +10,6 @@ const emit = defineEmits(["click:edit", "click:delete"]);
const display = useDisplay();
const router = useRouter();
const { t } = useI18n();
export interface Props {
@ -60,10 +57,6 @@ function handleClickEdit(id: string): void {
function handleClickDelete(id: string): void {
emit("click:delete", id);
}
function showLearnwareDetail(id: string): void {
router.push({ path: "/learnwaredetail", query: { id } });
}
</script>
<template>
@ -78,7 +71,7 @@ function showLearnwareDetail(id: string): void {
:item="item"
:filters="filters"
:is-admin="isAdmin"
@click="showLearnwareDetail(item.id)"
:to="`/learnwaredetail?id=${item.id}`"
@click:edit="(id) => handleClickEdit(id)"
@click:delete="(id) => handleClickDelete(id)"
/>