1
This commit is contained in:
@@ -4,6 +4,7 @@ import api from '@/api'
|
|||||||
import type { IAlterInfo } from '@/api/info/type'
|
import type { IAlterInfo } from '@/api/info/type'
|
||||||
import { getImageURL } from '@/utils/images'
|
import { getImageURL } from '@/utils/images'
|
||||||
import router from '@/router'
|
import router from '@/router'
|
||||||
|
import { useDialog } from '@/components/hooks/dialog'
|
||||||
|
|
||||||
function job_icon(child: IAlterInfo) {
|
function job_icon(child: IAlterInfo) {
|
||||||
return {
|
return {
|
||||||
@@ -13,7 +14,9 @@ function job_icon(child: IAlterInfo) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export default defineComponent(async () => {
|
export default defineComponent(async () => {
|
||||||
const ignores = ['empty']
|
// const ignores = ['empty']
|
||||||
|
|
||||||
|
const { show, close, randomId } = useDialog()
|
||||||
|
|
||||||
// 获取角色相关信息,判定是否开放
|
// 获取角色相关信息,判定是否开放
|
||||||
function choose_job(child: IAlterInfo) {
|
function choose_job(child: IAlterInfo) {
|
||||||
@@ -27,7 +30,28 @@ export default defineComponent(async () => {
|
|||||||
if (child.open) {
|
if (child.open) {
|
||||||
const options = child.options ?? []
|
const options = child.options ?? []
|
||||||
if (options.length > 0) {
|
if (options.length > 0) {
|
||||||
return
|
const id = randomId()
|
||||||
|
return await show({
|
||||||
|
id,
|
||||||
|
content: '请选择职业版本',
|
||||||
|
action: () => {
|
||||||
|
return (
|
||||||
|
<div class="flex items-center justify-around flex-wrap" style="width:200px">
|
||||||
|
{renderList(options, (option) => (
|
||||||
|
<calc-button
|
||||||
|
class="!w-40% !mb-2"
|
||||||
|
onClick={() => {
|
||||||
|
window.open('/character/' + (option.value || option.name), '_blank')
|
||||||
|
close(id, 'ok')
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{option.title}
|
||||||
|
</calc-button>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
},
|
||||||
|
})
|
||||||
} else {
|
} else {
|
||||||
return window.open('/character/' + (child.value || child.name), '_blank')
|
return window.open('/character/' + (child.value || child.name), '_blank')
|
||||||
}
|
}
|
||||||
@@ -110,6 +134,7 @@ export default defineComponent(async () => {
|
|||||||
class="flex flex-col"
|
class="flex flex-col"
|
||||||
style={`position: absolute;top: ${30 + 82 * 0}px;left: 800px;width: 160px;height: 150px;`}
|
style={`position: absolute;top: ${30 + 82 * 0}px;left: 800px;width: 160px;height: 150px;`}
|
||||||
onClick={() => router.push({ path: '/dnfhelper' })}
|
onClick={() => router.push({ path: '/dnfhelper' })}
|
||||||
|
v-show={false}
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
class="w-70px h-50px bg-no-repeat"
|
class="w-70px h-50px bg-no-repeat"
|
||||||
|
|||||||
@@ -9,11 +9,11 @@ const routes: RouteRecordRaw[] = [
|
|||||||
name: 'home',
|
name: 'home',
|
||||||
component: () => import('@/pages/Home/Index.vue'),
|
component: () => import('@/pages/Home/Index.vue'),
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
path: '/dnfhelper',
|
// path: '/dnfhelper',
|
||||||
name: 'dnfhelper',
|
// name: 'dnfhelper',
|
||||||
component: () => import('@/pages/Dnfhelper/index.vue'),
|
// component: () => import('@/pages/Dnfhelper/index.vue'),
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
path: '/character/:alter',
|
path: '/character/:alter',
|
||||||
redirect: (to) => {
|
redirect: (to) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user