feat(wip): gameConstStore inject

This commit is contained in:
2022-04-07 03:03:38 +09:00
parent d456504225
commit b714c7dff1
2 changed files with 22 additions and 8 deletions
+6 -1
View File
@@ -21,7 +21,7 @@
<script lang="ts" setup>
import type { GeneralListItem, GeneralListItemP2 } from "@/defs/API/Nation";
import { getIconPath } from "@/util/getIconPath";
import { ref, watch, type PropType, type StyleValue } from "vue";
import { inject, ref, watch, type PropType, type Ref, type StyleValue } from "vue";
import { AgGridVue } from "ag-grid-vue3";
import type {
CellClassParams,
@@ -38,6 +38,8 @@ import type {
BaseWithValueColDefParams,
ValueGetterParams,
} from "ag-grid-community/dist/lib/entities/colDef";
import type { GameConstStore } from "@/GameConstStore";
import { unwrap } from "@/util/unwrap";
const props = defineProps({
list: {
@@ -52,6 +54,9 @@ const props = defineProps({
},
});
const gameConstStore = unwrap(inject<Ref<GameConstStore>>('gameConstStore'));
const iActionInfo = gameConstStore.value.iActionInfo;
console.log(iActionInfo);
//debug
console.log(`list`, props.list);