Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于confirm调用的问题 #2130

Open
dhl94050483 opened this issue Jul 31, 2024 · 2 comments
Open

关于confirm调用的问题 #2130

dhl94050483 opened this issue Jul 31, 2024 · 2 comments

Comments

@dhl94050483
Copy link

  • Laravel Version: 10.44.0
    -PHP Version: 8.2.12
    -Dcat Admin Version: 2.2.3-beta
    -Description:
    我想在RowAction实例中的handle()方法中,调用confirm,提示用户是否进行下去,但无法调用!

操作过程是这样的,在表格的操作按钮中,有一个叫“合并”的,点击提示“是否要进行合并操作?”,通过以后,会进入到handle()函数,然后经过一些判断,需要再提示用户,“是否继续下去”,但这个再提示我无法调用,请大佬帮帮我

@dmskys
Copy link

dmskys commented Jul 31, 2024

/**
* 设置确认弹窗信息,如果返回空值,则不会弹出弹窗
*
* 允许返回字符串或数组类型
*
* @return array|string|void
*/
public function confirm()
{
return [
// 确认弹窗 title
"您确定要复制这行数据吗?",
// 确认弹窗 content
$this->row->username,
];
}

@dhl94050483
Copy link
Author

@dmskys 很感谢您的回复,但我要的效果是,在handle()里通过一些统计以后,再决定是否要弹出确认对话框,这个时候无法弹出

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants