Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
window.EventBus = new Vue()
Vue.use(Dropzone)
Vue.use(Vuex)
Vue.component('Loading', require('./components/common/Loading.vue').default)
Vue.component('PageScholar', require('./components/course/PageScholar.vue').default)
Vue.component('PageStudent', require('./components/students/PageStudent.vue').default)
Vue.component('Course', require('./components/common/Course.vue').default)
Vue.component('SingleCourse', require('./components/SingleCourse/SingleCourse.vue').default)
const store = new Vuex.Store({
strict: process.env.NODE_ENV !== 'production'
})
// eslint-disable-next-line no-unused-vars
Vue.use(VueRouter)
const router = new VueRouter({
mode: 'history',
scrollBehavior () {
return { x: 0, y: 0 }
}
})
Vue.mixin(mixin)
const app = new Vue({
el: '#app',
router,
store
})
// eslint-disable-next-line no-console
console.log('%c Warning! %c If you are not developer, this may be dangerous for you account.', 'background: yellow; color: black; font-size: 24px; font-weight: bold;', 'background: red; color: white; font-size: 24px;')
window.EventBus = new Vue()
Vue.use(Dropzone)
Vue.use(Vuex)
Vue.component('Loading', require('./components/common/Loading.vue').default)
Vue.component('PageScholar', require('./components/course/PageScholar.vue').default)
Vue.component('PageStudent', require('./components/students/PageStudent.vue').default)
Vue.component('Course', require('./components/common/Course.vue').default)
Vue.component('SingleCourse', require('./components/SingleCourse/SingleCourse.vue').default)
const store = new Vuex.Store({
strict: process.env.NODE_ENV !== 'production'
})
// eslint-disable-next-line no-unused-vars
Vue.use(VueRouter)
const router = new VueRouter({
mode: 'history',
scrollBehavior () {
return { x: 0, y: 0 }
}
})
Vue.mixin(mixin)
const app = new Vue({
el: '#app',
router,
store
})
// eslint-disable-next-line no-console
console.log('%c Warning! %c If you are not developer, this may be dangerous for you account.', 'background: yellow; color: black; font-size: 24px; font-weight: bold;', 'background: red; color: white; font-size: 24px;')
var Vue = require('vue')
// var VueRouter = require('vue-router') // BUG: Вызывает ошибку "TypeError: o is not a constructor"
// Чтобы исправить данную ошибку необходимо использовать один из следующих вариантов подключения
var VueRouter = require('vue-router').default
// import VueRouter from 'vue-router'
var Brands = require('./views/Brands.vue')
var Contacts = require('./views/Contacts.vue')
var Projects = require('./views/Projects.vue')
var Blog = require('./views/Blog.vue')
var Post = require('./views/Post.vue')
Vue.use(VueRouter)
var router = new VueRouter({
routes: [
{ path: '/brands', component: Brands },
{ path: '/contacts', component: Contacts },
{ path: '/projects', component: Projects },
{ path: '/blog', component: Blog },
{ path: '/post/:id', name: 'post', component: Post }
]
})
new Vue({
el: '#app',
router: router
})
Vue.config.productionTip = false;
// silent noisy uncaught router promise errors
// https://github.com/vuejs/vue-router/issues/2881
const originalReplace = VueRouter.prototype.replace;
VueRouter.prototype.replace = function replace(location, onResolve, onReject) {
if (onResolve || onReject) return originalReplace.call(this, location, onResolve, onReject);
return originalReplace.call(this, location).catch(err => err);
}
Vue.use(VueRouter);
Vue.use(VueHelper);
const router = new VueRouter({
routes: [
{
path: '/',
name: 'auth',
component: RouteAuth,
},
{
path: '/export',
name: 'export',
component: RouteExport,
},
{
path: '/export/:projectId/:prototypeId',
name: 'export-success',
component: RouteExportSuccess,
props: true,
const App = require('@/App.vue').default;
const RouteAuth = require('@/RouteAuth.vue').default;
const RouteExport = require('@/RouteExport.vue').default;
const RouteExportSuccess = require('@/RouteExportSuccess.vue').default;
Vue.config.productionTip = false;
// silent noisy uncaught router promise errors
// https://github.com/vuejs/vue-router/issues/2881
const originalReplace = VueRouter.prototype.replace;
VueRouter.prototype.replace = function replace(location, onResolve, onReject) {
if (onResolve || onReject) return originalReplace.call(this, location, onResolve, onReject);
return originalReplace.call(this, location).catch(err => err);
}
Vue.use(VueRouter);
Vue.use(VueHelper);
const router = new VueRouter({
routes: [
{
path: '/',
name: 'auth',
component: RouteAuth,
},
{
path: '/export',
name: 'export',
component: RouteExport,
},
{
}).then(function (_a) {
var routes = _a.routes, wildCardRoutes = _a.wildCardRoutes;
if (wildCardRoutes.length) {
wildCardRoutes.forEach(function (route) {
if (route.group) {
route.group.children.push(route);
}
else {
routes.push(route);
}
});
}
$config.set("router.routes", routes);
_this.router = new vue_router_1.default($config.get("router"));
_this.registerMiddleware();
});
};