import Vue from 'vue'
import VueRouter from 'vue-router'
import new_upload from '../components/new_upload.vue'
import Sal from '../components/sal.vue'
import mSal from '../components/m.sal.vue'
var weidth = document.body.clientWidth;
if (window.innerWidth < 750) {
var obj = {
path: '/',
name: 'Sal',
component: mSal
}
} else {
var obj = {
path: '/',
name: 'Sal',
component: Sal
}
}
Vue.use(VueRouter)
const routes = [obj, {
path: '/upload',
name: 'upload',
component: new_upload
}]
const router = new VueRouter({
routes
})
export default router
vue+element中进行手机和pc校验,跳转页面
最新推荐文章于 2024-04-26 16:49:42 发布