添加列表及一键导入
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="w-100% h-100% main flex" :class="infoStore.infos?.alter">
|
||||
<div class="header">
|
||||
<calc-tabs route>
|
||||
<calc-tabs route :query="route.query">
|
||||
<calc-tab :value="`/character/equipment/${props.alter}`">装备设置</calc-tab>
|
||||
<calc-tab :value="`/character/skill/${props.alter}`">技能设置</calc-tab>
|
||||
<calc-tab :value="`/character/forge/${props.alter}`">打造设置</calc-tab>
|
||||
@@ -38,6 +38,10 @@
|
||||
<calc-dialog lazy header="技能导入" v-model:visible="importSkillVisible">
|
||||
<ImportSkillVue></ImportSkillVue>
|
||||
</calc-dialog>
|
||||
|
||||
<calc-dialog lazy header="助手打造导入" v-model:visible="helperImport">
|
||||
<ImportDnfhelper :alter="toImport" :uid="helperStore.helperInfo?.id"></ImportDnfhelper>
|
||||
</calc-dialog>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="Index">
|
||||
@@ -45,16 +49,22 @@ import { useInfoStore } from '@/stores/info'
|
||||
import { useConfigStore } from '@/stores'
|
||||
import ImportVue from './Config/import.vue'
|
||||
import ImportSkillVue from './Config/importSkill.vue'
|
||||
import ImportDnfhelper from './Config/importDnfhelper.vue'
|
||||
import Result from './Result/Index.vue'
|
||||
import { useDnfHelperStore } from '@/stores/dnfhelper.ts'
|
||||
import { type IHelperRoleInfo } from '@/api/info/type'
|
||||
const props = defineProps<{
|
||||
alter: string
|
||||
}>()
|
||||
const infoStore = useInfoStore()
|
||||
const configStore = useConfigStore()
|
||||
const helperImport = ref(false)
|
||||
const importVisible = ref(false)
|
||||
const importSkillVisible = ref(false)
|
||||
const helperStore = useDnfHelperStore()
|
||||
const toImport = ref<IHelperRoleInfo>()
|
||||
|
||||
const shouldWatch = ref(true)
|
||||
// const shouldWatch = ref(true)
|
||||
|
||||
const isExecuting = ref(false)
|
||||
|
||||
@@ -81,11 +91,22 @@ const showImport = () => {
|
||||
const showImportSkill = () => {
|
||||
importSkillVisible.value = true
|
||||
}
|
||||
|
||||
const route = useRoute()
|
||||
|
||||
onMounted(async () => {
|
||||
await infoStore.createCharacter(props.alter, '0')
|
||||
window.addEventListener('beforeunload', () => {
|
||||
configStore.saveConfig()
|
||||
})
|
||||
// 检测router的传参
|
||||
const { roleId } = route.query
|
||||
if (roleId) {
|
||||
toImport.value = helperStore.helperInfo?.roleList.find((a) => a.roleId === roleId)
|
||||
if (toImport.value) {
|
||||
helperImport.value = true
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
onUnmounted(() => {
|
||||
|
||||
Reference in New Issue
Block a user