0

我正在尝试寻找答案,但效率不高,所以我在这里。

如何向这些字段添加工具提示?Tooltip 只包含一个句子,并不复杂。我应该对更多字段进行此操作,但对于示例,我将显示两个字段。

 customerFields: FormlyFieldConfig[] = [{
                {
                    className: 'col-sm-6',
                    type: 'input',
                    key: 'companyName',
                    templateOptions: {
                        translate: true,
                        label: 'Customer.companyName',
                        required: true
                    }
                },
                {
                    className: 'col-sm-6',
                    type: 'input',
                    key: 'legalForm',
                    templateOptions: {
                        translate: true,
                        label: 'Customer.legalForm'
                    }    
                }

}]
4

1 回答 1

0

最好的解决方案是制作自己的模板或自己的包装器,这样您就可以更轻松地扩展它以及在文档 https://formly.dev/guide/custom-formly-wrapper https://formly.dev/guide/custom-formly-wrapper https:// /formly.dev/guide/custom-formly-field

于 2020-07-14T08:50:31.527 回答