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hgj5zAe;}zL_xh
zhHT_hUv7QpTky^^K@xn7THJf-SU~+)=>1nvh+_i$t^H>Z$rlD;QX7i0gab!xBsW{b
zq?X0w*Hd^rQ-A++KR1N;!FFmGr^-F*jKu@Kb|~+q
zd!X&oY}3Do#0xGDJ!v(?zM@Rw|4GGIK$SXp*bTTdMwIZSwgVpr0RjLq(O{yAM+|7j
zlZh&lIBS8|4q(G?j4ZtWljiQ
@@ -14,7 +14,11 @@ const props = defineProps({
className: {
type: String,
default: ''
- }
+ },
+ color: {
+ type: String,
+ default: ''
+ },
})
const iconName = computed(() => `#icon-${props.iconClass}`)
@@ -27,14 +31,6 @@ const svgClass = computed(() => {
diff --git a/src/lib/el-svg-icon.js b/src/lib/el-svg-icon.js
new file mode 100644
index 0000000..4431719
--- /dev/null
+++ b/src/lib/el-svg-icon.js
@@ -0,0 +1,10 @@
+import * as components from '@element-plus/icons-vue'
+
+export default {
+ install: (app) => {
+ for (const key in components) {
+ const componentConfig = components[key];
+ app.component(componentConfig.name, componentConfig);
+ }
+ },
+};
diff --git a/src/main.js b/src/main.js
index 5fff7dd..524e81c 100644
--- a/src/main.js
+++ b/src/main.js
@@ -28,6 +28,10 @@ import './permission'
import 'element-plus/dist/index.css'
const app = createApp(App)
+
+//import element-plus svg icon
+import ElSvgIcon from "@/lib/el-svg-icon"
+app.use(ElSvgIcon)
//router
app.use(router)
diff --git a/src/permission.js b/src/permission.js
index 6b4ea67..0964f25 100644
--- a/src/permission.js
+++ b/src/permission.js
@@ -1,9 +1,8 @@
import router from '@/router'
-import { filterAsyncRouter, progressClose, progressStart } from '@/hooks/use-permission'
+import {progressClose, progressStart } from '@/hooks/use-permission'
import { useBasicStore } from '@/store/basic'
-import { userInfoReq } from '@/api/user'
import { langTitle } from '@/hooks/use-common'
-import settings from './settings'
+import settings from "@/settings";
//路由进入前拦截
//to:将要进入的页面 vue-router4.0 不推荐使用next()
@@ -22,25 +21,8 @@ router.beforeEach(async (to) => {
if (to.path === '/login') {
return '/'
} else {
- //2.判断是否获取用户信息
- if (!basicStore.getUserInfo) {
- try {
- const userData = await userInfoReq()
- //3.动态路由权限筛选
- filterAsyncRouter(userData)
- //4.保存用户信息到store
- basicStore.setUserInfo(userData)
- //5.再次执行路由跳转
- return { ...to, replace: true }
- } catch (e) {
- console.error(`route permission error${e}`)
- basicStore.resetState()
- progressClose()
- return `/login?redirect=${to.path}`
- }
- } else {
- return true
- }
+ basicStore.setFilterAsyncRoutes([])
+ return true
}
} else {
if (!whiteList.includes(to.path)) {
diff --git a/src/router/index.js b/src/router/index.js
index f695527..c1e84a1 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -1,6 +1,5 @@
import { createRouter, createWebHashHistory } from 'vue-router'
import basicDemo from './modules/basic-demo'
-
import Layout from '@/layout/index.vue'
export const constantRoutes = [
@@ -15,7 +14,6 @@ export const constantRoutes = [
}
]
},
-
{
path: '/login',
component: () => import('@/views/login/index.vue'),
@@ -41,50 +39,21 @@ export const constantRoutes = [
name: 'Dashboard',
component: () => import('@/views/dashboard/index.vue'),
//using el svg icon, the elSvgIcon first when at the same time using elSvgIcon and icon
- meta: { title: 'Dashboard', elSvgIcon: 'Fold', affix: true }
+ meta: { title: 'Dashboard', icon: 'dashboard', affix: true }
}
]
},
- // {
- // path: '/RBAC',
- // component: Layout,
- // children: [
- // {
- // path: 'https://github.jzfai.top/low-code-platform/#/permission-center/user-table-query',
- // meta: { title: 'RBAC', icon: 'skill' }
- // }
- // ]
- // },
{
path: '/setting-switch',
component: Layout,
+ alwaysShow:true,
+ meta: { title: 'Setting Switch', elSvgIcon: 'Fold' },
children: [
{
path: 'index',
component: () => import('@/views/setting-switch/index.vue'),
name: 'SettingSwitch',
- meta: { title: 'Setting Switch', icon: 'example' }
- }
- ]
- },
-
- {
- path: '/error-log',
- component: Layout,
- meta: { title: 'Error Log', icon: 'eye' },
- alwaysShow: true,
- children: [
- {
- path: 'error-log',
- component: () => import('@/views/error-log/index.vue'),
- name: 'ErrorLog',
- meta: { title: 'Error Index' }
- },
- {
- path: 'error-generator',
- component: () => import('@/views/error-log/error-generator.vue'),
- name: 'ErrorGenerator',
- meta: { title: 'Error Generator' }
+ meta: { title: 'Setting Switch', elSvgIcon: 'example' }
}
]
},
@@ -146,49 +115,12 @@ export const constantRoutes = [
}
]
},
- basicDemo
+ basicDemo,
]
//角色和code数组动态路由
export const roleCodeRoutes = [
- {
- path: '/roles-codes',
- component: Layout,
- redirect: '/roles-codes/page',
- alwaysShow: true, // will always show the root menu
- name: 'Permission',
- meta: {
- title: 'Permission',
- icon: 'lock',
- roles: ['admin', 'editor'] // you can set roles in root nav
- },
- children: [
- {
- path: 'index',
- component: () => import('@/views/roles-codes/index.vue'),
- name: 'RolesCodes',
- meta: { title: 'Permission Switch' }
- },
- {
- path: 'roleIndex',
- component: () => import('@/views/roles-codes/role-index.vue'),
- name: 'RoleIndex',
- meta: { title: 'Role Index', roles: ['admin'] }
- },
- {
- path: 'code-index',
- component: () => import('@/views/roles-codes/code-index.vue'),
- name: 'CodeIndex',
- meta: { title: 'Code Index', code: 16 }
- },
- {
- path: 'button-permission',
- component: () => import('@/views/roles-codes/button-permission.vue'),
- name: 'ButtonPermission',
- meta: { title: 'Button Permission' }
- }
- ]
- }
+
]
/**
* asyncRoutes
diff --git a/src/settings.js b/src/settings.js
index 15ffc99..e56fca8 100644
--- a/src/settings.js
+++ b/src/settings.js
@@ -45,7 +45,7 @@ export const settings = {
* @type {boolean} true | false
* @description Whether need animation of main area
*/
- mainNeedAnimation: false,
+ mainNeedAnimation: true,
/**
* @type {boolean} true | false
* @description Whether need nprogress
diff --git a/src/styles/init-loading.css b/src/styles/init-loading.css
new file mode 100644
index 0000000..169110f
--- /dev/null
+++ b/src/styles/init-loading.css
@@ -0,0 +1,17 @@
+/*开屏loading样式设置*/
+.loader-wrapper{
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
+ height: 80vh;
+}
+
+.loading-gif{
+
+}
+
+.load_title{
+ margin-top: 30px;
+ font-size: 16px;
+}
diff --git a/src/styles/reset-elemenet-plus-style.scss b/src/styles/reset-elemenet-plus-style.scss
index c7a101f..8b0ba95 100644
--- a/src/styles/reset-elemenet-plus-style.scss
+++ b/src/styles/reset-elemenet-plus-style.scss
@@ -2,3 +2,8 @@
.el-scrollbar__view {
padding-bottom: 80px;
}
+
+
+.el-scrollbar{
+ --el-menu-base-level-padding:15px;
+}
diff --git a/src/views/charts/index.vue b/src/views/charts/index.vue
deleted file mode 100644
index a6ab424..0000000
--- a/src/views/charts/index.vue
+++ /dev/null
@@ -1,7 +0,0 @@
-
- chart
-
-
-
-
-
diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue
index ffc4aff..3cd6551 100644
--- a/src/views/dashboard/index.vue
+++ b/src/views/dashboard/index.vue
@@ -1,29 +1,29 @@