[Vuejs]-In Vuejs i have to delete a section when i click on "X" but there is some error with it

0👍

There is neither an attribute called tab nor Index in your code
Define a data section and add those attributes

data() {
 return {
  tab: null,
  Index: null
 }
}

Also I don’t see any usage of those variables other than in console.log.
So if that’s true then no need define the data() section. You can directly emit the parameter like

methods: {
  removeSection(idx) {
   this.$emit('remove', idx);
  }
}

Leave a comment