36 lines
702 B
Vue
36 lines
702 B
Vue
<template>
|
|
<div class="mpage-header wrap-fix">
|
|
<button
|
|
v-if="showBack"
|
|
type="button"
|
|
class="mpage-header__back"
|
|
@click="handleBack"
|
|
>
|
|
<BasicIcon icon="vuesax-linear:arrow-right-1" />
|
|
</button>
|
|
<div class="mpage-header__title">{{ title }}</div>
|
|
<div v-if="$slots.trailing" class="mpage-header__trailing">
|
|
<slot name="trailing" />
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import BasicIcon from '@/components/BasicPacks/BasicIcon.vue'
|
|
import router from '@/router'
|
|
|
|
withDefaults(
|
|
defineProps<{
|
|
title: string
|
|
showBack?: boolean
|
|
}>(),
|
|
{
|
|
showBack: false,
|
|
},
|
|
)
|
|
|
|
function handleBack() {
|
|
router.back()
|
|
}
|
|
</script>
|