Vue component reuse, how to request different interfaces according to different router?

there are many places in project development where the module content is the same or highly similar, but the routing source is different, how to use different interfaces in the component when using the component? Or pass different values to the same interface?
what I"m doing now is this:
make a judgment based on $route.name in mounted, request different interfaces according to different sources, or pass different values to different interfaces, which can also achieve the desired results, but it doesn"t always feel very good. Does the god have a better way?

Mar.06,2021

personally, I think you should first count the commonness and heterosexuality of the interfaces of all your shared components. The commonness is written in the component, and the heterosexual one is passed through the parent component using prop, for example:

< H2 > supplementary answer < / H2 >
  

personally, I think it is unrealistic to use router to pass parameters params or query, splicing request address to ok, if the component is deconstructed with only one layer of props implementation

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3aa55-2b9a9.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3aa55-2b9a9.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?