import { ElMessageBox } from 'element-plus'

/**
 * 操作单条数据信息 (二次确认【删除、禁用、启用、重置密码】)
 */
export const useHandleData = (message: string, fun: () => void) => {
  ElMessageBox.confirm(message, '警告', {
    confirmButtonText: '确定',
    cancelButtonText: '取消',
    type: 'warning',
    draggable: true
  }).then(() => {
    fun()
  })
}
