mirror of
https://github.com/element-plus/element-plus.git
synced 2025-08-15 11:34:06 +08:00

* perf: change to import-x * feat: add rules * chore: fix rule * chore: fix * chore: fix * chore: fix * style: `pnpm lint:fix` * Revert "style: `pnpm lint:fix`" This reverts commit db0116a288299c507e3cfc4d7a22e2207265d920. * Revert "chore: fix" This reverts commit 69c82a90c01525e38180be4c21e8ef5602512318. * chore: fix * style: `pnpm lint:fix` * fix: lint * chore: `pnpm format`
24 lines
543 B
Vue
24 lines
543 B
Vue
<template>
|
|
<el-button plain @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', {
|
|
// if you want to disable its autofocus
|
|
// autofocus: false,
|
|
confirmButtonText: 'OK',
|
|
callback: (action: Action) => {
|
|
ElMessage({
|
|
type: 'info',
|
|
message: `action: ${action}`,
|
|
})
|
|
},
|
|
})
|
|
}
|
|
</script>
|