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