用于在局部区域展示分区小标题,具有左侧装饰块和灵活的插槽配置。常用于页面分区、表单分组、列表标题等场景。
通过 title 属性设置标题文本
<template>
<y-part-title title="基础用法" />
</template>```
<template>
<y-part-title title="插槽">
<template #extra>
额外内容
</template>
<template #right>
<el-button size="small" type="primary">右侧</el-button>
<el-button size="small" style="margin-left: 8px;">插槽</el-button>
</template>
</y-part-title>
</template>```
| 属性名 | 说明 | 类型 | 默认值 |
|---|---|---|---|
| title | 标题文本 | string | '' |
| 名称 | 说明 | 类型 |
|---|---|---|
| default | 默认插槽,用于自定义标题内容,会覆盖 title 属性 | — |
| extra | 左侧额外内容插槽,用于在标题后添加标签、图标等 | — |
| right | 右侧内容插槽,用于放置操作按钮、链接等 | — |