# EpTitle 标题分组

用于表单分组的标题组件，支持右侧按钮和展开折叠。

## 基本用法

```vue
<template>
  <EpTitle title="基本信息" />
</template>
```

## Props

| 属性 | 说明 | 类型 | 默认值 |
|------|------|------|--------|
| title | 标题文本 | `string` | - |
| buttons | 右侧按钮列表 | [`ButtonProps[]`](./buttons.md#buttonprops-配置) | `[]` |
| showDownUp | 显示展开折叠 | `boolean` | `false` |

## Events

| 事件名 | 说明 | 回调参数 |
|--------|------|----------|
| toggle | 折叠状态切换 | `(expanded: boolean)` |

## 带按钮

```vue
<template>
  <EpTitle title="商品明细" :buttons="buttons" />
</template>

<script setup>
const buttons = [
  {
    name: '新增',
    type: 'primary',
    onClick: () => {},
  },
  {
    name: '删除',
    type: 'danger',
    plain: true,
    onClick: () => {},
  },
]
</script>
```

## 在 Form 中使用

```tsx
const formItemList = [
  {
    col: 24,
    type: 'EpTitle',
    props: {
      title: '基本信息',
      buttons: [
        {
          name: '操作',
          onClick: () => {},
        },
      ],
    },
  },
  // 其他表单项...
]
```
