Vue + typescript uses this.$router.options

if you want to access the route list, you can get the route list by directly this.$router.options in the normal vue project

this.$router.options

but in typescript I can directly access this.$router and see the various properties of the object

but if you get it further, it will cause an error in typescript
error message:

Property "options" does not exist on type "VueRouter".

by looking up information, I know that $router.options is a private api not included in typings
, but I still want to get the route list in $router.options to access
first time typescript instruction

.
Mar.15,2021

you can use this.$router ['options'] to solve


another article on the same question

this ['router']

is used
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-1b3d817-4da39.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-1b3d817-4da39.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?