From 7de0a87f27072ae89d1ee7d5086f33e83360db21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A5=BF=E7=93=9C=C2=B0?= Date: Sun, 31 May 2026 21:33:49 +0800 Subject: [PATCH] 1 --- frontend/src/pages/Home/Index.vue | 29 +++++++++++++++++++++++++++-- frontend/src/router/index.ts | 10 +++++----- 2 files changed, 32 insertions(+), 7 deletions(-) diff --git a/frontend/src/pages/Home/Index.vue b/frontend/src/pages/Home/Index.vue index de5f2315..36a13b08 100644 --- a/frontend/src/pages/Home/Index.vue +++ b/frontend/src/pages/Home/Index.vue @@ -4,6 +4,7 @@ import api from '@/api' import type { IAlterInfo } from '@/api/info/type' import { getImageURL } from '@/utils/images' import router from '@/router' +import { useDialog } from '@/components/hooks/dialog' function job_icon(child: IAlterInfo) { return { @@ -13,7 +14,9 @@ function job_icon(child: IAlterInfo) { } export default defineComponent(async () => { - const ignores = ['empty'] + // const ignores = ['empty'] + + const { show, close, randomId } = useDialog() // 获取角色相关信息,判定是否开放 function choose_job(child: IAlterInfo) { @@ -27,7 +30,28 @@ export default defineComponent(async () => { if (child.open) { const options = child.options ?? [] if (options.length > 0) { - return + const id = randomId() + return await show({ + id, + content: '请选择职业版本', + action: () => { + return ( +
+ {renderList(options, (option) => ( + { + window.open('/character/' + (option.value || option.name), '_blank') + close(id, 'ok') + }} + > + {option.title} + + ))} +
+ ) + }, + }) } else { return window.open('/character/' + (child.value || child.name), '_blank') } @@ -110,6 +134,7 @@ export default defineComponent(async () => { class="flex flex-col" style={`position: absolute;top: ${30 + 82 * 0}px;left: 800px;width: 160px;height: 150px;`} onClick={() => router.push({ path: '/dnfhelper' })} + v-show={false} >
import('@/pages/Home/Index.vue'), }, - { - path: '/dnfhelper', - name: 'dnfhelper', - component: () => import('@/pages/Dnfhelper/index.vue'), - }, + // { + // path: '/dnfhelper', + // name: 'dnfhelper', + // component: () => import('@/pages/Dnfhelper/index.vue'), + // }, { path: '/character/:alter', redirect: (to) => {