init
This commit is contained in:
37
src/views/material-manage/components/header-title-bar.vue
Normal file
37
src/views/material-manage/components/header-title-bar.vue
Normal file
@@ -0,0 +1,37 @@
|
||||
<template>
|
||||
<el-page-header :class="$style.container" :content="$route.query.title" @back="handleBack()">
|
||||
<div slot="title" slot-scope="{data}">
|
||||
<slot name="title" :data="data" />
|
||||
</div>
|
||||
<div slot="content" slot-scope="{data}">
|
||||
<slot name="content" :data="data" />
|
||||
</div>
|
||||
</el-page-header>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
props: { },
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
created() {
|
||||
console.log(this.$route.query.title)
|
||||
},
|
||||
methods: {
|
||||
handleBack() {
|
||||
this.$router.push({ path: this.$route.query.redirect })
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" module>
|
||||
.container {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
height: 40px;
|
||||
padding: 4px 40px;
|
||||
border-radius: 4px;
|
||||
background-color: #eee;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user