How vue binds a field of two array objects

how to bind the label attribute of the array tags to the label of the array returned by tree.getCheckedNodes ()

related codes

<el-dialog title="" :visible.sync="dialogFormVisible">
  <el-input placeholder="" v-model="filterText"></el-input>
  <el-tree class="filter-tree" :data="anaphylaxis" :props="defaultProps" node-key="label"  show-checkbox :filter-node-method="filterNode" ref="tree2"></el-tree>
  <div slot="footer" class="dialog-footer">
    <el-button @click="dialogFormVisible = false"> </el-button>
    <el-button type="primary" @click="setitem()"> </el-button>
  </div>
</el-dialog>
  <el-table :data="filterAnaylistList3" class="tb-edit" border highlight-current-row>
  <el-table-column type="index" label="-sharp" width="50" min-width="50">
  </el-table-column>
  <el-table-column prop="label" label="">
  </el-table-column>
  <el-table-column prop="value" label="">
    <template slot-scope="scope">
      <el-select v-model="scope.row.value"  multiple filterable placeholder="">
        <el-option-group
          v-for="group in symptom"
          :key="group.label"
          :label="group.label">
          <el-option
            v-for="item in group.children"
            :key="item.label"
            :label="item.label"
            :value="item.label"
            >
          </el-option>
        </el-option-group>
      </el-select>
       <span >{{scope.row.value | capitalize}}</span>
    </template>
  </el-table-column>
  <el-table-column prop="beizhu" label="">
    <template slot-scope="scope">
      <el-input v-model="scope.row.beizhu" placeholder=""></el-input>
      <span>{{scope.row.beizhu}}</span>
    </template>
  </el-table-column>
   <el-table-column prop="type" label="">
  </el-table-column>
  </el-table>
    open () {
      this.dialogFormVisible = true
      setTimeout(() => {
        this.$refs.tree2.setCheckedNodes(this.tags)
      }, 0)
    },
    setitem () {
      console.log(this.tags.label)
      this.tags = this.$refs.tree2.getCheckedNodes()
      this.dialogFormVisible = false
    },

I hope the effect can be achieved

.
      this.tags.label = this.$refs.tree2.getCheckedNodes().label

Let other attributes of tags have no relationship with other attributes of getchencedNodes.
it feels very complicated, and this problem is not easy to describe

.

has been solved. According to other people's reminders, I find that this binding is unreasonable, so I compare the two arrays of getCheckNodes and tags, put the newly added push into the array, and adjust the dropped splice

.
Menu