Merge pull request #9982 from wibetter/master

fix(amis-core): 事件动作/组件动作/未找到组件提示增加组件ID信息,方便知晓哪个组件未找到。
This commit is contained in:
刘丹 2024-04-09 11:09:39 +08:00 committed by GitHub
commit e5e05f231d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -59,8 +59,7 @@ export class CmptAction implements RendererAction {
: renderer;
// 如果key指定了但是没找到组件则报错
if (key && !component) {
const msg =
'尝试执行一个不存在的目标组件动作请检查目标组件非隐藏状态且正确指定了componentId或componentName';
const msg = `尝试执行一个不存在的目标组件动作(${key}请检查目标组件非隐藏状态且正确指定了componentId或componentName`;
if (action.ignoreError === false) {
throw Error(msg);
} else {