| 123456789101112131415161718192021222324252627282930313233343536373839 |
- <template>
- <div>
- <h3>堆区</h3>
- <div>
- <template v-if="objects !== null">
- <v-btn v-for="item of objects" :key="item.id" block text :color="item.fresh ? 'red' : 'black'"
- @click="handleClickDetail(item)">
- <div class="button-text">{{item.id}}</div>
- <v-icon v-if="displayNow && item === displayNow" color="red" right>mdi-check</v-icon>
- </v-btn>
- </template>
- </div>
- </div>
- </template>
- <script>
- export default {
- name: 'JHeap',
- props: {
- objects: {
- default: () => [],
- type: Array
- },
- displayNow: {
- type: Object,
- default: () => ({})
- }
- },
- methods: {
- handleClickDetail (detail) {
- this.$emit('click-detail', detail)
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- @import "common.scss";
- </style>
|