mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-02 12:08:13 +08:00
fix: 完善属性配置面板异常渲染屏蔽逻辑
Change-Id: I7641a9b4b800b4abecb27718504475b1712a5287
This commit is contained in:
parent
c531b77977
commit
197545b5cf
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "amis-editor-core",
|
||||
"version": "5.2.0-beta.5",
|
||||
"version": "5.2.0-beta.6",
|
||||
"description": "amis 可视化编辑器",
|
||||
"main": "lib/index.min.js",
|
||||
"types": "lib/index.d.ts",
|
||||
|
@ -308,7 +308,7 @@ export function makeSchemaFormRender(
|
||||
api?: any;
|
||||
submitOnChange?: boolean;
|
||||
justify?: boolean;
|
||||
rendererName?: string;
|
||||
panelById?: string;
|
||||
formKey?: string;
|
||||
},
|
||||
) {
|
||||
@ -317,12 +317,9 @@ export function makeSchemaFormRender(
|
||||
return ({value, onChange, popOverContainer, id, store, node}: PanelProps) => {
|
||||
const ctx = {...manager.store.ctx};
|
||||
|
||||
if (schema?.rendererName && schema?.rendererName !== node?.type) {
|
||||
if (schema?.panelById && schema?.panelById !== node?.id) {
|
||||
// 用于过滤掉异常的渲染
|
||||
if (node?.type !== 'cell') {
|
||||
// 识别表格列
|
||||
return <></>;
|
||||
}
|
||||
return <></>;
|
||||
}
|
||||
|
||||
if (id) {
|
||||
|
@ -1553,7 +1553,7 @@ export class EditorManager {
|
||||
api?: any;
|
||||
submitOnChange?: boolean;
|
||||
justify?: boolean;
|
||||
rendererName?: string;
|
||||
panelById?: string;
|
||||
formKey?: string;
|
||||
}) {
|
||||
return makeSchemaFormRender(this, schema);
|
||||
|
@ -964,7 +964,7 @@ export abstract class BasePlugin implements PluginInterface {
|
||||
? plugin.panelControlsCreator(context)
|
||||
: plugin.panelControls!,
|
||||
justify: plugin.panelJustify,
|
||||
rendererName: plugin.rendererName
|
||||
panelById: store.activeId
|
||||
})
|
||||
});
|
||||
} else if (
|
||||
@ -990,7 +990,7 @@ export abstract class BasePlugin implements PluginInterface {
|
||||
? plugin.vRendererConfig.panelBodyCreator(context)
|
||||
: plugin.vRendererConfig.panelBody!,
|
||||
justify: plugin.vRendererConfig.panelJustify,
|
||||
rendererName: plugin.rendererName
|
||||
panelById: store.activeId
|
||||
})
|
||||
});
|
||||
}
|
||||
|
@ -530,7 +530,7 @@ export class BasicToolbarPlugin extends BasePlugin {
|
||||
if (!context.selections.length) {
|
||||
return;
|
||||
}
|
||||
const plugin: PluginInterface = this;
|
||||
const store = this.manager.store;
|
||||
|
||||
let menus: Array<ContextMenuItem> = [];
|
||||
const contextMenuContext: ContextMenuEventContext = {
|
||||
@ -561,7 +561,7 @@ export class BasicToolbarPlugin extends BasePlugin {
|
||||
}))
|
||||
}
|
||||
],
|
||||
rendererName: plugin.rendererName
|
||||
panelById: store.activeId
|
||||
})
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user