clone 开源的 Shopping
This commit is contained in:
30
mobile-web/src/components/header/nav.vue
Normal file
30
mobile-web/src/components/header/nav.vue
Normal file
@@ -0,0 +1,30 @@
|
||||
<template>
|
||||
<van-nav-bar
|
||||
:title="title"
|
||||
left-text=""
|
||||
left-arrow
|
||||
@click-left="onBack"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { NavBar } from 'vant';
|
||||
export default {
|
||||
name:'headerNav',
|
||||
components:{
|
||||
[NavBar.name]: NavBar,
|
||||
},
|
||||
props:{
|
||||
title:String,
|
||||
},
|
||||
methods: {
|
||||
onBack() {
|
||||
history.back();
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user