mirror of
https://gitee.com/baidu/amis.git
synced 2024-11-29 18:48:45 +08:00
fix:优化调用链锚定提示
This commit is contained in:
parent
8175a4ca85
commit
9083751018
@ -512,4 +512,9 @@
|
|||||||
width: 255px;
|
width: 255px;
|
||||||
max-height: 360px;
|
max-height: 360px;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
|
.variables-select-panel-tree {
|
||||||
|
*:not(svg) {
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -8,6 +8,7 @@ import {
|
|||||||
EditorManager,
|
EditorManager,
|
||||||
getSchemaTpl,
|
getSchemaTpl,
|
||||||
JSONGetById,
|
JSONGetById,
|
||||||
|
JSONGetPathById,
|
||||||
persistGet,
|
persistGet,
|
||||||
persistSet,
|
persistSet,
|
||||||
RendererPluginAction,
|
RendererPluginAction,
|
||||||
@ -282,20 +283,24 @@ export const buildLinkActionDesc = (manager: EditorManager, info: any) => {
|
|||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
|
|
||||||
if (/^u:[A-Za-z0-9]{12}$/.test(desc)) {
|
|
||||||
toast.info('该组件可能在弹窗内,暂无法锚定到该组件');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const schema = JSONGetById(
|
const schema = JSONGetById(
|
||||||
manager.store.schema,
|
manager.store.schema,
|
||||||
info.componentId,
|
info.componentId,
|
||||||
'id'
|
'id'
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!schema) {
|
if (!schema) {
|
||||||
toast.info('温馨提示:未找到该组件');
|
toast.info('温馨提示:未找到该组件');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const path = JSONGetPathById(manager.store.schema, schema.$$id);
|
||||||
|
|
||||||
|
if (path?.includes('dialog') || path?.includes('drawer')) {
|
||||||
|
toast.info('该组件在弹窗内,暂无法直接锚定到该组件');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
manager.store.setActiveId(schema.$$id);
|
manager.store.setActiveId(schema.$$id);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
Loading…
Reference in New Issue
Block a user