Show/hide bullpen
This commit is contained in:
parent
1bc05eccc0
commit
a7e1f4a755
@ -1,7 +1,14 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="bullpen-table">
|
<div class="bullpen-table">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<h3>Bullpen</h3>
|
<h3>Bullpen
|
||||||
|
<button @click.stop="setVisiblity(!showBullpen)"
|
||||||
|
class="btn btn-sm btn-primary mb-2">
|
||||||
|
{{ showBullpen ? 'Hide' : 'Show' }}
|
||||||
|
</button>
|
||||||
|
</h3>
|
||||||
|
</div>
|
||||||
|
<div class="row" v-if="showBullpen">
|
||||||
<div class="table-responsive-xl">
|
<div class="table-responsive-xl">
|
||||||
<table class="table table-sm table-striped">
|
<table class="table table-sm table-striped">
|
||||||
<thead class="thead-dark">
|
<thead class="thead-dark">
|
||||||
@ -68,7 +75,8 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
pitcherStatsByNameWeekGame: {} as Record<string, PitchingStat>,
|
pitcherStatsByNameWeekGame: {} as Record<string, PitchingStat>,
|
||||||
sortedPlayers: [] as Player[]
|
sortedPlayers: [] as Player[],
|
||||||
|
showBullpen: false as boolean
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
@ -111,6 +119,9 @@ export default {
|
|||||||
if (!stat) return '-'
|
if (!stat) return '-'
|
||||||
|
|
||||||
return `${stat.ip.toFixed(1)}IP`
|
return `${stat.ip.toFixed(1)}IP`
|
||||||
|
},
|
||||||
|
setVisiblity(state: boolean): void {
|
||||||
|
this.showBullpen = state
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user