Files
cachet-docker/resources/assets/js/components/dashboard/InviteTeam.vue
2017-09-30 11:29:12 +01:00

32 lines
618 B
Vue

<script>
module.exports = {
data () {
return {
canRemove: true,
emails: [
{ email: '' },
{ email: '' },
{ email: '' },
{ email: '' },
{ email: '' },
]
}
},
methods: {
add () {
this.emails.push("")
},
remove (key) {
if (this.canRemove) {
this.$delete(this.emails, key)
}
},
},
watch: {
'emails' (val) {
this.canRemove = val.length > 1
}
}
}
</script>