Skip to content

Commit 430c392

Browse files
committed
YAGNI: Accordion item properties
1 parent 5fb917c commit 430c392

File tree

1 file changed

+1
-17
lines changed

1 file changed

+1
-17
lines changed

src/components/rightSidePanel/layout/PropertiesAccordionItem.vue

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,7 @@
11
<script lang="ts" setup>
2-
import { watch } from 'vue'
3-
42
import { cn } from '@/utils/tailwindUtil'
53
6-
const { label, defaultCollapse } = defineProps<{
7-
label?: string
8-
defaultCollapse?: boolean
9-
}>()
104
const isCollapse = defineModel<boolean>('collapse', { default: false })
11-
12-
if (defaultCollapse) {
13-
isCollapse.value = true
14-
}
15-
watch(
16-
() => defaultCollapse,
17-
(value) => (isCollapse.value = value)
18-
)
195
</script>
206

217
<template>
@@ -28,9 +14,7 @@ watch(
2814
@click="isCollapse = !isCollapse"
2915
>
3016
<span class="text-sm font-semibold line-clamp-2">
31-
<slot name="label">
32-
{{ label ?? '' }}
33-
</slot>
17+
<slot name="label" />
3418
</span>
3519

3620
<i

0 commit comments

Comments
 (0)