dev
This commit is contained in:
@@ -12,7 +12,6 @@
|
|||||||
<title>DNF计算器</title>
|
<title>DNF计算器</title>
|
||||||
<script async src="https://www.googletagmanager.com/gtag/js?id=G-J0NPDEYQJS"></script>
|
<script async src="https://www.googletagmanager.com/gtag/js?id=G-J0NPDEYQJS"></script>
|
||||||
<script>
|
<script>
|
||||||
if (!window.pywebview) {
|
|
||||||
// 百度统计
|
// 百度统计
|
||||||
// eslint-disable-next-line vars-on-top, no-var
|
// eslint-disable-next-line vars-on-top, no-var
|
||||||
var _hmt = _hmt || []
|
var _hmt = _hmt || []
|
||||||
@@ -29,7 +28,6 @@
|
|||||||
}
|
}
|
||||||
gtag('js', new Date())
|
gtag('js', new Date())
|
||||||
gtag('config', 'G-J0NPDEYQJS')
|
gtag('config', 'G-J0NPDEYQJS')
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|||||||
@@ -19,6 +19,10 @@ export default defineComponent({
|
|||||||
},
|
},
|
||||||
icon: {
|
icon: {
|
||||||
type: String
|
type: String
|
||||||
|
},
|
||||||
|
type: {
|
||||||
|
type: String,
|
||||||
|
default: "primary"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
setup(props, { slots }) {
|
setup(props, { slots }) {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<script lang="tsx">
|
<script lang="tsx">
|
||||||
import { selectionListEmits, selectionListProps } from "hoci"
|
import { selectionEmits, selectionProps } from "hoci"
|
||||||
import type { CSSProperties, PropType } from "vue";
|
import type { CSSProperties, PropType } from "vue";
|
||||||
import { Teleport, Transition, computed, defineComponent, onDeactivated, ref, watch } from "vue"
|
import { Teleport, Transition, computed, defineComponent, onDeactivated, ref, watch } from "vue"
|
||||||
|
|
||||||
@@ -15,7 +15,7 @@ interface ICascaderItem {
|
|||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: "ICascader",
|
name: "ICascader",
|
||||||
props: {
|
props: {
|
||||||
...selectionListProps,
|
...selectionProps,
|
||||||
disabled: {
|
disabled: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
@@ -37,7 +37,7 @@ export default defineComponent({
|
|||||||
default: () => []
|
default: () => []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
emits: [...selectionListEmits, "select"],
|
emits: [...selectionEmits, "select"],
|
||||||
setup(props, { emit }) {
|
setup(props, { emit }) {
|
||||||
const modelValue = useVModel(props, "modelValue")
|
const modelValue = useVModel(props, "modelValue")
|
||||||
|
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
<script lang="tsx">
|
<script lang="tsx">
|
||||||
import { defineComponent, provide } from "vue"
|
import { defineComponent, provide } from "vue"
|
||||||
import { selectionListEmits, selectionListProps, useSelectionList } from "hoci"
|
import { selectionEmits, selectionProps, useSelectionList } from "hoci"
|
||||||
import { CHECKBOX_GROUP } from "../shared"
|
import { CHECKBOX_GROUP } from "../shared"
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: "ICheckboxGroup",
|
name: "ICheckboxGroup",
|
||||||
components: {},
|
components: {},
|
||||||
props: {
|
props: {
|
||||||
...selectionListProps,
|
...selectionProps,
|
||||||
activeClass: {
|
activeClass: {
|
||||||
type: String,
|
type: String,
|
||||||
default: "checked"
|
default: "checked"
|
||||||
@@ -21,7 +21,7 @@ export default defineComponent({
|
|||||||
default: true
|
default: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
emits: [...selectionListEmits],
|
emits: [...selectionEmits],
|
||||||
|
|
||||||
setup(props, context) {
|
setup(props, context) {
|
||||||
provide(CHECKBOX_GROUP, true)
|
provide(CHECKBOX_GROUP, true)
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<script lang="tsx">
|
<script lang="tsx">
|
||||||
import type { EmitsOptions, SetupContext } from "vue";
|
import type { EmitsOptions, SetupContext } from "vue";
|
||||||
import { computed, defineComponent, inject, nextTick, renderSlot } from "vue"
|
import { computed, defineComponent, inject, nextTick, renderSlot } from "vue"
|
||||||
import { selectionItemProps, switchEmits, switchProps, useSelectionItem, useSwitch } from "hoci"
|
import { selectionProps, switchEmits, switchProps, useSelectionItem, useSwitch } from "hoci"
|
||||||
import { CHECKBOX_GROUP } from "../shared"
|
import { CHECKBOX_GROUP } from "../shared"
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
@@ -9,7 +9,7 @@ export default defineComponent({
|
|||||||
components: {},
|
components: {},
|
||||||
props: {
|
props: {
|
||||||
...switchProps,
|
...switchProps,
|
||||||
...selectionItemProps,
|
...selectionProps,
|
||||||
label: {
|
label: {
|
||||||
type: String
|
type: String
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<script lang="tsx">
|
<script lang="tsx">
|
||||||
import { selectionListEmits, selectionListProps, useSelectionList } from "hoci"
|
import { selectionEmits, selectionProps, useSelectionList } from "hoci"
|
||||||
import type { CSSProperties, PropType, RendererElement } from "vue";
|
import type { CSSProperties, PropType, RendererElement } from "vue";
|
||||||
import { Teleport, Transition, computed, defineComponent, onDeactivated, ref, renderSlot, watch } from "vue"
|
import { Teleport, Transition, computed, defineComponent, onDeactivated, ref, renderSlot, watch } from "vue"
|
||||||
|
|
||||||
@@ -8,7 +8,7 @@ import { onClickOutside } from "@vueuse/core"
|
|||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: "IIconselect",
|
name: "IIconselect",
|
||||||
props: {
|
props: {
|
||||||
...selectionListProps,
|
...selectionProps,
|
||||||
disabled: {
|
disabled: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
@@ -29,7 +29,7 @@ export default defineComponent({
|
|||||||
default: "body"
|
default: "body"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
emits: selectionListEmits,
|
emits: selectionEmits,
|
||||||
setup(props, context) {
|
setup(props, context) {
|
||||||
// props.itemClass = "i-select-dropdown-item"
|
// props.itemClass = "i-select-dropdown-item"
|
||||||
// const { active } = useSelectionList({ ...props, itemClass: "i-select-dropdown-item" }, context)
|
// const { active } = useSelectionList({ ...props, itemClass: "i-select-dropdown-item" }, context)
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<script lang="tsx">
|
<script lang="tsx">
|
||||||
import { selectionListEmits, selectionListProps, useSelectionList } from "hoci"
|
import { selectionEmits, selectionProps, useSelectionList } from "hoci"
|
||||||
import type { CSSProperties, PropType, RendererElement } from "vue";
|
import type { CSSProperties, PropType, RendererElement } from "vue";
|
||||||
import { Teleport, Transition, computed, defineComponent, onDeactivated, ref, renderList, renderSlot, watch } from "vue"
|
import { Teleport, Transition, computed, defineComponent, onDeactivated, ref, renderList, renderSlot, watch } from "vue"
|
||||||
|
|
||||||
@@ -9,7 +9,7 @@ import { classPropType, labelPropType } from "@/components/hooks/types"
|
|||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: "ISelect",
|
name: "ISelect",
|
||||||
props: {
|
props: {
|
||||||
...selectionListProps,
|
...selectionProps,
|
||||||
disabled: {
|
disabled: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
@@ -41,7 +41,7 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
emits: [...selectionListEmits],
|
emits: [...selectionEmits],
|
||||||
setup(props, context) {
|
setup(props, context) {
|
||||||
const modelValue = useVModel(props, "modelValue", context.emit, { passive: true })
|
const modelValue = useVModel(props, "modelValue", context.emit, { passive: true })
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
<script lang="tsx">
|
<script lang="tsx">
|
||||||
import { defineComponent, renderSlot } from "vue"
|
import { defineComponent, renderSlot } from "vue"
|
||||||
import { HiItem, selectionItemProps } from "hoci"
|
import { HiItem, selectionProps } from "hoci"
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: "CalcTab",
|
name: "CalcTab",
|
||||||
props: {
|
props: {
|
||||||
...selectionItemProps
|
...selectionProps
|
||||||
},
|
},
|
||||||
setup(props, { slots }) {
|
setup(props, { slots }) {
|
||||||
return () => {
|
return () => {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<script lang="tsx">
|
<script lang="tsx">
|
||||||
import { HiSelection, selectionListProps } from "hoci"
|
import { HiSelection, selectionProps } from "hoci"
|
||||||
import type { PropType } from "vue";
|
import type { PropType } from "vue";
|
||||||
import { computed, defineComponent, renderSlot } from "vue"
|
import { computed, defineComponent, renderSlot } from "vue"
|
||||||
import type { LocationQuery } from "vue-router";
|
import type { LocationQuery } from "vue-router";
|
||||||
@@ -9,7 +9,7 @@ import type { BaseType } from "@/components/hooks/types"
|
|||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: "CalcTabs",
|
name: "CalcTabs",
|
||||||
props: {
|
props: {
|
||||||
...selectionListProps,
|
...selectionProps,
|
||||||
vertical: {
|
vertical: {
|
||||||
type: Boolean
|
type: Boolean
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<script lang="tsx">
|
<script lang="tsx">
|
||||||
import { HiSelection, selectionListProps } from "hoci"
|
import { HiSelection, selectionProps } from "hoci"
|
||||||
import { useVModel } from "@vueuse/core"
|
import { useVModel } from "@vueuse/core"
|
||||||
import type { PropType } from "vue";
|
import type { PropType } from "vue";
|
||||||
import { computed, defineComponent, renderList, watch } from "vue"
|
import { computed, defineComponent, renderList, watch } from "vue"
|
||||||
@@ -10,7 +10,7 @@ import { labelPropType, valuePropType } from "@/components/hooks/types"
|
|||||||
const Tree = defineComponent({
|
const Tree = defineComponent({
|
||||||
name: "CalcTree",
|
name: "CalcTree",
|
||||||
props: {
|
props: {
|
||||||
...selectionListProps,
|
...selectionProps,
|
||||||
modelValue: {
|
modelValue: {
|
||||||
type: valuePropType,
|
type: valuePropType,
|
||||||
default: () => null
|
default: () => null
|
||||||
|
|||||||
@@ -0,0 +1,29 @@
|
|||||||
|
<template>
|
||||||
|
<div class="flex flex-col gap-20px mx-10px">
|
||||||
|
<Weapon></Weapon>
|
||||||
|
<Suit></Suit>
|
||||||
|
<Universal></Universal>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" setup name="Index">
|
||||||
|
import { useInfoStore } from '@/stores/info'
|
||||||
|
import { getImageURL } from '@/utils/images'
|
||||||
|
import Suit from './components/Suit.vue'
|
||||||
|
import Weapon from './components/Weapon.vue'
|
||||||
|
import Universal from './components/Universal.vue'
|
||||||
|
import { useConfigStore } from '@/stores'
|
||||||
|
const props = defineProps<{
|
||||||
|
alter: string
|
||||||
|
}>()
|
||||||
|
const infoStore = useInfoStore()
|
||||||
|
const configStore = useConfigStore()
|
||||||
|
|
||||||
|
onMounted(async () => {
|
||||||
|
await infoStore.createCharacter(props.alter, '0')
|
||||||
|
configStore.loadConfig()
|
||||||
|
window.addEventListener('beforeunload', () => {
|
||||||
|
configStore.saveConfig()
|
||||||
|
})
|
||||||
|
})
|
||||||
|
</script>
|
||||||
@@ -1,27 +1,19 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="w-100% h-100% main" :class="props.alter.split('.').slice(-1)">
|
<div class="w-100% h-100% main" :class="props.alter.split('.').slice(-1)">
|
||||||
<div class="header"></div>
|
<div class="header">
|
||||||
|
<calc-tabs route>
|
||||||
|
<calc-tab :value="`/character/equipment/${props.alter}`">装备设置</calc-tab>
|
||||||
|
<calc-tab :value="`/character/skill/${props.alter}`">技能设置</calc-tab>
|
||||||
|
</calc-tabs>
|
||||||
|
</div>
|
||||||
<div class="content flex">
|
<div class="content flex">
|
||||||
<div class="flex flex-col gap-20px mx-10px">
|
<RouterView></RouterView>
|
||||||
<Weapon></Weapon>
|
|
||||||
<Suit></Suit>
|
|
||||||
<Universal></Universal>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="h-90vh w-auto overflow-y-auto overflow-x-hidden">
|
|
||||||
<SkillTree :skills="infoStore.skills" :lvInfo="configStore.config?.skills"></SkillTree>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup name="Index">
|
<script lang="ts" setup name="Index">
|
||||||
import { useInfoStore } from '@/stores/info'
|
import { useInfoStore } from '@/stores/info'
|
||||||
import { getImageURL } from '@/utils/images'
|
|
||||||
import SkillTree from './Skill/SkillTree/index'
|
|
||||||
import Suit from './Equipment/Suit.vue'
|
|
||||||
import Weapon from './Equipment/Weapon.vue'
|
|
||||||
import Universal from './Equipment/Universal.vue'
|
|
||||||
import { useConfigStore } from '@/stores'
|
import { useConfigStore } from '@/stores'
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
alter: string
|
alter: string
|
||||||
|
|||||||
@@ -0,0 +1,19 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<div class="h-90vh w-auto overflow-y-auto overflow-x-hidden">
|
||||||
|
<SkillTree :skills="infoStore.skills" :lvInfo="configStore.config?.skills"></SkillTree>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
|
||||||
|
<script lang="ts" setup name="Index">
|
||||||
|
import { useInfoStore } from '@/stores/info'
|
||||||
|
import SkillTree from './components/SkillTree/index'
|
||||||
|
import { useConfigStore } from '@/stores'
|
||||||
|
const props = defineProps<{
|
||||||
|
alter: string
|
||||||
|
}>()
|
||||||
|
const infoStore = useInfoStore()
|
||||||
|
const configStore = useConfigStore()
|
||||||
|
</script>
|
||||||
@@ -36,7 +36,7 @@ export default defineComponent(async () => {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
return window.open("/character/" + (child.class || child.name),"_self")
|
return window.open("/character/" + (child.class || child.name),"_blank")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import { createRouter, createWebHistory, type RouteRecordRaw } from 'vue-router'
|
import { createRouter, createWebHistory, type RouteRecordRaw } from 'vue-router'
|
||||||
const routes: RouteRecordRaw[] = [
|
const routes: RouteRecordRaw[] = [
|
||||||
{
|
// {
|
||||||
path: '/:pathMatch(.*)',
|
// path: '/:pathMatch(.*)',
|
||||||
redirect: '/',
|
// redirect: '/',
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
path: '/',
|
path: '/',
|
||||||
name: 'home',
|
name: 'home',
|
||||||
@@ -11,9 +11,25 @@ const routes: RouteRecordRaw[] = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
path:'/character/:alter',
|
path:'/character/:alter',
|
||||||
name:'character',
|
redirect: (to) => {
|
||||||
|
return { path: `/character/equipment/${to.params.alter}` }
|
||||||
|
},
|
||||||
props: true,
|
props: true,
|
||||||
|
name:'character',
|
||||||
component: defineAsyncComponent(() => import('@/pages/Character/Index.vue')),
|
component: defineAsyncComponent(() => import('@/pages/Character/Index.vue')),
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: '/character/equipment/:alter',
|
||||||
|
name: 'equipment',
|
||||||
|
props: true,
|
||||||
|
component: defineAsyncComponent(() => import('@/pages/Character/Equipment/Index.vue')),
|
||||||
|
},{
|
||||||
|
path: '/character/skill/:alter',
|
||||||
|
name: 'skill',
|
||||||
|
props: true,
|
||||||
|
component: defineAsyncComponent(() => import('@/pages/Character/Skill/index.vue')),
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user