ваше сообщение коммита

This commit is contained in:
2025-05-28 16:23:11 +03:00
parent 0c4eada515
commit 568f2615b9
10 changed files with 453 additions and 10 deletions

View File

@@ -12,6 +12,7 @@
<th>Telegram</th>
<th>Кошелек</th>
<th>Дата создания</th>
<th>Действие</th>
</tr>
</thead>
<tbody>
@@ -21,6 +22,9 @@
<td>{{ contact.telegram || '-' }}</td>
<td>{{ contact.wallet || '-' }}</td>
<td>{{ formatDate(contact.created_at) }}</td>
<td>
<button class="details-btn" @click="showDetails(contact)">Подробнее</button>
</td>
</tr>
</tbody>
</table>
@@ -28,14 +32,18 @@
</template>
<script setup>
import { defineProps } from 'vue';
import { defineProps, defineEmits } from 'vue';
const props = defineProps({
contacts: { type: Array, required: true }
});
const emit = defineEmits(['show-details']);
function formatDate(date) {
if (!date) return '-';
return new Date(date).toLocaleString();
}
function showDetails(contact) {
emit('show-details', contact);
}
</script>
<style scoped>
@@ -119,4 +127,17 @@ function formatDate(date) {
font-size: 1.1rem;
}
}
.details-btn {
background: #17a2b8;
color: #fff;
border: none;
border-radius: 6px;
padding: 6px 14px;
cursor: pointer;
font-size: 0.98rem;
transition: background 0.2s;
}
.details-btn:hover {
background: #138496;
}
</style>