mirror of
https://github.com/element-plus/element-plus.git
synced 2024-11-21 01:02:59 +08:00
67cd7e95e6
* style(components): [dialog] Modify dialog style and docs * chore: update * feat(components): [dialog] add overflow prop * feat(components): update
36 lines
906 B
Vue
36 lines
906 B
Vue
<template>
|
|
<el-button plain @click="visible = true">
|
|
Open Dialog with customized header
|
|
</el-button>
|
|
|
|
<el-dialog v-model="visible" :show-close="false" width="500">
|
|
<template #header="{ close, titleId, titleClass }">
|
|
<div class="my-header">
|
|
<h4 :id="titleId" :class="titleClass">This is a custom header!</h4>
|
|
<el-button type="danger" @click="close">
|
|
<el-icon class="el-icon--left"><CircleCloseFilled /></el-icon>
|
|
Close
|
|
</el-button>
|
|
</div>
|
|
</template>
|
|
This is dialog content.
|
|
</el-dialog>
|
|
</template>
|
|
|
|
<script lang="ts" setup>
|
|
import { ref } from 'vue'
|
|
import { ElButton, ElDialog } from 'element-plus'
|
|
import { CircleCloseFilled } from '@element-plus/icons-vue'
|
|
|
|
const visible = ref(false)
|
|
</script>
|
|
|
|
<style scoped>
|
|
.my-header {
|
|
display: flex;
|
|
flex-direction: row;
|
|
justify-content: space-between;
|
|
gap: 16px;
|
|
}
|
|
</style>
|