如何在类型选项中使用条件禁用功能:使用形式化“选择”字段?

时间:2019-02-13 12:25:15

标签: angular-formly

我在Angular应用程序中使用formly-form,并且当我选择另一个选项时,我试图禁用一个选项。因此,在pic1中,当我选择值“ notifier”时,我想在pic2中禁用值“ notifier”。有任何想法吗?谢谢!

pic1:

public buildClaimStatementForm(policyData:any):StepType [] {        返回[

{          fieldGroupClassName:'行',          fieldGroup:[               {                     className:'col-lg-6 col-md-6 col-sm-6 col-xs-12',                           密钥:“ injured_pa​​rty_role”,                           输入:“选择”,                           defaultValue:'通知者',                           templateOptions:{                               输入:“选择”,                               标签:“专有自动pagubit”,                               占位符:“专有自动pagubit”,                                   要求:正确,                                    选项:[                                         {                                             值:“通知程序”,                                             标签:“ Subsemnatul”                                         },                                         {                                             值:“其他”,                                             标签:“ Alta persoana”                                         }                                     ]                                 },                                 modelOptions:{                                     updateOn:'模糊'                                 }                             }                         ]                     }

pic2:

{        fieldGroupClassName:'行',        hideExpression:'(model.vehicle_event_condition!==“驱动”)',                fieldGroup:[                    {                       className:'col-lg-6 col-md-6 col-sm-6 col-xs-12',                           键:“ driver_role”,                           输入:“选择”,                           templateOptions:{                                 输入:“选择”,                                 标签:“ Sofer”,                                 占位符:“ Sofer”,                                 要求:正确,                                  选项:[                                     {                                         值:“通知程序”,                                         标签:“ Subsemnatul”                                      },                                      {                                         值:“ injured_pa​​rty”,                                         标签:“专有自动pagubit”                                       },                                       {                                          值:“其他”,                                          标签:“ Alta persoana”                                       }                                     ]                                 },                                 modelOptions:{                                     updateOn:'模糊'                                 }                             }                         ]                     }

0 个答案:

没有答案