P粉8850351142023-08-26 20:14:46
Okay, so the first good practice is not to use cangeFilter() on the click event, but to use changeFilter. So if I understand you correctly, you want to reload the page and still have the same value selected. You can save this value in local storage, assuming it's not sensitive data.
Local storage information Save data in local storage
localStorage.setItem('gender', 'Male');
Get data (you need to use a life cycle hook like mounted to initialize the data)
mounted() { this.gender = localStorage.getItem('gender') || '你的默认值'; } <b-form-input placeholder="Name" type="text" class="d-inline-block" v-model="gender" v-on:change="changeFilter" :value="gender" />