fix: installVue3Components() 호출부 통일
This commit is contained in:
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
|
|
||||||
@include media-1000px{
|
@include media-1000px{
|
||||||
#container {
|
#app {
|
||||||
width: 1000px;
|
width: 1000px;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
#container {
|
#app {
|
||||||
width: 500px;
|
width: 500px;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -72,14 +72,9 @@
|
|||||||
</BContainer>
|
</BContainer>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
|
||||||
declare const queryValues: {
|
|
||||||
generalID: number | null;
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { BContainer, useToast, BFormSelect, BFormSelectOption, BButton } from "bootstrap-vue-next";
|
import { BContainer, useToast, BFormSelect, BFormSelectOption, BButton } from "bootstrap-vue-next";
|
||||||
import { onMounted, provide, ref, watch } from "vue";
|
import { onMounted, provide, ref, toRef, watch } from "vue";
|
||||||
import { getGameConstStore, type GameConstStore } from "./GameConstStore";
|
import { getGameConstStore, type GameConstStore } from "./GameConstStore";
|
||||||
import TopBackBar from "@/components/TopBackBar.vue";
|
import TopBackBar from "@/components/TopBackBar.vue";
|
||||||
import BottomBar from "@/components/BottomBar.vue";
|
import BottomBar from "@/components/BottomBar.vue";
|
||||||
@@ -98,6 +93,10 @@ import { parseTime } from "./util/parseTime";
|
|||||||
|
|
||||||
const toasts = unwrap(useToast());
|
const toasts = unwrap(useToast());
|
||||||
|
|
||||||
|
const props = defineProps<{
|
||||||
|
generalID?: number;
|
||||||
|
}>();
|
||||||
|
|
||||||
const generalList = ref(new Map<number, GeneralListItemP1>());
|
const generalList = ref(new Map<number, GeneralListItemP1>());
|
||||||
const textMap = {
|
const textMap = {
|
||||||
recent_war: [
|
recent_war: [
|
||||||
@@ -118,7 +117,7 @@ const orderedInvGeneralKeyIndex = ref(new Map<number, number>());
|
|||||||
|
|
||||||
const orderBy = ref<keyof typeof textMap>("turntime");
|
const orderBy = ref<keyof typeof textMap>("turntime");
|
||||||
const targetGeneral = ref<GeneralListItemP1>();
|
const targetGeneral = ref<GeneralListItemP1>();
|
||||||
const targetGeneralID = ref(queryValues.generalID ?? undefined);
|
const targetGeneralID = toRef(props, "generalID");
|
||||||
|
|
||||||
type GeneralLogs = {
|
type GeneralLogs = {
|
||||||
[key in GeneralLogType]: Map<number, string>;
|
[key in GeneralLogType]: Map<number, string>;
|
||||||
|
|||||||
@@ -10,11 +10,13 @@ import { insertCustomCSS } from "./util/customCSS";
|
|||||||
import { installVue3Components } from "./util/installVue3Components";
|
import { installVue3Components } from "./util/installVue3Components";
|
||||||
|
|
||||||
|
|
||||||
|
declare const query:{
|
||||||
|
generalID?: number;
|
||||||
|
};
|
||||||
|
|
||||||
auto500px();
|
auto500px();
|
||||||
|
|
||||||
htmlReady(() => {
|
htmlReady(() => {
|
||||||
insertCustomCSS();
|
insertCustomCSS();
|
||||||
});
|
});
|
||||||
installVue3Components(createApp(PageBattleCenter)).mount('#app');
|
installVue3Components(createApp(PageBattleCenter, query)).mount('#app');
|
||||||
@@ -1,7 +1,6 @@
|
|||||||
import "@scss/board.scss";
|
import "@scss/board.scss";
|
||||||
import { createApp } from 'vue'
|
import { createApp } from 'vue'
|
||||||
import PageBoard from '@/PageBoard.vue';
|
import PageBoard from '@/PageBoard.vue';
|
||||||
import BootstrapVueNext from 'bootstrap-vue-next'
|
|
||||||
import { setAxiosXMLHttpRequest } from '@util/setAxiosXMLHttpRequest';
|
import { setAxiosXMLHttpRequest } from '@util/setAxiosXMLHttpRequest';
|
||||||
import { auto500px } from "./util/auto500px";
|
import { auto500px } from "./util/auto500px";
|
||||||
import { insertCustomCSS } from "./util/customCSS";
|
import { insertCustomCSS } from "./util/customCSS";
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
import '@scss/processing.scss';
|
import '@scss/processing.scss';
|
||||||
|
|
||||||
import { unwrap } from "@util/unwrap";
|
import { unwrap } from "@util/unwrap";
|
||||||
import BootstrapVueNext from 'bootstrap-vue-next'
|
|
||||||
import Multiselect from 'vue-multiselect';
|
|
||||||
import { commandMap as GeneralActions } from "@/processing/General";
|
import { commandMap as GeneralActions } from "@/processing/General";
|
||||||
import { commandMap as NationActions } from '@/processing/Nation';
|
import { commandMap as NationActions } from '@/processing/Nation';
|
||||||
import { type App, createApp } from 'vue';
|
import { type App, createApp } from 'vue';
|
||||||
@@ -14,6 +12,7 @@ import { StoredActionsHelper } from './util/StoredActionsHelper';
|
|||||||
import type { ReserveCommandResponse } from './defs/API/Command';
|
import type { ReserveCommandResponse } from './defs/API/Command';
|
||||||
import { htmlReady } from './util/htmlReady';
|
import { htmlReady } from './util/htmlReady';
|
||||||
import { insertCustomCSS } from './util/customCSS';
|
import { insertCustomCSS } from './util/customCSS';
|
||||||
|
import { installVue3Components } from './util/installVue3Components';
|
||||||
|
|
||||||
declare const staticValues: {
|
declare const staticValues: {
|
||||||
serverNick: string,
|
serverNick: string,
|
||||||
@@ -100,13 +99,13 @@ if (app === undefined) {
|
|||||||
console.error(`모듈이 지정되지 않음`, entryInfo);
|
console.error(`모듈이 지정되지 않음`, entryInfo);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
const div = unwrap(document.querySelector('#container'));
|
const div = unwrap(document.querySelector('#app'));
|
||||||
div.addEventListener('customSubmit', (e: Event) => {
|
div.addEventListener('customSubmit', (e: Event) => {
|
||||||
const { detail } = e as unknown as CustomEvent<Args>;
|
const { detail } = e as unknown as CustomEvent<Args>;
|
||||||
void submitCommand(entryInfo[0] == 'Nation', turnList, entryInfo[1], detail);
|
void submitCommand(entryInfo[0] == 'Nation', turnList, entryInfo[1], detail);
|
||||||
}, true);
|
}, true);
|
||||||
|
|
||||||
app.use(BootstrapVueNext).component('v-multiselect', Multiselect).mount('#container');
|
installVue3Components(app).mount('#app');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ $gen = Util::getReq('gen', 'int');
|
|||||||
'mapName' => GameConst::$mapName,
|
'mapName' => GameConst::$mapName,
|
||||||
'unitSet' => GameConst::$unitSet,
|
'unitSet' => GameConst::$unitSet,
|
||||||
],
|
],
|
||||||
'queryValues' => [
|
'query' => [
|
||||||
'generalID' => $gen,
|
'generalID' => $gen,
|
||||||
]
|
]
|
||||||
], false) ?>
|
], false) ?>
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ if (!$commandObj->hasPermissionToReserve()) {
|
|||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body class="img_back">
|
<body class="img_back">
|
||||||
<div id="container"></div>
|
<div id="app"></div>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
Reference in New Issue
Block a user