23 lines
428 B
Vue
23 lines
428 B
Vue
<template>
|
|
<div>
|
|
<h1 v-if="isSearching" v-html="'Book search: '+searchTitle"></h1>
|
|
<h1 v-else>Book list</h1>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import {mapGetters, mapState} from "vuex";
|
|
|
|
export default {
|
|
name: 'BookListingHeader',
|
|
data() {
|
|
return {
|
|
searchTerm: null,
|
|
}
|
|
},
|
|
computed: {
|
|
...mapState('booksmodule', ['searchTitle']),
|
|
...mapGetters('booksmodule', ['isSearching'])
|
|
},
|
|
}
|
|
</script> |