<template>
<div class="nav flex-between">
<div class="back flex-center" @click="_goHome()">
<img src="../assets/demo10.png" alt="">
返回上一页
</div>
<div class="name flex-center">{{ title }}</div>
<div class="type" v-if="type">【{{ type }}】</div>
</div>
</template>
<script>
export default {
name: "nav",
inject: ['title','type'],
methods: {
_goHome() {
window.history.back()
// this.quit()
// this.$router.push({
// name: 'device'
// })
}
}
}
</script>
<style scoped lang="less">
.nav {
height: 10.88rem;
padding: 0 5.56rem 0 2.06rem;
position: relative;
font-size: 34px;
font-weight: bold;
color: #323232;
line-height: 48px;
.back {
width: 21.88rem;
height: 6.44rem;
background: #FFFFFF;
box-shadow: 0rem 0.31rem 0.63rem 0.06rem rgba(0,0,0,0.14);
border-radius: 1.63rem;
cursor: pointer;
img {
width: 2.65rem;
margin-right: 1.25rem;
}
}
.name {
position: absolute;
height: 100%;
font-size: 3.5rem;
font-weight: 400;
color: #323232;
line-height: 3.69rem;
left: 50%;
width: 30rem;
margin-left: -15rem;
}
}
</style>