vue If the page v-model is the dictionary, then the dictionary definition, the need for clearly defined key value '' or [], otherwise the key assignment to the dictionary does not display the page

If that

In the template template

{{ 111 }} 
{{ form_temp.blOwnerMemberList }} # Oh is a dictionary in the form 
{{ 222 }}

The return of property

form_temp: { 
  blOwnerMemberList: [] # is the key definition of this problem, if this is not defined, the following function to assign form_temp.blOwnerMemberList, the upper page is not displayed, so this must be displayed is defined 
},

method of

initServices (the callback, TEMP) {
    IF (! the callback) {
       var URL = ' / V1 / CMDB / business_line / ' + TEMP + ' / ' 
      getBusinesslineInfo (URL) .then (Response => { the this .form_temp.blOwnerMemberList = the JSON. parse (response.bl_owner) # Although this assignment, but in return blOwnerMemberList if not defined, then the page is not displayed 
      }). the catch (error => {the console.log (error)}) 
    } 
  },

Understand, if you do not define blOwnerMemberList: [], page rendering time will think that this element is not present, so the back of the assignment for elements that do not exist and will not be rendered. . . .

 

Guess you like

Origin www.cnblogs.com/robinunix/p/11672825.html
Recommended