mirror of
https://github.com/ThatGuySam/doesitarm.git
synced 2026-05-18 06:44:46 -07:00
Add custom summary prop
This commit is contained in:
parent
c5a3bfbbf2
commit
f3e0125c6e
1 changed files with 18 additions and 3 deletions
|
|
@ -6,8 +6,8 @@
|
||||||
<slot name="before-search">
|
<slot name="before-search">
|
||||||
<div class="list-summary-wrapper flex justify-center text-center text-sm">
|
<div class="list-summary-wrapper flex justify-center text-center text-sm">
|
||||||
<ListSummary
|
<ListSummary
|
||||||
v-if="!!kindPage.summary"
|
v-if="summary !== null"
|
||||||
:custom-numbers="kindPage.summary"
|
:custom-numbers="summary"
|
||||||
class="max-w-4xl"
|
class="max-w-4xl"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -257,7 +257,11 @@ export default {
|
||||||
quickButtons: {
|
quickButtons: {
|
||||||
type: Array,
|
type: Array,
|
||||||
default: () => defaultStatusFilters
|
default: () => defaultStatusFilters
|
||||||
}
|
},
|
||||||
|
listSummary : {
|
||||||
|
type: Object,
|
||||||
|
default: () => null
|
||||||
|
},
|
||||||
},
|
},
|
||||||
data: function () {
|
data: function () {
|
||||||
return {
|
return {
|
||||||
|
|
@ -299,6 +303,17 @@ export default {
|
||||||
queryParts () {
|
queryParts () {
|
||||||
return this.query.split(/\s+/).filter(part => part.length > 0)
|
return this.query.split(/\s+/).filter(part => part.length > 0)
|
||||||
},
|
},
|
||||||
|
summary () {
|
||||||
|
if ( this.listSummary !== null ) {
|
||||||
|
return this.listSummary
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( !!this.kindPage.summary ) {
|
||||||
|
return this.kindPage.summary
|
||||||
|
}
|
||||||
|
|
||||||
|
return null
|
||||||
|
}
|
||||||
},
|
},
|
||||||
mounted () {
|
mounted () {
|
||||||
// Setup stork client
|
// Setup stork client
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue