add occupy action

This commit is contained in:
bridge
2025-12-10 22:48:52 +08:00
parent 5590b83487
commit a51f0a0ad2
6 changed files with 36 additions and 7 deletions

View File

@@ -2,6 +2,7 @@
import { ref } from 'vue';
import type { RegionDetail, EffectEntity } from '@/types/core';
import EntityRow from './components/EntityRow.vue';
import RelationRow from './components/RelationRow.vue';
import SecondaryPopup from './components/SecondaryPopup.vue';
import { useUiStore } from '@/stores/ui';
@@ -21,6 +22,10 @@ function showDetail(item: EffectEntity | undefined) {
function jumpToSect(id: number) {
uiStore.select('sect', id.toString());
}
function jumpToAvatar(id: string) {
uiStore.select('avatar', id);
}
</script>
<template>
@@ -49,6 +54,18 @@ function jumpToSect(id: number) {
</div>
</div>
<!-- Host (洞府主人) -->
<div class="section" v-if="data.type === 'cultivate'">
<div class="section-title">洞府主人</div>
<RelationRow
v-if="data.host"
:name="data.host.name"
meta="主人"
@click="jumpToAvatar(data.host.id)"
/>
<div v-else class="empty-hint">无主可占据</div>
</div>
<!-- Animals -->
<div class="section" v-if="data.animals?.length">
<div class="section-title">动物分布</div>
@@ -115,6 +132,12 @@ function jumpToSect(id: number) {
color: #88fdc4;
}
.empty-hint {
font-size: 12px;
color: #666;
font-style: italic;
}
.list {
display: flex;
flex-direction: column;