fix: 국가 선택 버그 수정, 몰수 type warning 제거

This commit is contained in:
2021-12-21 21:55:05 +09:00
parent be5dc42eb1
commit 80d7ad8789
3 changed files with 8 additions and 4 deletions
+2
View File
@@ -4,6 +4,8 @@ import { default as che_등용} from "./che_등용.vue";
import { default as CityProcess} from "./che_이동.vue";
import { default as che_징병} from "./che_징병.vue";
//TODO: 자주 쓰는 녀석들은 Slot으로 변경
export const commandMap: Record<string, typeof CityProcess> = {
che_강행: CityProcess,
che_군량매매,
+3 -3
View File
@@ -54,7 +54,7 @@ import BottomBar from "@/components/BottomBar.vue";
import {
convertGeneralList,
procGeneralItem,
procGeneralKeyList,
procGeneralKey,
procGeneralRawItemList,
} from "../processingRes";
import { getNpcColor } from "@/common_legacy";
@@ -64,7 +64,7 @@ declare const procRes: {
distanceList: Record<number, number[]>;
cities: [number, string][];
generals: procGeneralRawItemList;
generalsKey: procGeneralKeyList;
generalsKey: procGeneralKey[];
minAmount: number;
maxAmount: number;
amountGuide: number[];
@@ -103,7 +103,7 @@ export default defineComponent({
const name = nameColor
? `<span style="color:${nameColor}">${gen.name}</span>`
: gen.name;
return `${name} (금${gen.gold.toLocaleString()}/쌀${gen.rice.toLocaleString()}) (${
return `${name} (금${unwrap(gen.gold).toLocaleString()}/쌀${unwrap(gen.rice).toLocaleString()}) (${
gen.leadership
}/${gen.leadership}/${gen.intel})`;
}
@@ -51,7 +51,6 @@ import TopBackBar from "@/components/TopBackBar.vue";
import BottomBar from "@/components/BottomBar.vue";
import { procNationItem, procNationList } from "../processingRes";
declare const mapTheme: string;
declare const currentNation: number;
declare const commandName: string;
declare const procRes: {
@@ -81,6 +80,7 @@ export default defineComponent({
}
const selectedNationID = ref(procRes.nations[0].id);
const selectedCityObj = ref();//mapping용
function selectedNation(nationID: number) {
selectedNationID.value = nationID;
@@ -96,8 +96,10 @@ export default defineComponent({
}
return {
startYear: procRes.startYear,
mapTheme: ref(mapTheme),
nations: ref(nations),
selectedCityObj,
selectedNationID,
commandName,
selectedNation,