This commit is contained in:
2026-08-11 18:31:10 +08:00
parent ad55847d33
commit f65dc0a928
12 changed files with 102 additions and 68 deletions
@@ -25,11 +25,9 @@ export default defineComponent({
class="i-loading-spin"
version="1.1"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
width="200px"
height="200px"
viewBox="0 0 200 200"
xml:space="preserve"
>
<g>
<linearGradient
+6 -6
View File
@@ -1,7 +1,7 @@
<script lang="tsx">
import { HiSelection, selectionProps } from 'hoci'
import type { PropType } from 'vue'
import { computed, defineComponent, renderSlot } from 'vue'
import { computed, defineComponent, normalizeClass, renderSlot } from 'vue'
import type { LocationQuery } from 'vue-router'
import { parseQuery, useRouter } from 'vue-router'
import type { BaseType } from '@/components/hooks/types'
@@ -54,7 +54,7 @@ export default defineComponent({
v-model={modelValue.value}
class={{ 'i-tabs': true, vertical: !!props.vertical }}
activeClass="active"
itemClass={['i-tab cursor-pointer'].concat(props.itemClass)}
itemClass={normalizeClass(['i-tab cursor-pointer', props.itemClass])}
>
{renderSlot(slots, 'default')}
</HiSelection>
@@ -99,7 +99,7 @@ export default defineComponent({
// font-size: 12px;
margin-left: 1px;
width: fit-content;
padding:0px 10px;
padding: 0px 10px;
padding-bottom: 2px;
height: 20px;
text-align: center;
@@ -132,9 +132,9 @@ export default defineComponent({
// color: #ffb400;
}
&.disabled{
filter: grayscale(100%);
cursor: not-allowed;
&.disabled {
filter: grayscale(100%);
cursor: not-allowed;
}
}
}
+10 -8
View File
@@ -5,6 +5,7 @@ import { Transition, computed, defineComponent, ref, renderList } from 'vue'
import type { TreeNode } from './types'
const NTreeNode = defineComponent({
emits: ['select'],
props: {
label: {
type: String,
@@ -56,15 +57,16 @@ const NTreeNode = defineComponent({
value={props.value}
style={depthStyle.value}
class="flex i-tree-item-label items-center"
onClick={open}
>
<div class="top-0 right-0 bottom-0 left-0 absolute i-tree-item-active-mask"></div>
<div class="top-0 right-0 bottom-0 left-0 absolute i-tree-item-mask"></div>
<calc-button
v-show={props.children?.length}
icon={isOpen.value ? 'collapse-up' : 'collapse-down'}
></calc-button>
<div class="pl-1">{props.label}</div>
<div style="display: contents" onClick={open}>
<div class="top-0 right-0 bottom-0 left-0 absolute i-tree-item-active-mask"></div>
<div class="top-0 right-0 bottom-0 left-0 absolute i-tree-item-mask"></div>
<calc-button
v-show={props.children?.length}
icon={isOpen.value ? 'collapse-up' : 'collapse-down'}
></calc-button>
<div class="pl-1">{props.label}</div>
</div>
</HiItem>
<Transition name="dropdown" mode="out-in">
<div v-show={isOpen.value}>
@@ -22,11 +22,9 @@
<calc-tabs v-model="stoneTab" class="!mb-2">
<calc-tab :value="0">套装</calc-tab>
<calc-tab :value="1">通宝</calc-tab>
<calc-tab :value="2">其他</calc-tab>
</calc-tabs>
<Stone v-show="stoneTab == 0"></Stone>
<StoneUniversal v-show="stoneTab == 1"></StoneUniversal>
<StoneOld v-show="stoneTab == 2"></StoneOld>
</calc-collapse>
</div>
</template>
@@ -37,7 +35,6 @@ import Weapon from './components/Weapon.vue'
import Stone from './components/Stone.vue'
import Universal from './components/Universal.vue'
import StoneUniversal from './components/StoneUniversal.vue'
import StoneOld from './components/StoneOld.vue'
import Else from './components/Else.vue'
import { useInfoStore } from '@/stores'
import SubWeapon from './components/SubWeapon.vue'
@@ -68,7 +68,7 @@ const suits = computed(() => {
})
const suitEquipments = computed(() => {
const equs = infoStore.stones.filter(
const equs = infoStore.oaths.filter(
(a) => a.suit.includes(curSuit.value.toString()) && a.suit.length === 1,
)
@@ -15,7 +15,6 @@
<script lang="ts" setup StoneUniversal>
import type { IEquipment } from '@/api/info/type'
import { useConfigStore, useInfoStore } from '@/stores'
import { getImageURL } from '@/utils/images'
import EquipmentIcon from '@/components/dnf/Equipment/Icon/index.vue'
const props = defineProps<{
@@ -27,7 +26,7 @@ const infoStore = useInfoStore()
const configStore = useConfigStore()
const equs = computed(() => {
const items = infoStore.stones.filter((equip) => equip.categorize.includes('通宝'))
const items = infoStore.oaths.filter((equip) => equip.categorize.includes('通宝'))
const res: (IEquipment | undefined)[] = []
const raritiyList = ['神器', '史诗']
const categorize = Array.from(new Set(items.map((item) => item.categorize)))
+5 -3
View File
@@ -1,4 +1,6 @@
export function resolveTeleportTarget(target?: string | Element | null) {
import type { RendererElement } from 'vue'
export function resolveTeleportTarget(target?: string | RendererElement | null) {
if (typeof window === 'undefined') {
return null
}
@@ -7,10 +9,10 @@ export function resolveTeleportTarget(target?: string | Element | null) {
return document.querySelector(target)
}
return target ?? document.body
return target instanceof Element ? target : document.body
}
export function getElementZoom(target?: string | Element | null) {
export function getElementZoom(target?: string | RendererElement | null) {
if (typeof window === 'undefined') {
return 1
}