首页 > 其他分享 >Invalid prop: type check failed for prop “value”. Expected String, Number, got Undefined

Invalid prop: type check failed for prop “value”. Expected String, Number, got Undefined

时间:2023-05-31 10:55:44浏览次数:34  
标签:String Number Invalid 责任人 formItem value Expected prop

记录一个报错问题,之前别的同事写的代码,还看了半天有点无语!!

下拉选择部门,联动动态赋值责任人下拉列表警告,导致选择责任人的时候无法正确赋值undefined。

究其原因是封装的表单formItem项中传入了下拉选项的映射字段,如下:

 而在选择部门的时候又已经把动态数据遍历处理成了标准的label和value,所以就导致选择责任人的时候获取不到‘realName’和‘userOid’字段。

解决办法:

删掉formItem中的映射字段,或者把遍历字段按其实际值传递就可以了

标签:String,Number,Invalid,责任人,formItem,value,Expected,prop
From: https://www.cnblogs.com/minjh/p/17445407.html

相关文章

  • StringJoiner
         ......
  • StringBuilder
               ......
  • leetcode 693. Binary Number with Alternating Bits
    Givenapositiveinteger,checkwhetherithasalternatingbits:namely,iftwoadjacentbitswillalwayshavedifferentvalues.Example1:Input:5Output:TrueExplanation:Thebinaryrepresentationof5is:101Example2:Input:7Output:FalseExplanation......
  • leetcode 344. Reverse String
    Writeafunctionthattakesastringasinputandreturnsthestringreversed.Example:Givens="hello",return"olleh".classSolution(object):defreverseString(self,s):""":types:str......
  • leetcode 557. Reverse Words in a String III
    Givenastring,youneedtoreversetheorderofcharactersineachwordwithinasentencewhilestillpreservingwhitespaceandinitialwordorder.Example1:Input:"Let'stakeLeetCodecontest"Output:"s'teLekatedoCteeLtsetno......
  • leetcode 476. Number Complement
    Givenapositiveinteger,outputitscomplementnumber.Thecomplementstrategyistoflipthebitsofitsbinaryrepresentation.Note:Thegivenintegerisguaranteedtofitwithintherangeofa32-bitsignedinteger.Youcouldassumenoleadingzerobiti......
  • leetcode 728. Self Dividing Numbers
    Aself-dividingnumberisanumberthatisdivisiblebyeverydigititcontains.Forexample,128isaself-dividingnumberbecause128%1==0,128%2==0,and128%8==0.Also,aself-dividingnumberisnotallowedtocontainthedigitzero.Givenal......
  • leetcode 202. Happy Number
    Writeanalgorithmtodetermineifanumberis"happy".Ahappynumberisanumberdefinedbythefollowingprocess:Startingwithanypositiveinteger,replacethenumberbythesumofthesquaresofitsdigits,andrepeattheprocessuntilthe......
  • leetcode 747. Largest Number At Least Twice of Others
    Inagivenintegerarraynums,thereisalwaysexactlyonelargestelement.Findwhetherthelargestelementinthearrayisatleasttwiceasmuchaseveryothernumberinthearray.Ifitis,returntheindexofthelargestelement,otherwisereturn-1.Ex......
  • leetcode 541. Reverse String II
    Givenastringandanintegerk,youneedtoreversethefirstkcharactersforevery2kcharacterscountingfromthestartofthestring.Iftherearelessthankcharactersleft,reverseallofthem.Iftherearelessthan2kbutgreaterthanorequalt......