You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

53 lines
1002 B

<template>
<van-nav-bar @click-left="onClickLeft" :border="border" :title="title" :left-arrow="leftArrow" style="background-color: #000;">
<template #left>
<slot name="left"></slot>
</template>
<template #title>
<slot name="title"></slot>
</template>
<template #right>
<slot name="right"></slot>
</template>
</van-nav-bar>
</template>
<script>
export default {
name: "vHeader",
props: {
title: {
default: "",
type: String,
required: false,
},
leftArrow: {
default: true,
type: Boolean,
required: false,
},
leftClick: {
default: undefined,
type: Function,
required: false,
},
border:{
default:true,
type:Boolean,
required:false
}
},
methods: {
onClickLeft() {
console.info(this.leftClick)
if (this.leftClick) {
this.leftClick();
} else {
this.$back();
}
},
},
};
</script>
<style scoped>
</style>