Skip to content
This repository has been archived by the owner on Dec 30, 2022. It is now read-only.

Commit

Permalink
feat(stats): add scoped properties to default slot
Browse files Browse the repository at this point in the history
  • Loading branch information
rayrutjes committed May 23, 2017
1 parent eec5061 commit abdf64b
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/components/Stats.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<template>
<div :class="bem()" v-if="totalResults > 0">
<slot>{{ totalResults }} results found in {{ processingTimeMS }}ms</slot>
<slot :totalResults="totalResults" :processingTime="processingTime" :query="query">
{{ totalResults }} results found in {{ processingTime }}ms
</slot>
</div>
</template>

Expand All @@ -15,10 +17,13 @@ export default {
};
},
computed: {
query() {
return this.searchStore.query;
},
totalResults() {
return this.searchStore.totalResults;
},
processingTimeMS() {
processingTime() {
return this.searchStore.processingTimeMS;
},
},
Expand Down

0 comments on commit abdf64b

Please sign in to comment.