lcny-admin-mobile-vue/src/components/Appbar/index.vue

44 lines
710 B
Vue

<template>
<u-navbar
:title="show ? title : ''"
:background="background"
:custom-back="goback"
:title-color="titleColor"
:isBack="show"
:back-icon-color="titleColor"
>
<template #right
>
<slot name="right"></slot>
</template>
</u-navbar>
</template>
<script>
import { navigateBack } from '@/com/utils.js'
export default {
props: {
show: {
type: Boolean,
default: true,
},
title: {
type: String,
default: '',
},
},
data() {
return {
background: {
backgroundColor: '#2a7dc9',
},
titleColor: '#ffffff',
}
},
methods: {
goback() {
navigateBack()
},
},
}
</script>