-
+
{{ item.title }}
diff --git a/src/router/index.ts b/src/router/index.ts
index 14d37606..90d9d04e 100644
--- a/src/router/index.ts
+++ b/src/router/index.ts
@@ -20,14 +20,14 @@ const router = createRouter({
component: () => import('../layouts/default.vue'),
children: [
{
- path: 'dashboard',
+ path: '/dashboard',
component: () => import('../pages/dashboard.vue'),
meta: {
requiresAuth: true,
},
},
{
- path: 'ranking',
+ path: '/ranking',
component: () => import('../pages/ranking.vue'),
meta: {
keepAlive: true,
@@ -35,63 +35,63 @@ const router = createRouter({
},
},
{
- path: 'resource',
+ path: '/resource',
component: () => import('../pages/resource.vue'),
meta: {
requiresAuth: true,
},
},
{
- path: 'subscribe-movie/:tab',
+ path: '/subscribe-movie',
component: () => import('../pages/subscribe-movie.vue'),
meta: {
requiresAuth: true,
},
},
{
- path: 'subscribe-tv/:tab',
+ path: '/subscribe-tv',
component: () => import('../pages/subscribe-tv.vue'),
meta: {
requiresAuth: true,
},
},
{
- path: 'calendar',
+ path: '/calendar',
component: () => import('../pages/calendar.vue'),
meta: {
requiresAuth: true,
},
},
{
- path: 'downloading',
+ path: '/downloading',
component: () => import('../pages/downloading.vue'),
meta: {
requiresAuth: true,
},
},
{
- path: 'history',
+ path: '/history',
component: () => import('../pages/history.vue'),
meta: {
requiresAuth: true,
},
},
{
- path: 'site',
+ path: '/site',
component: () => import('../pages/site.vue'),
meta: {
requiresAuth: true,
},
},
{
- path: 'plugins/:tab',
+ path: '/plugins',
component: () => import('../pages/plugin.vue'),
meta: {
requiresAuth: true,
},
},
{
- path: 'setting/:tab',
+ path: '/setting',
component: () => import('../pages/setting.vue'),
meta: {
requiresAuth: true,
diff --git a/src/views/plugin/PluginCardListView.vue b/src/views/plugin/PluginCardListView.vue
index bc503e2b..4957dd1a 100644
--- a/src/views/plugin/PluginCardListView.vue
+++ b/src/views/plugin/PluginCardListView.vue
@@ -9,6 +9,7 @@ import noImage from '@images/logos/plugin.png'
import { useDisplay } from 'vuetify'
import { isNullOrEmptyObject } from '@/@core/utils'
import { useDefer } from '@/@core/utils/dom'
+import router from '@/router'
const route = useRoute()
@@ -19,7 +20,7 @@ const display = useDisplay()
let deferApp = (_: number) => true
// 当前标签
-const activeTab = ref(route.params.tab)
+const activeTab = ref(route.query.tab)
// 标签页
const tabs = [
@@ -320,6 +321,11 @@ function handleRepoUrl(url: string | undefined) {
return url.replace('https://github.com/', '').replace('https://raw.githubusercontent.com/', '')
}
+// 跳转tab
+function jumpTab(tab: string) {
+ router.push("/plugins?tab=" + tab)
+}
+
// 加载时获取数据
onBeforeMount(async () => {
await refreshData()
@@ -330,7 +336,7 @@ onBeforeMount(async () => {
-
+
{{ item.title }}