Files
x-forend/src/components/NavBar.vue
T
2024-12-26 12:14:47 +08:00

31 lines
650 B
Vue

<template>
<wd-navbar
:title="title"
custom-class="!bg-transparent"
:left-arrow="showBack"
:bordered="false"
safeAreaInsetTop
@click-left="handleClickLeft"
>
<template #right>
<slot name="right" />
</template>
</wd-navbar>
</template>
<script lang="ts" setup>
import { getLastPage } from '@/utils'
const title = getLastPage().$page.meta.navigationBar.titleText
const showBack = getCurrentPages().length > 1
const handleClickLeft = () => {
uni.navigateBack()
}
</script>
<style lang="scss">
:deep(.wd-navbar) {
--wot-navbar-title-font-size: 32rpx;
// --wot-navbar-title-font-weight: 400;
}
</style>