fix: 修复表单和表格类组件属性配置面板为空的问题

Change-Id: Id61942ac6898b79ac3910d2b76e2ab0dfff11227
This commit is contained in:
wibetter 2022-06-20 18:01:18 +08:00
parent b8e11fa713
commit 95038181b8

View File

@ -79,7 +79,7 @@ export class PanelPlugin extends BasePlugin {
panelTitle = '面板';
panelBodyCreator = (context: BaseEventContext) => {
const isForm = /(?:^|\/)form$/.test(context.path);
const isForm = /(?:^|\/)form$/.test(context.path) || context?.schema?.type === 'form';
return [
getSchemaTpl('tabs', [
@ -223,13 +223,14 @@ export class PanelPlugin extends BasePlugin {
schema.wrapWithPanel !== false &&
!context.selections.length
) {
panels.push({
key: 'panel',
icon: 'fa fa-list-alt',
title: this.panelTitle,
render: this.manager.makeSchemaFormRender({
body: this.panelBodyCreator(context),
rendererName: plugin.rendererName
rendererName: 'form'
})
});
} else {