feat: 导入 MemRelay 初始源码
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
import { ElMessageBox, type ElMessageBoxOptions } from 'element-plus'
|
||||
|
||||
export async function confirmAction(
|
||||
message: string,
|
||||
title: string,
|
||||
options?: ElMessageBoxOptions,
|
||||
): Promise<boolean> {
|
||||
try {
|
||||
await ElMessageBox.confirm(message, title, options)
|
||||
return true
|
||||
} catch (error) {
|
||||
if (error === 'cancel' || error === 'close') return false
|
||||
throw error
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user