Working on VueJS.
<template>
<v-text-fields v-model="a">
</template>
<script>
export default class SampleClass extends Vue{
a = null;
async mounted(){
if (this.$route.params.id) {
this.a= populatesFunction();
} }
</script>
In above code say i have a form to fill the data and call the api when i click a certain button which will save the data.
But say there is conditional check which look for parameter in url in my case id of the saved entries and if the condition is true then i call a function which perform GET request and retrieve the saved entry and use the retrieved data to populate the fields . In other sense i can edit already saved data.
What i wanted to achieve is to highlight text-fields if there is any kind of change is made(id as param in url). I don't want to highlight text field if i am creating a new entry.