diff --git a/src/App.vue b/src/App.vue index 4f596c5..17c3dbd 100755 --- a/src/App.vue +++ b/src/App.vue @@ -7,18 +7,20 @@ --> - -
+ +
- + + + - + @@ -27,22 +29,44 @@ - \ No newline at end of file diff --git a/src/components/Header.vue b/src/components/Header.vue index 20b6e3b..1a16d35 100644 --- a/src/components/Header.vue +++ b/src/components/Header.vue @@ -1,10 +1,47 @@ \ No newline at end of file + + \ No newline at end of file diff --git a/src/components/SliderMenu.vue b/src/components/SliderMenu.vue index 21a7935..2e7b954 100644 --- a/src/components/SliderMenu.vue +++ b/src/components/SliderMenu.vue @@ -1,59 +1,153 @@ \ No newline at end of file diff --git a/src/main.js b/src/main.js index 70bea1c..aeb0df8 100755 --- a/src/main.js +++ b/src/main.js @@ -1,7 +1,7 @@ import Vue from 'vue' -import App from './App.vue' import router from './router' import store from './store' +import App from './App.vue' import ElementUI from 'element-ui'; import 'element-ui/lib/theme-chalk/index.css'; import './style/theme/index.css' diff --git a/src/router/index.js b/src/router/index.js index d76aa54..c487209 100755 --- a/src/router/index.js +++ b/src/router/index.js @@ -2,39 +2,53 @@ import Vue from 'vue'; import VueRouter from 'vue-router'; import store from '../store'; import HomeView from '../views/HomeView.vue'; +// import UserPosts from '../views/UserPosts.vue'; // import Franchise from '../views/Franchise.vue' Vue.use(VueRouter) -const whiteSlideList = ['/','/franchise'];//侧边导航白名单 -const whiteFooterList = ['/','/franchise'];//侧边导航白名单 +const whiteSlideList = ['/','/ui'];//侧边导航白名单 +const whiteHeaderList = ['/','/ui','/register'];//头部导航白名单 +const whiteFooterList = ['/','/ui'];//底部白名单 const routes = [ { path: '/', - name: 'home', - component: HomeView + name: '首页', + component: HomeView, // component: Franchise }, { - path: '/about', - name: 'about', + path: '/register', + name: 'register', // route level code-splitting // this generates a separate chunk (about.[hash].js) for this route // which is lazy-loaded when the route is visited. - component: () => import(/* webpackChunkName: "about" */ '../views/AboutView.vue') + component: () => import(/* webpackChunkName: "register" */ '../views/Register.vue'), + children: [ // 这是子路由的定义开始 + // { + // path: '', // 当访问 /user 时,默认加载 UserProfile 组件 + // name: 'register', + // component: Register + // }, + // { + // path: 'posts', // 当访问 /user/posts 时,加载 UserPosts 组件 + // name: 'UserPosts', + // component: UserPosts, + // } + ] }, { path: '/ui', - name: 'ui', + name: 'ui组件', // route level code-splitting // this generates a separate chunk (about.[hash].js) for this route // which is lazy-loaded when the route is visited. - component: () => import(/* webpackChunkName: "about" */ '../views/elementGroups.vue') + component: () => import(/* webpackChunkName: "ui" */ '../views/elementGroups.vue') }, { path: '/franchise', name: '加盟', - component: () => import(/* webpackChunkName: "about" */ '../views/Franchise.vue') - } + component: () => import(/* webpackChunkName: "franchise" */ '../views/Franchise.vue') + }, ] const router = new VueRouter({ @@ -54,6 +68,11 @@ router.beforeEach((to, from, next) => { } else { store.commit('SET_FOOTER', false); // 其他页面显示侧边栏 } + if (whiteHeaderList.includes(to.path)) { + store.commit('SET_HEADER', true); // 登录页面不显示侧边栏 + } else { + store.commit('SET_HEADER', false); // 其他页面显示侧边栏 + } next(); }); diff --git a/src/store/index.js b/src/store/index.js index 2dd825f..6633a72 100755 --- a/src/store/index.js +++ b/src/store/index.js @@ -1,5 +1,5 @@ -import Vue from 'vue' -import Vuex from 'vuex' +import Vue from 'vue'; +import Vuex from 'vuex'; Vue.use(Vuex) @@ -7,6 +7,23 @@ export default new Vuex.Store({ state: { showSidebar: false, showFooter:false, + showHeader:false, + menuList:[],//目录菜单 + showBreadcrumb:false,//是否展示面包屑 + }, + actions: { + SET_HEADER({ commit }) { + commit('SET_HEADER'); + }, + SET_SIDEBAR({ commit }) { + commit('SET_SIDEBAR'); + }, + SET_FOOTER({ commit }) { + commit('SET_FOOTER'); + }, + SHOW_BREAD({ commit }) { + commit('SHOW_BREAD'); + }, }, mutations: { SET_SIDEBAR(state, show) { @@ -14,12 +31,17 @@ export default new Vuex.Store({ }, SET_FOOTER(state, show) { state.showFooter = show; + }, + SET_HEADER(state, show) { + state.showHeader = show; + }, + SHOW_BREAD(state, show) { + state.showBreadcrumb = show; } }, getters: { }, - actions: { - }, + modules: { } }) diff --git a/src/style/franchise.scss b/src/style/franchise.scss index 644345d..7343b47 100644 --- a/src/style/franchise.scss +++ b/src/style/franchise.scss @@ -1409,6 +1409,9 @@ input,p { } @media (max-width: 568px) { + .passport-layout-web-reg .web-reg-right{ + min-width: 500px; + } .passport-layout-web-ug-reg.web-v3-layout-box { width:100%; height: 100%; diff --git a/src/style/theme/common.scss b/src/style/theme/common.scss index f253cad..f5c74f3 100644 --- a/src/style/theme/common.scss +++ b/src/style/theme/common.scss @@ -1,5 +1,24 @@ - +body{ + font-family: Microsoft YaHei UI; + font-size: 14px; + margin: 0; + width: 100vw; + height: 100vh; + p{ + margin: 0; + padding: 0; + } + } + .el-container{ + height: 100%; + .el-main{ + padding: 0; + } + } + .min-width{ + min-width: 1200px; + } /* button==== start */ .el-button{ diff --git a/src/views/Register.vue b/src/views/Register.vue new file mode 100755 index 0000000..210ad4d --- /dev/null +++ b/src/views/Register.vue @@ -0,0 +1,246 @@ + + + diff --git a/src/views/AboutView.vue b/src/views/UserPosts.vue similarity index 58% rename from src/views/AboutView.vue rename to src/views/UserPosts.vue index 3fa2807..196cbb6 100755 --- a/src/views/AboutView.vue +++ b/src/views/UserPosts.vue @@ -1,5 +1,5 @@ diff --git a/src/views/elementGroups.vue b/src/views/elementGroups.vue index cfdc04d..ebe0ed7 100644 --- a/src/views/elementGroups.vue +++ b/src/views/elementGroups.vue @@ -648,7 +648,7 @@ export default { .elementWrap { /* width: 100%; */ padding: 30px 40px; - + background: #fff; .ele-item { display: flex; align-items: center; diff --git a/vue.config.js b/vue.config.js index 8a63fe7..9950b59 100755 --- a/vue.config.js +++ b/vue.config.js @@ -1,3 +1,4 @@ +const path = require('path'); module.exports = { configureWebpack: { module: { @@ -11,5 +12,10 @@ module.exports = { }, ], }, + resolve:{ + alias:{ + '@':path.resolve(__dirname, 'src/') + } + } }, }; \ No newline at end of file