Browse Source

去除废弃代码

pull/54/head
zq 2 months ago
parent
commit
9997f60065
  1. 16
      src/components/GuipTable.vue
  2. 1
      src/components/SliderMenu.vue
  3. 33
      src/router/index.js

16
src/components/GuipTable.vue

@ -1,5 +1,4 @@
<template>
<global-loading>
<el-table ref="guiptable" v-bind="$attrs" :data="tableData" v-on="$listeners" :border="border" @selection-change="handleSelectionChange"
:style="{ width: width ? width : '100%', height: height ? height : '100%' }" v-loading="loading">
<!-- 多选 -->
@ -9,9 +8,6 @@
</template>
<!-- 自定义header -->
<slot></slot>
<!-- <template v-if="autoColumn">
<slot name="headerTop"></slot>
</template> -->
<!-- 通过json数据遍历渲染 -->
<template v-if="columns">
<el-table-column v-for="column in columns" :key="column.prop" :prop="column.prop" :label="column.label"
@ -41,24 +37,13 @@
</el-table-column>
</template>
<template #empty>
<!-- <div v-if="loading">
<i class="el-icon-loading"></i>
<span>数据加载中...</span>
</div> -->
<!-- <div class="custom-empty">
<img src="@/assets/table_empty.png" alt="无数据" class="empty-image">
<p class="empty-text">暂无数据</p>
</div> -->
<el-empty :image="emptyImg"></el-empty>
</template>
</el-table>
</global-loading>
</template>
<script>
import GuipButton from '@/components/GuipButton.vue';
import GlobalLoading from '@/components/GlobalLoading1.vue'
export default {
name: 'GuipTextarea',
@ -71,7 +56,6 @@ export default {
},
components: {
GuipButton,
GlobalLoading
},
mounted() {
},

1
src/components/SliderMenu.vue

@ -38,7 +38,6 @@
</el-menu>
<SetLeftMenu v-else :menuList="menuData"/>
<!-- <div v-else>---akjshdjka</div> -->
</transition>
</template>

33
src/router/index.js

@ -11,9 +11,7 @@ const blackSliderList = [
'/register','/franchise'
];
// 一级路由
const first_child_router = [
'/', '/agent/siteList', '/ui'
]
let first_child_router = []
//头部导航黑名单 不需要添加头部的放置在这里,其余默认显示头部
const blackHeaderList = [
'/franchise'
@ -46,9 +44,10 @@ const routes = [{
path: '/',
name: '首页',
component: HomeView,
isFirst:true,//是否属于一级路由
meta: {
title: '首页',
hideBreadcrumb: true // 首页不显示面包屑
title: '首页',//面包屑名称(此页面确认不需要放置在面包屑可以不添加此属性;如果获取不到title 会自动 获取 name 作为面包屑名称)
hideBreadcrumb: true // 是否隐藏面包屑
}
},
{
@ -61,6 +60,7 @@ const routes = [{
{
path: '/ui',
name: 'ui组件',
isFirst:true,
component: () => import( /* webpackChunkName: "ui" */ '../views/elementGroups.vue'),
meta: {
title: '公共组件示例',
@ -71,6 +71,7 @@ const routes = [{
{
path: '/agent/siteList',
name: '站点列表',
isFirst:true,
component: () => import( /* webpackChunkName: "siteList" */ '../views/agent/siteList.vue'),
meta: {
title: '站点列表',
@ -149,6 +150,10 @@ const routes = [{
name: '网页模板',
component: () => import( /* webpackChunkName: "pageTemplete" */ '../views/PageTemplete.vue')
},
// -----------------分隔符-----------
// 管理员start
{
path: '/super/ranking/yearProfit',
name: '年排行',
@ -333,8 +338,10 @@ const routes = [{
hideBreadcrumb: true // 一级页面不显示面包屑
}
},
]
// 管理员end
]
first_child_router = routes.filter(item => item.isFirst);
const router = new VueRouter({
mode: 'history',
base: process.env.BASE_URL,
@ -343,17 +350,21 @@ const router = new VueRouter({
router.beforeEach((to, from, next) => {
if (blackSliderList.includes(to.path)) {
store.commit('SET_SIDEBAR', false); // 登录页面显示侧边栏
store.commit('SET_SIDEBAR', false); // 黑名单内页面不显示侧边栏
} else {
if (first_child_router.includes(to.path)) { //所有一级路由都为非自定义侧边栏
store.commit('SET_CUSTOMIZE', false);
store.commit('SET_SLIDER_MENU', 'menuData');
store.commit('SET_SIDEBAR', true); // 其他页面显示侧边栏
if(first_child_router.length > 0){
first_child_router.forEach(item=>{
if(item.path == to.path){
store.commit('SET_CUSTOMIZE', false);
store.commit('SET_SLIDER_MENU', 'menuData');
}
})
}
if (to.path.includes('/super/ranking/')) { //匹配包含此路径的 侧边栏数据
store.commit('SET_CUSTOMIZE', false);
store.commit('SET_SLIDER_MENU', 'rankMenuData');
}
store.commit('SET_SIDEBAR', true); // 其他页面不显示侧边栏
}
if (blackFooterList.includes(to.path)) {
store.commit('SET_FOOTER', false); // 页面不显示底部

Loading…
Cancel
Save