12345678910111213141516171819202122 |
- <template>
- <kk-button text @click="open">Click to open the Message Box</kk-button>
- </template>
- <script lang="ts" setup>
- import { ElMessage, KkButton, KkMessageBox } from 'kankan-components'
- import type { Action } from 'element-plus'
- const open = () => {
- KkMessageBox.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>
|