mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-24 23:49:19 +00:00
feat: SectionHeader component
This commit is contained in:
3
erpnext/public/js/hub/components/SectionHeader.vue
Normal file
3
erpnext/public/js/hub/components/SectionHeader.vue
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
<template>
|
||||||
|
<div class="hub-items-header level"><slot></slot></div>
|
||||||
|
</template>
|
||||||
@@ -7,36 +7,34 @@
|
|||||||
:placeholder="search_placeholder"
|
:placeholder="search_placeholder"
|
||||||
:on_search="set_search_route"
|
:on_search="set_search_route"
|
||||||
v-model="search_value"
|
v-model="search_value"
|
||||||
>
|
/>
|
||||||
</search-input>
|
|
||||||
|
|
||||||
<div v-for="section in sections"
|
<div v-for="section in sections" :key="section.title">
|
||||||
:key="section.title"
|
|
||||||
>
|
<section-header>
|
||||||
<div class="hub-items-header margin-bottom level">
|
|
||||||
<h4>{{ section.title }}</h4>
|
<h4>{{ section.title }}</h4>
|
||||||
<p :data-route="'marketplace/category/' + section.title">{{ 'See All' }}</p>
|
<p :data-route="'marketplace/category/' + section.title">{{ 'See All' }}</p>
|
||||||
</div>
|
</section-header>
|
||||||
|
|
||||||
<item-cards-container
|
<item-cards-container
|
||||||
:container_name="section.title"
|
:container_name="section.title"
|
||||||
:items="section.items"
|
:items="section.items"
|
||||||
:item_id_fieldname="item_id_fieldname"
|
:item_id_fieldname="item_id_fieldname"
|
||||||
:on_click="go_to_item_details_page"
|
:on_click="go_to_item_details_page"
|
||||||
>
|
/>
|
||||||
</item-cards-container>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import SearchInput from '../components/SearchInput.vue';
|
import SearchInput from '../components/SearchInput.vue';
|
||||||
|
import SectionHeader from '../components/SectionHeader.vue';
|
||||||
import ItemCardsContainer from '../components/ItemCardsContainer.vue';
|
import ItemCardsContainer from '../components/ItemCardsContainer.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'home-page',
|
name: 'home-page',
|
||||||
components: {
|
components: {
|
||||||
|
SectionHeader,
|
||||||
SearchInput,
|
SearchInput,
|
||||||
ItemCardsContainer
|
ItemCardsContainer
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user