摘要:
Quange.vue <template> <div id="Quange"> <p>{{msg}}</p> <button type="button" @click="onClick">跳转</button> </div> </template> <script> export default { 阅读全文
摘要:
App.vue <template> <div id="app"> <img src="./assets/logo.png"> <router-link to="/Quange/" tag="button">Quange</router-link> <router-link :to="args">F 阅读全文
摘要:
export default new Router({ routes: [{ path: '/', name: 'HelloWorld', component: HelloWorld, children: [{ path: '/Furong/:id', name: 'Furong', compone 阅读全文
摘要:
// import Furong from '@/components/Furong' // import Quange from '@/components/Quange' const Quange = () => import('@/components/Quange') const Furon 阅读全文
摘要:
动态id index.js export default new Router({ routes: [{ path: '/Furong/:id', name: 'Furong', component: Furong }, }) App.vue <template> <div id="app"> <i 阅读全文
摘要:
Quange.vue <template> <div id="Quange"> <p>{{msg}}</p> <button type="button" @click="onClick">跳转</button> </div> </template> <script> export default { 阅读全文
摘要:
<!-- 渲染成button --> <router-link to="/Quange" tag="button">Quange</router-link> <!-- 取消返回效果 --> <router-link to="/Furong" replace="">Furong</router-lin 阅读全文
摘要:
index.js import Vue from 'vue' import Router from 'vue-router' import HelloWorld from '@/components/HelloWorld' Vue.use(Router) export default new Rou 阅读全文
摘要:
Furong.vue <template> <div id="Furong"> <p>{{msg}}</p> </div> </template> <script> export default { name: 'Furong', data() { return { msg: 'hello furo 阅读全文