Skip to content

Commit

Permalink
[Feature]: 对象新增属性enable_form_tabs
Browse files Browse the repository at this point in the history
  • Loading branch information
tujiajun committed May 6, 2024
1 parent 1f032cd commit b2052eb
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,10 @@ async function getFormSchemaWithDataFilter(form, options = {}){
export async function getObjectForm(objectSchema, ctx){
const { recordId, formFactor, layout = formFactor === 'SMALL' ? 'normal' : "horizontal", labelAlign, tabId, appId, defaults, submitSuccActions = [],
formDataFilter, onFormDataFilter, amisData, env } = ctx;
//优先识别组件上的enableTabs属性,若不存在,则识别对象上定义的
if (typeof ctx.enableTabs !== 'boolean') {
ctx.enableTabs = objectSchema.enable_form_tabs;
}
const fields = _.values(objectSchema.fields);
const formFields = getFormFields(objectSchema, ctx);
const formSchema = defaults && defaults.formSchema || {};
Expand Down

0 comments on commit b2052eb

Please sign in to comment.