add occupy action
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user