我尝试使用带有nativescript-vue的vue路由器,但是我得到了错误不能向查看组添加空子视图
我遵循了nativescript的文档,试图将路由器放到外部文件中,但我也得到了同样的错误。
import Vue from "nativescript-vue";
import VueDevtools from 'nativescript-vue-devtools';
Vue.use(VueDevtools, { host: '10.0.0.108' })
// import router from './router';
import VueRouter from 'vue-router';
Vue.use(VueRouter);
import Home from '../components/Home';
import Login from '../components/Login';
const router = new VueRouter({
pageRouting: true,
routes: [
{ path: '/home', component: Home },
{ path: '/login', component: Login },
{ path: '*', redirect: '/home' },
],
});
router.replace('/home');
import store from './store';
// Uncommment the following to see NativeScript-Vue output logs
Vue.config.silent = false;
new Vue({
router,
store,
}).$start();发布于 2019-01-05 15:21:40
目前,与Vue路由器的集成是不支持的。在团队解决此问题之前,请使用手动路由。
https://stackoverflow.com/questions/54052805
复制相似问题