The navigation style of element-ui is selected, and it disappears after refreshing. How to solve this problem?

problem description

the environmental background of the problems and what methods you have tried

related codes

/ / Please paste the code text below (do not replace the code with pictures)

what result do you expect? What is the error message actually seen?

Jul.12,2021

< el-menu: default-active= "onRoutes"

computed:{
  onRoutes(){
      let path = this.$route.path.replace('/','');
      return path ? path : '/';
  }
Menu