mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-12-14 01:11:25 +08:00
e97fe719c4
- Update button's type in examples per changes for button
21 lines
472 B
Vue
21 lines
472 B
Vue
<template>
|
|
<el-button text @click="open">Click to open the Message Box</el-button>
|
|
</template>
|
|
|
|
<script lang="ts" setup>
|
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
|
import type { Action } from 'element-plus'
|
|
|
|
const open = () => {
|
|
ElMessageBox.alert('This is a message', 'Title', {
|
|
confirmButtonText: 'OK',
|
|
callback: (action: Action) => {
|
|
ElMessage({
|
|
type: 'info',
|
|
message: `action: ${action}`,
|
|
})
|
|
},
|
|
})
|
|
}
|
|
</script>
|