goback.vue
957 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<template>
<view class="back" @click="goback" v-if="!$isMobile">
<u-image src="/static/images/icon/back.png" mode="witFix" class="ImageCss"></u-image>
</view>
</template>
<script>
export default {
components: {},
props: {
},
data() {
return {
}
},
computed: {
},
onLoad() {
},
methods: {
goback() {
if (window.history.length > 1) {
window.history.back();
} else {
window.location.href = '/mobile';
}
}
}
}
</script>
<style lang="scss" scoped>
/deep/.u-image__image{
width: 50px !important;
height: 50px !important;
}
/deep/.u-image{
width: 0 !important;
height: 0 !important;
}
.ImageCss{
width: 50px !important;
height: 50px !important;
}
.back {
width: 50px;
height: 50px;
border-radius: 50px;
position: fixed;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
left:10px;
top: 10%;
bottom: 0;
}
</style>