mirror of
https://github.com/element-plus/element-plus.git
synced 2025-08-14 18:11:48 +08:00

* feat(components): [alert] add open events and delay options * docs(components): [alert] add example with delayed attributes
33 lines
653 B
Vue
33 lines
653 B
Vue
<template>
|
|
<div style="max-width: 600px">
|
|
<el-alert
|
|
title="Primary alert that appearance after 5000 milliseconds"
|
|
type="primary"
|
|
:show-after="5000"
|
|
@open="console.log('open')"
|
|
/>
|
|
<el-alert
|
|
title="Success alert that disappear after 5000 milliseconds"
|
|
type="success"
|
|
:hide-after="5000"
|
|
/>
|
|
<el-alert
|
|
title="Info alert that in 5000 milliseconds to be hidden"
|
|
type="info"
|
|
:closable="false"
|
|
:auto-close="5000"
|
|
/>
|
|
</div>
|
|
</template>
|
|
|
|
<script setup lang="ts"></script>
|
|
|
|
<style scoped>
|
|
.el-alert {
|
|
margin: 20px 0 0;
|
|
}
|
|
.el-alert:first-child {
|
|
margin: 0;
|
|
}
|
|
</style>
|