Appearance
通用属性
插槽
- 默认支持
element-plus插槽, 对于封装的多层组件需要时间组件名+插槽名.否则应用不到对应组件上.
vue
<template>
<LxDialog v-model="visible" :show-close="false" width="500" ok="123312">
<!-- 使用默认插槽 -->
<template #header="{ close, titleId, titleClass }">
<div class="my-header">
<h4 :id="titleId" :class="titleClass" style="margin: 0">
使用默认插槽
</h4>
<el-button type="danger" @click="close">
Close
</el-button>
</div>
</template>
<!-- 使用带前缀的插槽 -->
<template #dialog-footer>
<div>带前缀的插槽</div>
</template>
This is dialog content.
</LxDialog>
</template>