| | |
| | | </div> |
| | | |
| | | <div class="actions"> |
| | | <span class="star" @click="emit('favorite')"> |
| | | {{ data.isFavorite ? '★' : '☆' }} |
| | | </span> |
| | | <img |
| | | class="favorite-icon" |
| | | :src="favoriteIcon" |
| | | alt="收藏" |
| | | @click="emit('favorite')" |
| | | /> |
| | | </div> |
| | | </div> |
| | | |
| | |
| | | </template> |
| | | |
| | | <script setup> |
| | | import { computed } from 'vue' |
| | | import { saveOperationLog } from '@ztzf/apis' |
| | | import { useRoute } from 'vue-router' |
| | | import favoriteNo from '@/assets/images/dataCockpit/favorite-n.png' |
| | | import favoriteYes from '@/assets/images/dataCockpit/favorite-y.png' |
| | | |
| | | const props = defineProps({ |
| | | data: { |
| | |
| | | |
| | | const route = useRoute() |
| | | const emit = defineEmits(['signal', 'counter', 'favorite']) |
| | | const favoriteIcon = computed(() => (props.data?.isFavorite ? favoriteYes : favoriteNo)) |
| | | |
| | | // 信号干扰操作 |
| | | const handleSignal = () => { |
| | |
| | | gap: 8px; |
| | | font-size: 16px; |
| | | cursor: pointer; |
| | | |
| | | .favorite-icon { |
| | | width: 16px; |
| | | height: 16px; |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | } |
| | | } |
| | | </style> |
| | | </style> |