vue监听属性值watch: {},对获得的新值进行处理

1.对监听到的值进行处理

 

 2.处理

    <div class="tags" v-for="(item, index) of obj.items" :key="index" v-if="value.length > 0">
        <a-input type='text' placeholder="请输入标签" v-model="item.label" @change="handleData" style="margin-right:4px;" />
      </div>

//写在  methods: {}外面
 watch: {
    value (newVal,oldVal) {
      let newValArry=[]
      if(newVal.le

猜你喜欢

转载自blog.csdn.net/qq_39695210/article/details/128323908
今日推荐