I looked at the official document and I didn"t understand it. How should I write it in this.$router.push ("/ xx1/xx2")?
I looked at the official document and I didn"t understand it. How should I write it in this.$router.push ("/ xx1/xx2")?
this.$post () is related to your server routing, while your this.$router is the front-end route, and 404not found is your submission data route that does not match. Don't you separate the front and back ends?
although I still don't understand what you want to do. Two ways:
one is component reuse, login is the superior route, there is only one empty router-view, with two child routes, and both tea and stu are equipped with login components as child routes.
path: '/login',
component: xxxx,
children: [
{
path: 'teaxxxx',
component: Login
},
{
path: 'teaxxxx',
component: Login
}
]
is using the params parameter (the document is written)
{
path: '/login/:type',
name: 'login'
component: Login
}
use this.$route.params.type
within login components to get type
at the same time, it is suggested that route redirection is not recommended. Path, recommends using name jump.
.push({name: 'login', params: {type: 'teaxxxx'}})
Previous: Problems encountered in using table controls of elementUI in vue-cli
Next: How to solve the compatibility of axios URLSearchParams IE and Edge browsers
there is such a background system, which is divided into many systems and modules, which involves a lot of operation permissions, and each lander is assigned different permissions, so the operable menus and visible pages are also different. the previo...
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Document< title> < head> <body> <div id="app"> <h1>Hello App!< h1> <...
Wechat pay in Alipay, complete the payment by opening the system browser. The project is built on vue. Instead of the current page being opened via safari, you are going to the root directory of the route. Not even history with mode. Dear gods, how to so...
I am working on a page customization function. The template is stored in the background database, so you need to pull the template id, from the background and then follow the template id require corresponding to the components in the directory. For exam...
the this.$route.params.id obtained during vue route switching remains the same. you need to click the category and then click the computer before the phone can be changed, as shown in figure . Click the category-- Mobile idid1 --id the code is as ...
<div class="title"> <span>< span> <router-link to=" buy_car">go< router-link> < div> I want to click on this < router-link >, jump to the route buy_car, and pass several parameters to b...
there is navigation on the left and above. wants the navigation not to move when you jump. renders the contents of the child route on the lower right. originally intended to use v-if to bind to the parent route element Click on the link and render t...
in navigational programming in vue-router: router.push({ path: ` user ${userId}` }) -> user 123 can be written as: router.push({ path: user ${userId} }) ? is there any difference between ``and here? if there is no difference, then ...
vue project, use Wechat s third-party website to scan the code to log in, according to the official document first step var obj = new WxLogin({ self_redirect:true, id:"login_container", appid: "", scope: "", ...
when defining routes: const routes = [{ path: , meta: { title: }, component: (resolve) => require([ . views index.vue ], resolve) children: [ { path: a , name: a , title: a , component: ...
Brotherhood question link: https: codeshelper.com q 10. displays the text on the home page by default http: localhost:8080 Fen app.vue <template> <div id="app"> <Header>< Header> <div class="...
in my routes.js : ... children: [ { path: a , name: a , title: a , component: (resolve) => require([ . views a a.vue ], resolve) }, { path: b , name: b , title: b , compo...
1. The animation is divided into two stages -1-enter the animation -2 from the main page and return to the main page 2. Problem description: when entering the details page from the main page, the main page is destroyed instantly, leaving the details p...
as shown in the figure, are there any ideas or ready-made plug-ins? elementUI looked at it and found that it could not support dynamic component switching. ...
use vue router to imitate the app page to slide in and out, and there is a white gap between the two pages when Synchronize goes in and out. what is the reason for this? The official document says that if you do not set mode, it is the default Synchroni...
the project is built by vue-cli. SAP, runs without error with npm run dev. After using npm run build, the generated js is put into erb and reported to cannot redefine $router,. Some answers say that vue router is defined twice, or vue is packaged twice,...
Vue rookie, is trying to do a SPA page, encountered a problem looked at a lot of information can not be solved, come here to ask for the opinions of your predecessors. can vue-router get background data directly? How should it be done? If not, whether...
how to switch the online and offline domain name url and how to configure config? ask for answers ...
uses the following four columns made by vue-router, which is the product details interface, routing to productdescription, under the four columns of product information, purchase records, customer reviews, buyer questions and answers for four differen...
The list page needs to be pulled and loaded. I have adopted vue-scroller, how to turn on the pull-up loading effect again after pull-up loading is turned off? main.js import Vue from vue import VueScroller from vue-scroller Vue.use (VueScr...