Rename components and register them
This commit is contained in:
parent
7c17166174
commit
da894b9669
4
components.d.ts
vendored
4
components.d.ts
vendored
@ -9,8 +9,6 @@ export {}
|
||||
|
||||
declare module '@vue/runtime-core' {
|
||||
export interface GlobalComponents {
|
||||
BattingSummaryTable: typeof import('./src/components/BattingSummaryTable.vue')['default']
|
||||
CareerBattingTable: typeof import('./src/components/CareerBattingTable.vue')['default']
|
||||
IconCommunity: typeof import('./src/components/icons/IconCommunity.vue')['default']
|
||||
IconDocumentation: typeof import('./src/components/icons/IconDocumentation.vue')['default']
|
||||
IconEcosystem: typeof import('./src/components/icons/IconEcosystem.vue')['default']
|
||||
@ -19,6 +17,8 @@ declare module '@vue/runtime-core' {
|
||||
LastFourGamesBattingTable: typeof import('./src/components/LastFourGamesBattingTable.vue')['default']
|
||||
NavBar: typeof import('./src/components/NavBar.vue')['default']
|
||||
NewsPreview: typeof import('./src/components/NewsPreview.vue')['default']
|
||||
PlayerBattingSummaryTable: typeof import('./src/components/PlayerBattingSummaryTable.vue')['default']
|
||||
PlayerCareerBattingTable: typeof import('./src/components/PlayerCareerBattingTable.vue')['default']
|
||||
RouterLink: typeof import('vue-router')['RouterLink']
|
||||
RouterView: typeof import('vue-router')['RouterView']
|
||||
StandingsTable: typeof import('./src/components/StandingsTable.vue')['default']
|
||||
|
||||
@ -74,7 +74,7 @@ import { aggregateBattingStats, type BattingStat } from '@/services/battingStats
|
||||
import type { PropType } from 'vue'
|
||||
|
||||
export default {
|
||||
name: "BattingSummaryTable",
|
||||
name: "PlayerBattingSummaryTable",
|
||||
props: {
|
||||
currentSeasonBatting: { type: Object as PropType<BattingStat>, required: false },
|
||||
currentPostSeasonBatting: { type: Object as PropType<BattingStat>, required: false },
|
||||
@ -112,7 +112,7 @@ interface BattingStatWithSeason extends BattingStat {
|
||||
}
|
||||
|
||||
export default {
|
||||
name: "CareerBattingTable",
|
||||
name: "PlayerCareerBattingTable",
|
||||
props: {
|
||||
regularSeasonBattingStats: { type: Array<BattingStat>, required: true },
|
||||
postSeasonBattingStats: { type: Array<BattingStat>, required: true }
|
||||
@ -37,7 +37,7 @@
|
||||
<h3>Summary</h3>
|
||||
</div>
|
||||
<!-- Batting Summary -->
|
||||
<BattingSummaryTable :current-season-batting="currentSeasonBatting"
|
||||
<PlayerBattingSummaryTable :current-season-batting="currentSeasonBatting"
|
||||
:current-post-season-batting="currentPostSeasonBatting"
|
||||
:regular-season-batting-stats="regularSeasonBattingStats" />
|
||||
<div class="col-sm-4">
|
||||
@ -65,7 +65,7 @@
|
||||
</div>
|
||||
|
||||
<!-- Career Batting -->
|
||||
<CareerBattingTable :regular-season-batting-stats="regularSeasonBattingStats"
|
||||
<PlayerCareerBattingTable :regular-season-batting-stats="regularSeasonBattingStats"
|
||||
:post-season-batting-stats="postSeasonBattingStats" />
|
||||
</div>
|
||||
</div>
|
||||
@ -78,8 +78,8 @@ import { type Player, fetchPlayerByName } from '@/services/playersService'
|
||||
import { fetchBattingStatsBySeasonAndPlayerId, fetchBattingStatsForLastFourGamesBySeasonAndPlayerId, type BattingStat } from '@/services/battingStatsService'
|
||||
import { CURRENT_SEASON, isNotUndefined } from '@/services/utilities'
|
||||
import LastFourGamesBattingTable from '@/components/LastFourGamesBattingTable.vue'
|
||||
import CareerBattingTable from '@/components/CareerBattingTable.vue'
|
||||
import BattingSummaryTable from '@/components/BattingSummaryTable.vue'
|
||||
import PlayerCareerBattingTable from '@/components/PlayerCareerBattingTable.vue'
|
||||
import PlayerBattingSummaryTable from '@/components/PlayerBattingSummaryTable.vue'
|
||||
|
||||
export default {
|
||||
name: "PlayerView",
|
||||
@ -93,6 +93,11 @@ export default {
|
||||
last4Games: [] as BattingStat[]
|
||||
}
|
||||
},
|
||||
components: {
|
||||
PlayerBattingSummaryTable,
|
||||
PlayerCareerBattingTable,
|
||||
LastFourGamesBattingTable
|
||||
},
|
||||
props: {
|
||||
seasonNumber: { type: Number, required: true },
|
||||
playerName: { type: String, required: true }
|
||||
|
||||
Loading…
Reference in New Issue
Block a user