79 lines
1.6 KiB
Vue
79 lines
1.6 KiB
Vue
<!-- -->
|
|
<template>
|
|
<div>
|
|
<div class="noNav">
|
|
<div class="noNav-left">
|
|
<i @click="handleBack" class="el-icon-arrow-left"></i>
|
|
</div>
|
|
<!-- <svg-icon icon-class="analyze" /> -->
|
|
<div>{{name}}</div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
data () {
|
|
return {
|
|
|
|
}
|
|
},
|
|
computed: {
|
|
isPopup () {
|
|
return !!this.$route.meta.pop
|
|
},
|
|
name () {
|
|
return this.$route.meta.title
|
|
}
|
|
},
|
|
beforeMount () {},
|
|
mounted () {},
|
|
methods: {
|
|
handleBack () {
|
|
console.log('this.isPopup: ', this.isPopup)
|
|
if (this.isPopup) return this.open()
|
|
history.go(-1)
|
|
console.log('history: ', history)
|
|
console.log('this.$router: ', this.$router)
|
|
this.$router.go(-1)
|
|
},
|
|
open () {
|
|
const obj = {
|
|
popupTitle: this.$route.meta.popupTitle || '有修改的内容未保存,确认离开吗?',
|
|
popupContent: this.$route.meta.popupContent || '系统可能不会保存您做的更改。'
|
|
}
|
|
this.$confirm(obj.popupContent, obj.popupTitle, {
|
|
confirmButtonText: '确定',
|
|
cancelButtonText: '取消',
|
|
type: 'warning'
|
|
}).then(() => {
|
|
this.$router.go(-1)
|
|
}).catch(() => { })
|
|
}
|
|
},
|
|
watch: {}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
<style lang='less' scoped>
|
|
.noNav{
|
|
height: 40px;
|
|
display: flex;
|
|
align-items: center;
|
|
&-left{
|
|
width: 60px;
|
|
height: 30px;
|
|
display: flex;
|
|
align-items: center;
|
|
border-right: 1px solid #c0c0c0;
|
|
margin-right: 20px;
|
|
i{
|
|
font-size: 22px;
|
|
cursor:pointer;
|
|
}
|
|
}
|
|
}
|
|
</style>
|