<li class="col25" @click="this.$router.push({name:"RentList"})"><img width="32px" height="32px" src="../assets/images/home1.png"/><span style="display:block;"></span></li>
do I have to write the js code in method?
<li class="col25" @click="this.$router.push({name:"RentList"})"><img width="32px" height="32px" src="../assets/images/home1.png"/><span style="display:block;"></span></li>
do I have to write the js code in method?
this points to
directly @ click= "$router.push ({....})"
1. When rendering the template, there is no $router
object. vue
provides < router-link to= "/ foo" > Go to Foo < / router-link >
for template routing.
just remove the this
Previous: Ask a js question.
Next: How is it possible to download in a web page without going through the browser download manager?
[picture] as shown in the figure, the error in the above figure will occur when packing under Linux. There is no problem with packing locally I don t know what the problem is. Ask for advice ...
vue-router uses history mode, and the backend is tomcat,. How to configure the backend so that you can access url directly without reporting 404 requests? Apache and nginx are all found on the Internet. Ask for help. ...
for example, how do I initialize this component when I click to bill successfully? Just go back to where you just came in? there are a lot of things here. I don t want to find the corresponding binding value and empty it. I thought of this way to ...
in the APP.vue public navigation bar, I want to use vue to implement different route jump navigation bars corresponding to different styles ; html Code ...
when you pay for Wechat s official account, you need to call the API to obtain the user s code. You need to provide a callback url, to jump to url and add the parameters of the user s code. For example, url is xxx.com a.html, jump is xxx.com a.html?c...
for example, I used npm install amazeui to download a dependent amazeui . there are js and css, in this amazeui. At this time, I want to reference these js in vue to get css,. What should I do? Do not use the reference method of the folder path, plea...
similar to the home page of the GitHub warehouse, go to the details page of a file. for example, there is a src folder in the root directory of the repository, and there may be folders in src. The scenario is that there is a file such as a.js, if the p...
the previous article raised the question of how to match infinite-level routes with the help of forum friends, using the * sign to match. If you are not sure, you can go back to the previous question. The link is https: codeshelper.com q 10.. Informa...
1. When I return from the sub-routing page to the first-level routing page, there is an error 2. The browser console reported an error as follows Uncaught (in promise) Error: [vue-router] TypeError: Cannot read property app of undefined 3. My co...
the dots on the right and the circled dom nodes both enter the quantum page, but I still have this problem when I jump to other pages. uses the plug-in fullpage . ...
scrollBehavior (to, from, savedPosition) { return { x: 0, y: 0 } } my goal is to scroll to the top of the page every time after switching routes but this configuration only seems to work for first-level routes, but secondary route switching like pa...
after putting it on the server, click switch and report an error. Do you need to configure anything? : ...
problem description when the routing page enters, the rendering page will get stuck the environmental background of the problems and what methods you have tried 1.vue-router jump route, the route enters the execution animation with a 300ms 2. The...
how to test the compatibility of vue projects. The developed project opens a blank space on some mobile phones. But it s impossible to debug without this type of phone. So how do you debug this situation? ...
what is the difference between router-link-exact-active router-link-active? What does it mean to match exactly in the document? ...
originally the project requirement is a single page, so we have made a common framework, including the sidebar and the top navigation. later said that login registration should be integrated. so I d like to ask how to add a new page under the same do...
A webpack vue project generated with scaffolding is a single-page application. I think there are multiple applications in this project, that is, I want the pc version, the mobile version and the background to be in this project. so how do you configure...
vue single page project, developed by Wechat official account. the front page is a list of information, which is returned by obtaining the official account in the background. The returned information contains a url that jumps to the details (only this ...
these two days to do the project with vue+elementUI, a page because of require map json data. When packing, the corresponding js file of the component is much larger, on M. This causes the switch route to enter this page without responding. It took sever...
problem description RT, secondary setting rendering will turn the children into that component. No matter what level 3 is set, it has always been a rendering HelloWorld component. Is there something wrong with my configuration? related codes templ...