mirror of
https://gitlab.com/bramw/baserow.git
synced 2024-11-22 15:52:34 +00:00
43 lines
1015 B
Vue
43 lines
1015 B
Vue
<template>
|
|
<ul class="header__filter">
|
|
<li
|
|
v-for="itemType in pageHeaderItemTypes"
|
|
:key="itemType.getType()"
|
|
class="header__filter-item"
|
|
>
|
|
<a
|
|
:ref="`button_${itemType.type}`"
|
|
:data-item-type="itemType.type"
|
|
class="header__filter-link"
|
|
@click="
|
|
itemType.onClick(
|
|
$refs[`component_${itemType.type}`][0],
|
|
$refs[`button_${itemType.type}`][0]
|
|
)
|
|
"
|
|
>
|
|
<i class="header__filter-icon" :class="itemType.icon"></i>
|
|
<span class="header__filter-name">{{ itemType.label }}</span>
|
|
</a>
|
|
<component
|
|
:is="itemType.component"
|
|
:ref="`component_${itemType.type}`"
|
|
:data-item-type="itemType.type"
|
|
:page="page"
|
|
/>
|
|
</li>
|
|
</ul>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
name: 'PageHeaderMenuItems',
|
|
inject: ['page'],
|
|
computed: {
|
|
pageHeaderItemTypes() {
|
|
return this.$registry.getOrderedList('pageHeaderItem')
|
|
},
|
|
},
|
|
}
|
|
</script>
|