|
|
@@ -1,5 +1,14 @@
|
|
|
<template>
|
|
|
- <div>线程栈</div>
|
|
|
+ <div>
|
|
|
+ <h3>线程栈</h3>
|
|
|
+ <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-btn>
|
|
|
+ </template>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
@@ -11,14 +20,24 @@ export default {
|
|
|
default: () => []
|
|
|
}
|
|
|
},
|
|
|
+ data () {
|
|
|
+ return {
|
|
|
+ itemNowId: null
|
|
|
+ }
|
|
|
+ },
|
|
|
methods: {
|
|
|
- handleClickDetail() {
|
|
|
- this.$emit('click-detail')
|
|
|
+ handleClickDetail (detail) {
|
|
|
+ this.itemNowId = detail.methodName
|
|
|
+ this.$emit('click-detail', {
|
|
|
+ detail,
|
|
|
+ component: 'j-thread-detail'
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
+@import "common.scss";
|
|
|
|
|
|
</style>
|