I want to find whether an array is empty or not. If it is empty I want to add data and if it is not it will not allow adding. I am currently stuck at the following stage,
<script type="text/javascript">
export default {
name: 'CarrierCosts',
data () {
return {
inputs: [],
form: {
free_shipping: '',
add_handling_costs: '',
tax: '',
range: '',
checkboxValue: '',
}
}
},
methods: {
addRange(){
this.inputs.push({
rangField: '',
})
},
}
}
this.inputs.lengthand do whatever you want