Answer the question
In order to leave comments, you need to log in
Vue-router how to link to new page?
Good afternoon. The router navigates to another component page (URl changes), but the new page is not displayed.
index.html
<section id="app-pro">
<router-view></router-view>
</section>
import AppPro from './AppPro.vue'
import PageSmeta from './components/PageSmeta.vue'
Vue.use(VueRouter)
Vue.component('PageSmeta', PageSmeta);
const routes = [
{ path: '/pagesmeta', component: PageSmeta}
]
const router = new VueRouter({
routes
})
new Vue({
el: '#app-pro',
render: h => h(AppPro),
router
}).$mount('#app-pro')
<router-link to="/pagesmeta">Smeta Router</router-link>
<template>
<h1>Smeta</h1>
</template>
Answer the question
In order to leave comments, you need to log in
<section id="app-pro">
<router-view></router-view>
</section>
new Vue({
el: '#app-pro',
render: h => h(AppPro),
router
}).$mount('#app-pro')
The function in the optionrender
takes precedence over therender
-function compiled from the optiontemplate
and over the HTML template located at the mount point specified in the optionel
.
For .owl-carousel, change the width, for example, to 90%, place it in the center (margin: 0 auto) and tweak the left/right of owl-prev/owl-next.
Also, so that the design does not change (the buttons will remain in the same place, and the carousel will decrease), you can increase the size of the hfblock, wrap all its contents in an additional div, which already has a width set.
The buttons are not visible because they have negative values left: -48px; and right: -48px;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question