|
|
@@ -1,12 +1,13 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
<h3>线程栈</h3>
|
|
|
+ {{displayNow}}
|
|
|
<div class="j-container">
|
|
|
<template v-if="threadStack !== null">
|
|
|
<v-btn v-for="item of threadStack" :key="item.methodName" block text :color="item.fresh ? 'red' : 'black'"
|
|
|
@click="handleClickDetail(item)">
|
|
|
<div class="button-text">{{item.methodName}}</div>
|
|
|
- <v-icon v-if="item.methodName === itemNowId" color="blue" right>mdi-check</v-icon>
|
|
|
+ <v-icon v-if="item === displayNow" color="blue" right>mdi-arrow-left</v-icon>
|
|
|
</v-btn>
|
|
|
</template>
|
|
|
</div>
|
|
|
@@ -20,20 +21,15 @@ export default {
|
|
|
threadStack: {
|
|
|
type: Array,
|
|
|
default: () => []
|
|
|
- }
|
|
|
- },
|
|
|
- data () {
|
|
|
- return {
|
|
|
- itemNowId: null
|
|
|
+ },
|
|
|
+ displayNow: {
|
|
|
+ type: Object,
|
|
|
+ default: () => ({})
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
handleClickDetail (detail) {
|
|
|
- this.itemNowId = detail.methodName
|
|
|
- this.$emit('click-detail', {
|
|
|
- detail,
|
|
|
- component: 'j-thread-detail'
|
|
|
- })
|
|
|
+ this.$emit('click-detail', detail)
|
|
|
}
|
|
|
}
|
|
|
}
|