Skip to content

vPanel 面板

可折叠的面板容器组件。

基础用法

vue
<script setup>
import { vPanel } from '@twi1i9ht/visual-lib'
</script>

<template>
  <vPanel title="面板标题" collapsible>
    <p>面板内容</p>
  </vPanel>
</template>

Props

属性类型默认值说明
titlestring标题
collapsiblebooleanfalse是否可折叠
collapsedbooleanfalse默认折叠状态
borderedbooleantrue是否显示边框
headerBackgroundstring头部背景色

Events

事件名参数说明
togglecollapsed: boolean折叠状态变化

Slots

插槽名说明
default面板内容
header自定义头部
extra头部右侧额外内容

Released under the MIT License.