blob: d816f8c6b2e3075293c7c42a05f26c28235be20d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
<script setup lang="ts">
import { useThemeVars } from 'naive-ui';
import type { Tool } from '@/tools/tools.types';
const props = defineProps<{ tool: Tool }>();
const { tool } = toRefs(props);
const theme = useThemeVars();
</script>
<template>
<div class="menu-icon-item">
<n-icon :component="tool.icon" />
<div v-if="tool.isNew" class="badge" />
</div>
</template>
<style lang="less" scoped>
.menu-icon-item {
position: relative;
.badge {
position: absolute;
background-color: v-bind('theme.primaryColor');
border-radius: 10px;
line-height: 1;
top: 3px;
left: -6px;
font-size: 10px;
height: 6px;
width: 6px;
}
}
</style>
|