JThread.vue 887 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <template>
  2. <div>
  3. <h3>线程栈</h3>
  4. {{displayNow}}
  5. <div class="j-container">
  6. <template v-if="threadStack !== null">
  7. <v-btn v-for="item of threadStack" :key="item.methodName" block text :color="item.fresh ? 'red' : 'black'"
  8. @click="handleClickDetail(item)">
  9. <div class="button-text">{{item.methodName}}</div>
  10. <v-icon v-if="item === displayNow" color="blue" right>mdi-arrow-left</v-icon>
  11. </v-btn>
  12. </template>
  13. </div>
  14. </div>
  15. </template>
  16. <script>
  17. export default {
  18. name: 'JThread',
  19. props: {
  20. threadStack: {
  21. type: Array,
  22. default: () => []
  23. },
  24. displayNow: {
  25. type: Object,
  26. default: () => ({})
  27. }
  28. },
  29. methods: {
  30. handleClickDetail (detail) {
  31. this.$emit('click-detail', detail)
  32. }
  33. }
  34. }
  35. </script>
  36. <style lang="scss" scoped>
  37. @import "common.scss";
  38. </style>