My Vuejs el-radio-group currently has 2 values, 'Yes' and 'No', with 'Yes' being the default selected value. However, if I switch the selection to 'No', then navigate to another page and return using the browser's back button, the default value is not reset to 'Yes'. Additionally, the el-radio-group stops functioning properly, making it impossible to switch between values.
I would like the default value to be 'Yes' again upon returning to the page.
Below is my code:
<el-radio-group v-model="choice">
<el-radio-button
label="yes"
>
</el-radio-button>
<el-radio-button
label="no"
>
</el-radio-button>
</el-radio-group>
<div @click="clickHere"> Click Here </div>
........
data () {
return {
choice: 'yes',
.....
}
},
methods: {
clickHere() {
window.location.href('/register/')
}
........
Can anyone help me troubleshoot this issue?