Main.vue:
<router-link :to="{name:'Home'}">首页</router-link>
routing:
The error is reported as follows:
Why does using :to="{name:'Home'}" report an error, but the ordinary to="/home" has no problem?
闭关修行中......
This is embarrassing. Vue should directly parse the data in to as a string, so if the method you wrote cannot parse it, an error will be reported.
This is embarrassing. Vue should directly parse the data in to as a string, so if the method you wrote cannot parse it, an error will be reported.