Vue.js [Vue warn]:v-on处理程序中出现错误:“Vue warn”;TypeError:无法读取属性';id';“未定义”的定义;尝试从b表中的选定行获取ID数组时

Vue.js [Vue warn]:v-on处理程序中出现错误:“Vue warn”;TypeError:无法读取属性';id';“未定义”的定义;尝试从b表中的选定行获取ID数组时,vue.js,asynchronous,axios,bootstrap-vue,Vue.js,Asynchronous,Axios,Bootstrap Vue,我使用的是bootstrap vue tables,我可以获取所选行,但其中包含行的所有属性,但我只需要所选行的id。 为了做到这一点,我试过这个 getids(){ for (var i = 0; i <= this.selected.length; i++) { this.filteredORD_NO.push(this.selected[i].id) } } filteredORD_NO必须是数组 声明like filteredORD_NO:[]解决了

我使用的是bootstrap vue tables,我可以获取所选行,但其中包含行的所有属性,但我只需要所选行的id。 为了做到这一点,我试过这个

 getids(){
for (var i = 0; i <= this.selected.length; i++) {
        this.filteredORD_NO.push(this.selected[i].id)
      } }

filteredORD_NO必须是数组
声明like filteredORD_NO:[]解决了该问题。

如果有其他方法获取b表中选定行的ID,我们也将不胜感激
    assignmethod() {
      this.getids(),
        this.WorkToteam[0] = this.filteredORD_NO,
        this.WorkToteam[1] = this.selectedteam,
     
      console.log(WorkToteam);
      this.axios({
        method: "POST",
        url: "/path/to/backend",
        data: this.workToteam,
        headers: { Authorization: "Bearer " + localStorage.getItem("ikey") },
      })
        .then(
          (response) => (
            console.log("response"),
          
          )
        )
        .catch((error) => console.log(error))
        .finally(() => (this.loading = false));
    },