vue에서 v-for 플러그인 v-모델

5062 단어
html 부분
<FormItem style="display:inline-block;" v-for="extendProp in extendPropList">
	  <label style="font-weight:700;width: 70px; display:inline-block; text-align: right;">{{extendProp.name}}:label>
	  
FormItem>

js 부분
	//        
    async selectExtend(value,selectedData){
      this.extendPropList = [];
      var assetsTypeName = selectedData[(selectedData.length)-1].label;
      const{data:res} = await this.$http.get("/assets/information/search/all?assetsTypeName="+assetsTypeName);
      //    data      
      for(var i in res){
        this.extendPropList.push({name: res[i].name, value: ''});
      }

    },

좋은 웹페이지 즐겨찾기