Добавил подсказку и открытие окна в колонке умерших
This commit is contained in:
34
resources/js/Pages/Statistic/Components/DeceasedColumn.vue
Normal file
34
resources/js/Pages/Statistic/Components/DeceasedColumn.vue
Normal file
@@ -0,0 +1,34 @@
|
||||
<script setup>
|
||||
import { NTooltip } from 'naive-ui'
|
||||
import {TbClick} from 'vue-icons-plus/tb'
|
||||
const props = defineProps({
|
||||
isTotalRow: Boolean,
|
||||
value: Number
|
||||
})
|
||||
const emits = defineEmits(['openModal'])
|
||||
|
||||
const handleClick = () => {
|
||||
if (props.isTotalRow) {
|
||||
emits('openModal')
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<NTooltip v-if="isTotalRow" placement="top" :arrow="false">
|
||||
<template #trigger>
|
||||
<div class="relative inset-0 flex items-center justify-center cursor-pointer" @click="handleClick">
|
||||
{{ value }}
|
||||
<NIcon class="absolute -right-1 -top-1">
|
||||
<TbClick size="14" />
|
||||
</NIcon>
|
||||
</div>
|
||||
</template>
|
||||
Кликните на ячейку для просмотра
|
||||
</NTooltip>
|
||||
<span v-else>{{ value }}</span>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user