| 123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- <template>
- <div>
- <h3>线程栈</h3>
- <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-btn>
- </template>
- </div>
- </div>
- </template>
- <script>
- export default {
- name: 'JThread',
- props: {
- threadStack: {
- type: Array,
- default: () => []
- }
- },
- data () {
- return {
- itemNowId: null
- }
- },
- methods: {
- handleClickDetail (detail) {
- this.itemNowId = detail.methodName
- this.$emit('click-detail', {
- detail,
- component: 'j-thread-detail'
- })
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- @import "common.scss";
- </style>
|