Answer the question
In order to leave comments, you need to log in
What is the best way to handle page transitions in Element UI?
Here is the dock .
Here is my menu:
<el-menu :default-active="activeIndex" class="el-menu-demo" mode="horizontal" @select="handleSelect" background-color="#545c64" text-color="#fff" active-text-color="#ffd04b">
<el-menu-item index="1"><a href="/">General</a></el-menu-item>
<el-menu-item index="2"><a href="/faq">FAQ</a></el-menu-item>
<el-menu-item index="3"><a href="/book">Book</a></el-menu-item>
</el-menu>
Answer the question
In order to leave comments, you need to log in
It is better to do it together with routing. For example like this.
In the component:
<el-menu :router="true">
<el-menu-item index="/" :route="{ name: 'Home'}">Home</el-menu-item>
<el-menu-item index="/about" :route="{ name: 'About' }">About</el-menu-item>
</el-menu>
routes: [{
path: '/',
name: 'Home',
component: Home
}, {
path: '/about',
name: 'About',
component: About
}]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question