Files
thinkasany 4807705579 docs: add placement demo for popover/popconfirm (#20126)
* docs: add placement demo for popover/popconfirm

* fix: update name

* Update docs/en-US/component/popconfirm.md

Co-authored-by: btea <2356281422@qq.com>

* Update docs/en-US/component/popconfirm.md

---------

Co-authored-by: btea <2356281422@qq.com>
2025-03-15 17:37:25 +08:00

140 lines
3.3 KiB
Vue

<template>
<div class="popconfirm-base-box">
<div class="row center">
<el-popconfirm
class="box-item"
title="Top Left prompts info"
placement="top-start"
>
<template #reference>
<el-button>top-start</el-button>
</template>
</el-popconfirm>
<el-popconfirm
class="box-item"
title="Top Center prompts info"
placement="top"
>
<template #reference>
<el-button>top</el-button>
</template>
</el-popconfirm>
<el-popconfirm
class="box-item"
title="Top Right prompts info"
placement="top-end"
>
<template #reference>
<el-button>top-end</el-button>
</template>
</el-popconfirm>
</div>
<div class="row">
<el-popconfirm
class="box-item"
title="Left Top prompts info"
placement="left-start"
>
<template #reference>
<el-button>left-start</el-button>
</template>
</el-popconfirm>
<el-popconfirm
class="box-item"
title="Right Top prompts info"
placement="right-start"
>
<template #reference>
<el-button>right-start</el-button>
</template>
</el-popconfirm>
</div>
<div class="row">
<el-popconfirm
class="box-item"
title="Left Center prompts info"
placement="left"
>
<template #reference>
<el-button class="mt-3 mb-3">left</el-button>
</template>
</el-popconfirm>
<el-popconfirm
class="box-item"
title="Right Center prompts info"
placement="right"
>
<template #reference>
<el-button>right</el-button>
</template>
</el-popconfirm>
</div>
<div class="row">
<el-popconfirm
class="box-item"
title="Left Bottom prompts info"
placement="left-end"
>
<template #reference>
<el-button>left-end</el-button>
</template>
</el-popconfirm>
<el-popconfirm
class="box-item"
title="Right Bottom prompts info"
placement="right-end"
>
<template #reference>
<el-button>right-end</el-button>
</template>
</el-popconfirm>
</div>
<div class="row center">
<el-popconfirm
class="box-item"
title="Bottom Left prompts info"
placement="bottom-start"
>
<template #reference> <el-button>bottom-start</el-button></template>
</el-popconfirm>
<el-popconfirm
class="box-item"
title="Bottom Center prompts info"
placement="bottom"
>
<template #reference> <el-button>bottom</el-button></template>
</el-popconfirm>
<el-popconfirm
class="box-item"
title="Bottom Right prompts info"
placement="bottom-end"
>
<template #reference>
<el-button>bottom-end</el-button>
</template>
</el-popconfirm>
</div>
</div>
</template>
<style>
.popconfirm-base-box {
width: 600px;
}
.popconfirm-base-box .row {
display: flex;
align-items: center;
justify-content: space-between;
}
.popconfirm-base-box .center {
justify-content: center;
}
.popconfirm-base-box .box-item {
width: 110px;
margin-top: 10px;
}
</style>