vue.set( target, key, value ) this.$set (대상 수조, 변경할 구체적인 데이터, 재할당) 사용법

6677 단어
 :Vue.set( target, key, value )

target: ( )

key: 

value : 


js :
// 
let j = { id: 0, "progressTime": "", "progressContent": "", "isSet": true, "_temporary": true };
_this.tableInFormData = []
//  
this.tableInFormData.push(j);
// isSet true v-if
_this.$set(_this.tableInFormData[index],"isSet",true)        

다음은 html 코드입니다.
          <el-table-column label=" "
                                 width="300"
                                 :show-overflow-tooltip="true">
                    <template slot-scope="scope" >
                         <span v-if="scope.row.isSet">
                             <el-date-picker
                                     v-model="form2.progressTime"
                                     type="datetime"
                                     :picker-options="pickerBeginDateBefore"
                                     format="yyyy-MM-dd HH:mm:ss"
                                     value-format="yyyy-MM-dd HH:mm:ss"
                                     placeholder=" ">
                                     
                              el-date-picker>
                          span>
                        <span v-else>{{changeTimeToDate(scope.row.ProgressTime) }}span>
                    template>
                el-table-column>
                <el-table-column prop="ProgressContent"
                                 label=" "
                                 :show-overflow-tooltip="true">
                    <template slot-scope="scope">
                         <span v-if="scope.row.isSet">
                             <el-input size="small" v-model="form2.progressContent" placeholder=" " >el-input>
                         span>
                        <span v-else>{{(scope.row.ProgressContent) }}span>
                    template>
                el-table-column>

좋은 웹페이지 즐겨찾기