refactor: 项目细节优化

This commit is contained in:
郝先瑞
2022-03-27 21:45:50 +08:00
parent 91e810ffa7
commit 0703579ecc
21 changed files with 87 additions and 314 deletions

View File

@@ -6,12 +6,12 @@ export default {
},
// 登录页面国际化
login: {
title: 'Youlai Mall Management System',
title: 'vue3-element-admin',
username: 'Username',
password: 'Password',
login: 'Login',
code: 'Verification Code',
copyright: 'Copyright © 2021 - 2022 youlai.tech All Rights Reserved. ',
copyright: '',
icp: ''
},
// 导航栏国际化

View File

@@ -6,13 +6,13 @@ export default {
},
// 登录页面国际化
login:{
title: '有来商城管理系统 Vue3',
title: 'vue3-element-admin',
username:'用户名',
password:'密码',
login:'登 录',
code:'请输入验证码',
copyright:'Copyright © 2021 - 2022 youlai.tech All Rights Reserved. 有来技术 版权所有',
icp:'ICP备案号:皖ICP备20006496号-2'
copyright:'',
icp:''
},
navbar:{
dashboard: '首页',

View File

@@ -23,7 +23,7 @@ const props = defineProps({
}
})
const title=ref("youlai-mall")
const title=ref("vue3-element-admin")
const logo=ref("http://cdn.youlai.tech/logo.png")
</script>

View File

@@ -15,11 +15,7 @@ export * from './api/sms/advert'
export * from './api/oms/order'
export * from './api/ums/member'
export * from './store/user'
export * from './store/app'
export * from './store/permission'
export * from './store/setting'
export * from './store/tagsView'
export * from './store'
export * from './common'

57
src/types/store.d.ts vendored Normal file
View File

@@ -0,0 +1,57 @@
import {RouteRecordRaw,RouteLocationNormalized} from "vue-router";
/**
* 用户状态类型声明
*/
export interface AppState {
device: string,
sidebar: {
opened: boolean,
withoutAnimation: boolean
},
language:string,
size:string
}
/**
* 权限类型声明
*/
export interface PermissionState{
routes:RouteRecordRaw[]
addRoutes: RouteRecordRaw[]
}
/**
* 设置状态类型声明
*/
export interface SettingState {
theme: string,
tagsView: boolean,
fixedHeader: boolean,
showSettings: boolean,
sidebarLogo: boolean
}
/**
* 标签状态类型声明
*/
export interface TagView extends Partial<RouteLocationNormalized> {
title?: string
}
export interface TagsViewState{
visitedViews: TagView[],
cachedViews: (string)[]
}
/**
* 用户状态类型声明
*/
export interface UserState {
token: string,
nickname: string,
avatar: string,
roles: string[],
perms: string[]
}

View File

@@ -1,12 +0,0 @@
/**
* 用户状态类型声明
*/
export interface AppState {
device: string,
sidebar: {
opened: boolean,
withoutAnimation: boolean
},
language:string,
size:string
}

View File

@@ -1,9 +0,0 @@
import {RouteRecordRaw} from "vue-router";
/**
* 权限类型声明
*/
export interface PermissionState{
routes:RouteRecordRaw[]
addRoutes: RouteRecordRaw[]
}

View File

@@ -1,10 +0,0 @@
/**
* 设置状态类型声明
*/
export interface SettingState {
theme: string,
tagsView: boolean,
fixedHeader: boolean,
showSettings: boolean,
sidebarLogo: boolean
}

View File

@@ -1,12 +0,0 @@
import {RouteLocationNormalized} from "vue-router";
/**
* 用户状态类型声明
*/
export interface TagView extends Partial<RouteLocationNormalized> {
title?: string
}
export interface TagsViewState{
visitedViews: TagView[],
cachedViews: (string)[]
}

View File

@@ -1,10 +0,0 @@
/**
* 用户状态类型声明
*/
export interface UserState {
token: string,
nickname: string,
avatar: string,
roles: string[],
perms: string[]
}

View File

@@ -80,20 +80,20 @@ const state = reactive({
{
imgUrl: 'http://cdn.youlai.tech/rui.jpg',
nickname: '郝先瑞',
positions: ['后端', '前端', '打杂'],
positions: ['Vue3','Java', '文档'],
homepage: 'https://www.cnblogs.com/haoxianrui/'
},
{
imgUrl: 'http://cdn.youlai.tech/lin.jpg',
nickname: '张加林',
positions: ['DevOps'],
homepage: 'https://gitee.com/ximy'
},
{
imgUrl: 'http://cdn.youlai.tech/chuan.jpg',
nickname: '张川',
positions: ['后端', '前端'],
positions: ['Vue3','Java' ],
homepage: 'https://blog.csdn.net/qq_41595149'
},
{
imgUrl: 'http://cdn.youlai.tech/lin.jpg',
nickname: '张加林',
positions: ['DevOps'],
homepage: 'https://gitee.com/ximy'
}
],
colors: ['', 'success', 'warning', 'danger'],