feat: 사령턴 대상 선택 정보를 보강

도시·수도 지도와 명령별 국가/장수 상세 목록을 추가한다.\nRef 금액 프리셋과 현재 조건 기반 우선 정렬을 예약 입력에 연결한다.
This commit is contained in:
2026-08-18 13:12:24 +00:00
parent e4c4bd946f
commit 7da67da40f
13 changed files with 1292 additions and 129 deletions
@@ -48,6 +48,7 @@ const props = defineProps<{
themeName: string;
mapScale: number;
selectOnly?: boolean;
readonly?: boolean;
}>();
const emit = defineEmits<{
@@ -143,7 +144,9 @@ const capitalIconStyle = computed(() => ({
height: `${10 * props.mapScale}px`,
}));
const selectCity = () => emit('select', props.city.id);
const selectCity = () => {
if (!props.readonly) emit('select', props.city.id);
};
const cityStateStyle = computed(() => ({
width: `${12 * props.mapScale}px`,
@@ -154,11 +157,20 @@ const cityStateStyle = computed(() => ({
<template>
<component
:is="props.selectOnly ? 'button' : RouterLink"
:is="props.readonly ? 'div' : props.selectOnly ? 'button' : RouterLink"
class="city-base"
:type="props.selectOnly ? 'button' : undefined"
:to="props.selectOnly ? undefined : { name: 'current-city', query: { cityId: props.city.id } }"
:class="[{ mine: props.city.isMyCity, selected: props.city.selected, 'supply-off': !props.city.supply }]"
:type="!props.readonly && props.selectOnly ? 'button' : undefined"
:to="
props.selectOnly || props.readonly ? undefined : { name: 'current-city', query: { cityId: props.city.id } }
"
:class="[
{
mine: props.city.isMyCity,
selected: props.city.selected,
'supply-off': !props.city.supply,
readonly: props.readonly,
},
]"
:style="cityBaseStyle"
@mouseenter="emit('hover', props.city.id)"
@mouseleave="emit('leave')"
@@ -195,6 +207,10 @@ const cityStateStyle = computed(() => ({
background: transparent;
}
.city-base.readonly {
cursor: default;
}
.city-bg {
position: absolute;
background-position: center;