EditParams

EditParams

作者:


class xxFormPresenter extends xx{
    protected getEditOptions(): EditOptions {
        return merge({}, super.getEditOptions(), {
            editParams: {
                [F_BudgetPlan_project]: () => getBudgetProjectEditParams(this.formValue),
                [F_BudgetPlan_model]: () => matchBudgetModel(this.form),
                profitMarginAmount: ({form, params, path}) => {
                    return {
                        numericProps: {
                            decimalPlaces: 精度,
                        }
                    }
                }
            },
        })
    }
}

参数

form EntityForm

params

好像没啥用

path

常见问题

  1. 子表Presenter设置了suppressQuickCreate不生效。要在主表中设置才行
  2. 主子表Presenter同时对一个字段进行设置,只有主表Presenter生效。