Files
element-plus/docs/examples/alert/close-button.vue
三咲智子 b8c38a9fe5 chore: enhance eslint rules (#6476)
* chore: enhance eslint rules

* chore: enhance eslint rules
2022-03-08 14:03:32 +08:00

24 lines
502 B
Vue

<template>
<el-alert title="unclosable alert" type="success" :closable="false">
</el-alert>
<el-alert title="customized close-text" type="info" close-text="Gotcha">
</el-alert>
<el-alert title="alert with callback" type="warning" @close="hello">
</el-alert>
</template>
<script lang="ts" setup>
const hello = () => {
// eslint-disable-next-line no-alert
alert('Hello World!')
}
</script>
<style scoped>
.el-alert {
margin: 20px 0 0;
}
.el-alert:first-child {
margin: 0;
}
</style>