refac: linter 관련 설정 변경 및 적용, map_theme 변수 제거

- eslint에 prettier 조합
- prettierrc에 width 120, tabWidth 2
- gameStor->map_theme 제거
- map_theme, mapTheme를 GameConst::$mapName으로 대체
- eslint에서 vue/vue3-essential 대신 vue3-recommended 적용
  - vue/max-attributes-per-line 완화
  - vue/v-on-event-hyphenation 해제
  - vue/attribute-hyphenation 해제
- 일부 tsc import type warning 해결
- 일부 vue template type warning 해결
- 일부 vue SFC를 script setup으로 변경
  - TipTap
  - TopBackBar
  - BottomBackBar
  - BoardArticle
  - ProcessCity
This commit is contained in:
2022-03-29 02:06:47 +09:00
parent e569ffe8f4
commit 4f4533e533
79 changed files with 4541 additions and 3020 deletions
+14 -26
View File
@@ -1,27 +1,21 @@
<template>
<BContainer id="container" :toast="{ root: true }" class="pageNationBetting bg0">
<TopBackBar :title="title" />
<BettingDetail
v-if="targetBettingID !== undefined"
:bettingID="targetBettingID"
@reqToast="addToast"
/>
<BettingDetail v-if="targetBettingID !== undefined" :bettingID="targetBettingID" @reqToast="addToast" />
<div v-if="bettingList === undefined">로딩 중...</div>
<div class="bettingList" v-else>
<div v-else class="bettingList">
<div class="bg2">베팅 목록</div>
<div
class="bettingItem"
v-for="info of Object.values(bettingList).reverse()"
:key="info.id"
class="bettingItem"
@click="targetBettingID = info.id"
>
[{{ parseYearMonth(info.openYearMonth)[0] }} {{ parseYearMonth(info.openYearMonth)[1] }}] {{ info.name }}
<span
v-if="info.finished"
>(종료)</span>
<span
v-else-if="(yearMonth ?? 0) <= info.closeYearMonth"
>({{ parseYearMonth(info.closeYearMonth)[0] }} {{ parseYearMonth(info.closeYearMonth)[1] }}월까지)</span>
<span v-if="info.finished">(종료)</span>
<span v-else-if="(yearMonth ?? 0) <= info.closeYearMonth"
>({{ parseYearMonth(info.closeYearMonth)[0] }} {{ parseYearMonth(info.closeYearMonth)[1] }}월까지)</span
>
<span v-else>(베팅 마감)</span>
</div>
</div>
@@ -44,27 +38,24 @@ import { BContainer, useToast } from "bootstrap-vue-3";
import { unwrap } from "./util/unwrap";
type BettingListResponse = ValidResponse & {
bettingList: Record<number, Omit<BettingInfo & { totalAmount: number }, 'candidates'>>,
year: number,
month: number,
bettingList: Record<number, Omit<BettingInfo & { totalAmount: number }, "candidates">>;
year: number;
month: number;
};
const toasts = unwrap(useToast());
const year = ref<number>();
const month = ref<number>();
const yearMonth = ref<number>();
const bettingList = ref<BettingListResponse['bettingList']>();
const bettingList = ref<BettingListResponse["bettingList"]>();
const targetBettingID = ref<number>();
function addToast(msg: ToastType) {
toasts.show(msg.content, msg.options);
}
console.log('시작!');
console.log("시작!");
onMounted(async () => {
try {
const result = await SammoAPI.Betting.GetBettingList<BettingListResponse>();
@@ -84,8 +75,5 @@ onMounted(async () => {
}
});
const title = '국가 베팅장';
</script>
const title = "국가 베팅장";
</script>