feat(wip): 세력장수 추가작업, 병종 등
This commit is contained in:
@@ -6,10 +6,13 @@
|
||||
v-if="colValue.iActionMap"
|
||||
v-b-tooltip.hover
|
||||
class="col"
|
||||
:title="colValue.iActionMap[params.data[colValue.target ] as string ].info??''"
|
||||
:title="colValue.iActionMap[params.data[colValue.target] as string ].info??''"
|
||||
>
|
||||
{{ colValue.iActionMap[params.data[colValue.target] as string ].name }}
|
||||
</div>
|
||||
<div v-else-if="colValue.converter" v-b-tooltip.hover class="col" :title="colValue.converter(params.data)[1] ?? ''">
|
||||
{{colValue.converter(params.data)[0]}}
|
||||
</div>
|
||||
<div v-else v-b-tooltip.hover class="col" :title="colValue.info ?? ''">
|
||||
{{params.data[colValue.target] as string}}
|
||||
</div>
|
||||
@@ -18,21 +21,26 @@
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import type { GeneralListItem } from "@/defs/API/Nation";
|
||||
<script lang="ts">
|
||||
import type { GeneralListItemP2 } from "@/defs/API/Nation";
|
||||
import type { GameIActionInfo } from "@/defs/GameObj";
|
||||
import type { CellClassParams } from "ag-grid-community";
|
||||
import type { PropType } from "vue";
|
||||
|
||||
interface GenCellClassParams extends CellClassParams {
|
||||
data: GeneralListItem;
|
||||
}
|
||||
|
||||
type GridCellInfo = {
|
||||
//제일 큰 타입 기준
|
||||
export type GridCellInfo = {
|
||||
iActionMap?: Record<string, GameIActionInfo>;
|
||||
info?: string;
|
||||
target: keyof GeneralListItem;
|
||||
converter?: (value: GeneralListItemP2)=>[string, string?],
|
||||
target: keyof GeneralListItemP2;
|
||||
};
|
||||
</script>
|
||||
<script lang="ts" setup>
|
||||
import type { PropType } from "vue";
|
||||
interface GenCellClassParams extends CellClassParams {
|
||||
data: GeneralListItemP2;
|
||||
}
|
||||
|
||||
|
||||
|
||||
const props = defineProps({
|
||||
params: {
|
||||
|
||||
Reference in New Issue
Block a user