You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to change my 1.x vue project to 2.0.0,but got a warn
main.js:20715 [Vue warn]: Property or method "index" is not defined on the instance but referenced during render. Make sure to declare reactive data properties in the data option. (found in component )
code:
<template>
<div>
...
<a class="ui red label " v-for="(tag,index) in tags">
{{tag}}
<i class="delete icon" v-on:click="deleteTag(index)"></i>
</a>
...
</div>
<template>
<script>
module.exports = {
data : function () {
return {
//form tags
tags:[],
}
},
methods : {
deleteTag : function (deleteIndex) {
this.tags.splice(deleteIndex,1);
}
}
}
</script>