ItemPanel.vue
835 Bytes
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
36
37
<script lang="ts" setup>
import type { CategoryConfigType, NodeItemConfigType } from '../../../types/node';
import SidebarNodeItem from './SidebarNodeItem.vue';
defineProps<{
category?: CategoryConfigType;
components?: NodeItemConfigType[];
}>();
</script>
<template>
<section
class="rule-designer-collapse-container w-full flex items-center flex-col gap-2 relative"
:class="components?.length ? 'p-4' : 'p-0'"
>
<SidebarNodeItem
v-for="item in components"
:key="item.key"
:config="item"
:category="category"
/>
</section>
</template>
<style scoped>
.rule-designer-collapse-container::after {
@apply dark:bg-dark-500;
position: absolute;
content: '';
width: 100%;
height: 100%;
z-index: 1;
top: 0;
background-color: #fff;
}
</style>