vue

数据关联select:

'database' : {
        'save' :  {  },  
          },

 'store_depot' : {      
                        'body' : [],
                    },
View Code
                              <select class="form-control" name="method" v-model="database.save.depot_name">
                                  <template v-for="option in parameters.depot">
                                      <option v-if="option.name===database.save.depot_name" :value="option.name" selected>{{ option.name }}</option>
                                      <option v-else :value="option.name">{{ option.name }}</option>
                                  </template>
                              </select>
View Code

 数据关联checkbox:

<input  type="checkbox"  v-model="database.save.invoiced" v-bind:true-value="1" v-bind:false-value="2">
View Code

 

posted @ 2017-03-13 11:10  viof7852  阅读(114)  评论(0编辑  收藏  举报