feat(WIP): 증여,헌납,백성동원,수몰,천도,초토화,허보
This commit is contained in:
@@ -0,0 +1,79 @@
|
||||
<template>
|
||||
<TopBackBar :title="commandName" type="chief" />
|
||||
<div class="bg0">
|
||||
<div>
|
||||
자신의 자금이나 군량을 국가 재산으로 헌납합니다.
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-2 col-md-1">
|
||||
자원 :
|
||||
<b-button-group>
|
||||
<b-button :pressed="isGold" @click="isGold = true">금</b-button>
|
||||
<b-button :pressed="!isGold" @click="isGold = false">쌀</b-button>
|
||||
</b-button-group>
|
||||
</div>
|
||||
<div class="col-6 col-md-4">
|
||||
금액 :
|
||||
<SelectAmount
|
||||
:amountGuide="amountGuide"
|
||||
v-model="amount"
|
||||
:maxAmount="maxAmount"
|
||||
:minAmount="minAmount"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-4 col-md-2 d-grid">
|
||||
<b-button variant="primary" @click="submit">{{ commandName }}</b-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<BottomBar :title="commandName" />
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import SelectAmount from "@/processing/SelectAmount.vue";
|
||||
import { defineComponent, ref } from "vue";
|
||||
import { unwrap } from "@/util/unwrap";
|
||||
import { Args } from "@/processing/args";
|
||||
import TopBackBar from "@/components/TopBackBar.vue";
|
||||
import BottomBar from "@/components/BottomBar.vue";
|
||||
declare const commandName: string;
|
||||
|
||||
declare const procRes: {
|
||||
minAmount: number;
|
||||
maxAmount: number;
|
||||
amountGuide: number[];
|
||||
};
|
||||
|
||||
export default defineComponent({
|
||||
components: {
|
||||
SelectAmount,
|
||||
TopBackBar,
|
||||
BottomBar,
|
||||
},
|
||||
setup() {
|
||||
const amount = ref(1000);
|
||||
const isGold = ref(true);
|
||||
|
||||
|
||||
async function submit(e: Event) {
|
||||
const event = new CustomEvent<Args>("customSubmit", {
|
||||
detail: {
|
||||
amount: amount.value,
|
||||
isGold: isGold.value,
|
||||
},
|
||||
});
|
||||
unwrap(e.target).dispatchEvent(event);
|
||||
}
|
||||
|
||||
return {
|
||||
amount,
|
||||
isGold,
|
||||
minAmount: ref(procRes.minAmount),
|
||||
maxAmount: ref(procRes.maxAmount),
|
||||
amountGuide: procRes.amountGuide,
|
||||
commandName,
|
||||
submit,
|
||||
};
|
||||
},
|
||||
});
|
||||
</script>
|
||||
@@ -2,12 +2,13 @@ import { default as che_건국 } from "./che_건국.vue";
|
||||
import { default as che_군량매매 } from "./che_군량매매.vue";
|
||||
import { default as che_등용 } from "./che_등용.vue";
|
||||
import { default as che_선양 } from "./che_선양.vue";
|
||||
|
||||
import { default as che_임관 } from "./che_임관.vue";
|
||||
import { default as che_장수대상임관 } from "./che_장수대상임관.vue";
|
||||
import { default as che_징병 } from "./che_징병.vue";
|
||||
import { default as che_헌납 } from "./che_헌납.vue";
|
||||
|
||||
import { default as ProcessCity } from "../ProcessCity.vue";
|
||||
import { default as ProcessGeneralAmount } from "../ProcessGeneralAmount.vue";
|
||||
|
||||
|
||||
//TODO: 자주 쓰는 녀석들은 Slot으로 변경
|
||||
@@ -24,20 +25,16 @@ export const commandMap: Record<string, typeof ProcessCity> = {
|
||||
che_임관,
|
||||
che_장수대상임관,
|
||||
che_징병,
|
||||
che_증여: ProcessGeneralAmount,
|
||||
che_첩보: ProcessCity,
|
||||
che_출병: ProcessCity,
|
||||
che_탈취: ProcessCity,
|
||||
che_파괴: ProcessCity,
|
||||
che_화계: ProcessCity,
|
||||
che_헌납,
|
||||
}
|
||||
|
||||
/*
|
||||
- 항목들
|
||||
장수/금쌀/분량 - 증여(포상 이식)
|
||||
금쌀/분량 - 헌납(군량매매 또는 포상 수정)
|
||||
|
||||
고유 양식 - 숙련전환, 장비매매
|
||||
|
||||
|
||||
|
||||
*/
|
||||
Reference in New Issue
Block a user