forked from ymm-tech/gods-pen
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbughd.vue
62 lines (61 loc) · 1.24 KB
/
bughd.vue
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>
<transition name='bughd'>
<div v-show='error && visible' class='bughd'>
{{error && error.stack}}
<div class='close-btn' @click='visible = false'><i class='el-icon-error'></i></div>
</div>
</transition>
</template>
<script>
import BaseComponent from 'src/extend/BaseComponent'
export default {
name: 'bughd',
mixins: [BaseComponent],
data () {
return {
error: null,
visible: true
}
},
mounted () {
this.ema.bind('bughd.open', e => {
this.error = e
this.visible = true
})
}
}
</script>
<style scoped>
.close-btn {
position: absolute;
right: 20px;
top: 20px;
padding: 10px;
cursor: pointer;
font-size: 24px;
}
.bughd {
position: fixed;
bottom: 0px;
left: 0px;
width: 100%;
max-height: 100%;
padding: 16px;
font-family: "Source Code Pro", Menlo, monospace;
height: 698px;
line-height: 18px;
font-size: 12px;
box-sizing: border-box;
transition-duration: 300ms;
overflow: auto;
z-index: 999999;
background-color: rgb(247, 247, 110);
white-space: pre;
}
.bughd-enter-active, .bughd-leave-active {
transition: bottom .35s
}
.bughd-enter, .bughd-leave-to {
bottom: -100%;
}
</style>