From c8cae1b200eb0c6774d655f8db7172d6127fad68 Mon Sep 17 00:00:00 2001
From: lin-xin <2981207131@qq.com>
Date: Sat, 6 Jan 2024 18:57:49 +0800
Subject: [PATCH] =?UTF-8?q?=E5=8D=87=E7=BA=A7=E4=BA=86=E9=83=A8=E5=88=86?=
=?UTF-8?q?=E5=8A=9F=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
components.d.ts | 4 +
index.html | 42 +-
package.json | 20 +-
src/App.vue | 8 +-
src/api/index.ts | 4 +-
.../css/{color-dark.css => color-dark.scss} | 8 +-
src/assets/css/main.css | 5 -
src/components/table-detail.vue | 41 +
src/components/table-edit.vue | 123 ++
src/router/index.ts | 8 +-
src/utils/request.ts | 6 +-
src/views/editor.vue | 92 +-
src/views/login.vue | 173 +-
src/views/table.vue | 145 +-
src/views/tabs.vue | 8 +-
tsconfig.json | 2 +-
yarn.lock | 1527 +++++++++++++++++
17 files changed, 1971 insertions(+), 245 deletions(-)
rename src/assets/css/{color-dark.css => color-dark.scss} (55%)
create mode 100644 src/components/table-detail.vue
create mode 100644 src/components/table-edit.vue
create mode 100644 yarn.lock
diff --git a/components.d.ts b/components.d.ts
index 25a75fb9..ca55e424 100644
--- a/components.d.ts
+++ b/components.d.ts
@@ -15,6 +15,8 @@ declare module '@vue/runtime-core' {
ElCheckboxGroup: typeof import('element-plus/es')['ElCheckboxGroup']
ElCol: typeof import('element-plus/es')['ElCol']
ElDatePicker: typeof import('element-plus/es')['ElDatePicker']
+ ElDescriptions: typeof import('element-plus/es')['ElDescriptions']
+ ElDescriptionsItem: typeof import('element-plus/es')['ElDescriptionsItem']
ElDialog: typeof import('element-plus/es')['ElDialog']
ElDropdown: typeof import('element-plus/es')['ElDropdown']
ElDropdownItem: typeof import('element-plus/es')['ElDropdownItem']
@@ -48,6 +50,8 @@ declare module '@vue/runtime-core' {
RouterLink: typeof import('vue-router')['RouterLink']
RouterView: typeof import('vue-router')['RouterView']
Sidebar: typeof import('./src/components/sidebar.vue')['default']
+ TableDetail: typeof import('./src/components/table-detail.vue')['default']
+ TableEdit: typeof import('./src/components/table-edit.vue')['default']
Tags: typeof import('./src/components/tags.vue')['default']
}
}
diff --git a/index.html b/index.html
index d0cedf2a..acbcb53e 100644
--- a/index.html
+++ b/index.html
@@ -1,22 +1,22 @@
-
-
-
-
-
-
-
- vue-manage-system
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+ vue-manage-system后台管理系统
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/package.json b/package.json
index e0fad80b..06d26155 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "vue-manage-system",
- "version": "5.3.0",
+ "version": "5.3.5",
"private": true,
"scripts": {
"dev": "vite",
@@ -8,16 +8,18 @@
"serve": "vite preview"
},
"dependencies": {
- "@element-plus/icons-vue": "^2.0.9",
- "axios": "^0.27.2",
- "element-plus": "^2.2.14",
- "md-editor-v3": "^2.2.1",
- "pinia": "^2.0.20",
- "vue": "^3.2.37",
+ "@element-plus/icons-vue": "*",
+ "@wangeditor/editor": "^5.1.23",
+ "@wangeditor/editor-for-vue": "^5.1.12",
+ "axios": "^1.6.3",
+ "element-plus": "^2.4.4",
+ "md-editor-v3": "^2.11.2",
+ "nprogress": "^0.2.0",
+ "pinia": "^2.1.7",
+ "vue": "^3.3.0",
"vue-cropperjs": "^5.0.0",
- "vue-router": "^4.1.3",
+ "vue-router": "^4.2.5",
"vue-schart": "^2.0.0",
- "wangeditor": "^4.7.15",
"xlsx": "^0.18.5"
},
"devDependencies": {
diff --git a/src/App.vue b/src/App.vue
index f0fca28d..8d681855 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -1,7 +1,7 @@
-
-
-
+
+
+
diff --git a/src/api/index.ts b/src/api/index.ts
index fbe9e904..99d85239 100644
--- a/src/api/index.ts
+++ b/src/api/index.ts
@@ -2,7 +2,7 @@ import request from '../utils/request';
export const fetchData = () => {
return request({
- url: './table.json',
- method: 'get'
+ url: 'https://www.fastmock.site/mock/dc695d037038802def4b989ba4650c3f/vms/getUser',
+ method: 'post'
});
};
diff --git a/src/assets/css/color-dark.css b/src/assets/css/color-dark.scss
similarity index 55%
rename from src/assets/css/color-dark.css
rename to src/assets/css/color-dark.scss
index 7f322765..a3e0b865 100644
--- a/src/assets/css/color-dark.css
+++ b/src/assets/css/color-dark.scss
@@ -8,15 +8,15 @@
background: #eef1f6;
}
.plugins-tips a{
- color: #20a0ff;
+ color: var(--el-color-primary);
}
.tags-li.active {
- border: 1px solid #409EFF;
- background-color: #409EFF;
+ border: 1px solid var(--el-color-primary);
+ background-color: var(--el-color-primary);
}
.message-title{
- color: #20a0ff;
+ color: var(--el-color-primary);
}
.collapse-btn:hover{
background: rgb(40,52,70);
diff --git a/src/assets/css/main.css b/src/assets/css/main.css
index 34acd553..f6712160 100644
--- a/src/assets/css/main.css
+++ b/src/assets/css/main.css
@@ -74,10 +74,6 @@ a {
margin-left: 10px;
}
-.el-table tr:hover {
- background: #f6faff;
-}
-
.mgb20 {
margin-bottom: 20px;
}
@@ -113,7 +109,6 @@ a {
[class*=" el-icon-"], [class^=el-icon-] {
- speak: none;
font-style: normal;
font-weight: 400;
font-variant: normal;
diff --git a/src/components/table-detail.vue b/src/components/table-detail.vue
new file mode 100644
index 00000000..16064d03
--- /dev/null
+++ b/src/components/table-detail.vue
@@ -0,0 +1,41 @@
+
+
+
+ 用户ID
+ {{ data.id }}
+
+
+ 用户名
+ {{ data.name }}
+
+
+ 账户余额
+ {{ data.money }}
+
+
+ 账户状态
+ {{ data.state ? '正常' : '异常' }}
+
+
+ 地址
+ {{ data.address }}
+
+
+ 日期
+ {{ data.date }}
+
+
+ 头像
+
+
+
+
+
+
diff --git a/src/components/table-edit.vue b/src/components/table-edit.vue
new file mode 100644
index 00000000..78b4293a
--- /dev/null
+++ b/src/components/table-edit.vue
@@ -0,0 +1,123 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 保 存
+
+
+
+
+
+
+
diff --git a/src/router/index.ts b/src/router/index.ts
index 02e9668a..5bc3eb40 100644
--- a/src/router/index.ts
+++ b/src/router/index.ts
@@ -1,6 +1,8 @@
import { createRouter, createWebHashHistory, RouteRecordRaw } from 'vue-router';
import { usePermissStore } from '../store/permiss';
import Home from '../views/home.vue';
+import NProgress from 'nprogress'
+import 'nprogress/nprogress.css'
const routes: RouteRecordRaw[] = [
{
@@ -163,7 +165,7 @@ const router = createRouter({
});
router.beforeEach((to, from, next) => {
- document.title = `${to.meta.title} | vue-manage-system`;
+ NProgress.start();
const role = localStorage.getItem('ms_username');
const permiss = usePermissStore();
if (!role && to.path !== '/login') {
@@ -176,4 +178,8 @@ router.beforeEach((to, from, next) => {
}
});
+router.afterEach(() => {
+ NProgress.done()
+})
+
export default router;
diff --git a/src/utils/request.ts b/src/utils/request.ts
index f90bc899..2aaaf771 100644
--- a/src/utils/request.ts
+++ b/src/utils/request.ts
@@ -1,11 +1,11 @@
-import axios, {AxiosInstance, AxiosError, AxiosResponse, AxiosRequestConfig} from 'axios';
+import axios, { AxiosInstance, AxiosError, AxiosResponse, InternalAxiosRequestConfig } from 'axios';
-const service:AxiosInstance = axios.create({
+const service: AxiosInstance = axios.create({
timeout: 5000
});
service.interceptors.request.use(
- (config: AxiosRequestConfig) => {
+ (config: InternalAxiosRequestConfig) => {
return config;
},
(error: AxiosError) => {
diff --git a/src/views/editor.vue b/src/views/editor.vue
index c08d55be..dceb03c2 100644
--- a/src/views/editor.vue
+++ b/src/views/editor.vue
@@ -1,37 +1,55 @@
-
-
-
- wangEditor:轻量级 web 富文本编辑器,配置方便,使用简单。 访问地址:
-
wangEditor
-
-
-
提交
-
-
-
-
-
-
+
+
+
+ wangEditor:轻量级 web 富文本编辑器,配置方便,使用简单。 访问地址:
+
wangEditor
+
+
+
+
+
+
提交
+
+
+
+
+
+
diff --git a/src/views/login.vue b/src/views/login.vue
index da669ebf..38a0b4ea 100644
--- a/src/views/login.vue
+++ b/src/views/login.vue
@@ -1,34 +1,35 @@
-
-
-
后台管理系统
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 登录
-
- Tips : 用户名和密码随便填。
-
-
-
+
+
+
后台管理系统
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 登录
+
+
+ Tips : 用户名和密码随便填。
+
+
+