feat: Vue3로 새롭게 작성한 메인 페이지 #229

Merged
Hide_D merged 61 commits from ng_main into devel 2023-03-09 02:25:31 +09:00
Showing only changes of commit d0d9c0b769 - Show all commits
+18
View File
@@ -65,6 +65,9 @@
:imagePath="imagePath"
:formatCityInfo="formatCityInfoText"
:mapData="map"
:disallowClick="false"
:genHref="genMapCityHref"
@city-click="onCityClick"
/>
</div>
<div class="reservedCommandZone">예턴</div>
@@ -378,6 +381,21 @@ const cityPosition = getCityPosition();
const formatCityInfoText = formatCityInfo;
const imagePath = window.pathConfig.gameImage;
function genMapCityHref(cityID: number){
return `b_currentCity.php?citylist=${cityID}`;
}
function onCityClick(city: MapCityParsed, $event: MouseEvent | TouchEvent): void {
if (city.id === 0) {
return;
}
if ($event.ctrlKey) {
window.open(genMapCityHref(city.id), "_blank");
return;
}
window.location.href = genMapCityHref(city.id);
}
watch(refreshCounter, async () => {
try {
map.value = await SammoAPI.Global.GetMap({