【问题标题】:How to add tooltip to formly field如何将工具提示添加到正式字段
【发布时间】:2020-07-14 16:50:31
【问题描述】:

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

如何向这些字段添加工具提示? 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'
                    }    
                }

}]

【问题讨论】:

    标签: angular forms tooltip angular-formly ngx-formly


    【解决方案1】:

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-06-06
      • 2010-11-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-01-04
      • 2012-11-02
      相关资源
      最近更新 更多