I'm looking for a way to set the initial value of Vue data() using the value from a rendered input tag. While I know that I can sync the value of the input tag with the data using v-model="[data-key-here]" in Vue, is there a method to initialize the data in data() based on the value in an input tag?
Code Sample
<template>
<input v-model="car_name">
<input v-model="car_weight" value="40">
</template>
<script>
export default{
data(){
return{
car_name: "Range Rover",
car_weight: null
}
}
}
</script>