@@ -76,11 +78,11 @@ export default {
diff --git a/src/plugin/imooc/package.json b/src/plugin/imooc/package.json
new file mode 100644
index 00000000..70e89a0c
--- /dev/null
+++ b/src/plugin/imooc/package.json
@@ -0,0 +1,6 @@
+{
+ "name": "lc-plugin-imooc",
+ "version": "0.0.1",
+ "dependencies": {},
+ "devDependencies": {}
+}
\ No newline at end of file
diff --git a/src/plugin/imooc/stage-config.js b/src/plugin/imooc/stage-config.js
new file mode 100644
index 00000000..d23b07e5
--- /dev/null
+++ b/src/plugin/imooc/stage-config.js
@@ -0,0 +1,13 @@
+const imoocRouter = {
+ title: '慕课课程',
+ type: 'view',
+ name: Symbol('course'),
+ route: '/course',
+ filePath: 'plugin/imooc/view/course.vue',
+ inNav: true,
+ icon: 'iconfont icon-kecheng',
+ order: null,
+ blueBaseColor: true,
+}
+
+export default imoocRouter
diff --git a/src/plugin/imooc/view/course.vue b/src/plugin/imooc/view/course.vue
new file mode 100644
index 00000000..7d8722fb
--- /dev/null
+++ b/src/plugin/imooc/view/course.vue
@@ -0,0 +1,321 @@
+
+
+
+
+
+
+
+

+
+
+
微信小程序入门与实战 常用组件API开发技巧项目实战
+
+ 随着小程序生态的逐渐形成,小程序越来越多的出现在万千百姓的生活中,日活用户量高达两亿。
+ 门槛低、更易学、对个人开发者更加包容开放的特点也吸引了越来越多的人加入到“小程序程序员”的行列,
+ 尤其是解决“跨系统开发”这个难题之后,小程序也更多的吸引到了国内外更多的开发者。
+
+
+
+
+
+

+
+
+
+
+
+

+
+
+
全面系统 Python3入门+进阶课程 更快上手实际开发
+
+ 无论是大数据、人工智能还是机器学习,Python都是最热门的首选语言
+ ,这次课程,就将带你从基础入门Python3,掌握Python3.x 版本语法,
+ 并结合讲师实际工作经验讲解Python使用技巧以及数据结构等相关知识,并为你精心配套了练习题目及实战案例。巧妙的课程设计,在项目实践中学习Python编程本质。
+
+
+
+
+
+

+
+
+
+
+
+
+
纯正商业级应用-微信小程序开发实战
+
+ 小程序的成功,让广大程序员早已不再纠结该不该学习小程序开发 ,但会纠结如何学习小程序开发, 直到他们遇到了
+ “七月”老师,你可以自行看看七月老师其它课程的学员对他课程的真实评价,选择他的课,不需要纠结,更不需要犹豫
+
+
+
+
+
+

+
+
+

+
+
+
+
+
+
+
Python Flask构建可扩展的RESTful API
+
+ 前后端分离大势所趋,本课程将构建一套优秀的RESTful API,可以适配小程序、App 、wap 、web前端页面,
+ 除此之外,课程扩展了Flask框架机制,培养编程思维,随心所欲玩转Flask
+
+
+
+
+
+

+
+
+
+
+
+
+
微信小程序商城构建全栈应用
+
+ 通过开发一个已上线的小程序商城全栈应用,学会如何打造iOS,Android,Web多端适配的服务端标准API,掌握三端分离开发方式,理解现代Web的基本架构思想
+
+
+
+
+
+

+
+
+

+
+
+
+
+
+
+
Python Flask高级编程
+
+ 通过一个项目的实践,深入浅出讲解Flask核心原理、剖析Flask源码,在解读Flask的同时,学习Python高级编程、培养面向对象思维,是市面上稀缺的优质课程
+
+
+
+
+
+

+
+
+
+
+
+
+
+
+
diff --git a/src/plugin/lin-cms-ui/assets/style/container.scss b/src/plugin/lin-cms-ui/assets/style/container.scss
index 1b36e482..071862c9 100644
--- a/src/plugin/lin-cms-ui/assets/style/container.scss
+++ b/src/plugin/lin-cms-ui/assets/style/container.scss
@@ -1,8 +1,8 @@
-.lin-wrap-ui :v-deep(.el-card__body) {
+.lin-wrap-ui /deep/ .el-card__body {
padding-top: 30px;
padding-bottom: 0px;
}
-.lin-wrap-ui :v-deep(.el-collapse) {
+.lin-wrap-ui /deep/ .el-collapse {
border-top: none;
border-bottom: none;
cursor: pointer;
diff --git a/src/plugin/lin-cms-ui/model/movie.js b/src/plugin/lin-cms-ui/model/movie.js
index fcbfcef7..f64402b1 100644
--- a/src/plugin/lin-cms-ui/model/movie.js
+++ b/src/plugin/lin-cms-ui/model/movie.js
@@ -28,7 +28,9 @@ class Movie {
recommend: 0,
remark: '这是一部不错的电影',
editFlag: false,
- thumb: element.thumb ? element.thumb : '',
+ thumb: element.thumb
+ ? element.thumb
+ : 'https://consumerminiaclprd01.blob.core.chinacloudapi.cn/miniappbackground/sfgmember/lin/270-400.png',
})
})
@@ -63,7 +65,9 @@ class Movie {
recommend: 0,
remark: '这是一部不错的电影',
editFlag: false,
- thumb: element.thumb ? element.thumb : '',
+ thumb: element.thumb
+ ? element.thumb
+ : 'https://consumerminiaclprd01.blob.core.chinacloudapi.cn/miniappbackground/sfgmember/lin/270-400.png',
})
}
}
diff --git a/src/plugin/lin-cms-ui/simulation/movie.js b/src/plugin/lin-cms-ui/simulation/movie.js
index e0994214..ec8a5bff 100644
--- a/src/plugin/lin-cms-ui/simulation/movie.js
+++ b/src/plugin/lin-cms-ui/simulation/movie.js
@@ -8,7 +8,8 @@ export const movieList = [
},
genres: ['犯罪', '剧情'],
title: '肖申克的救赎',
- thumb: '',
+ thumb:
+ 'https://consumerminiaclprd01.blob.core.chinacloudapi.cn/miniappbackground/sfgmember/lin/thumb/p480747492.webp',
casts: [
{
alt: 'https://movie.douban.com/celebrity/1054521/',
@@ -74,7 +75,8 @@ export const movieList = [
},
genres: ['剧情', '爱情', '同性'],
title: '霸王别姬',
- thumb: '',
+ thumb:
+ 'https://consumerminiaclprd01.blob.core.chinacloudapi.cn/miniappbackground/sfgmember/lin/thumb/p1910813120.webp',
casts: [
{
alt: 'https://movie.douban.com/celebrity/1003494/',
@@ -188,7 +190,8 @@ export const movieList = [
},
],
year: '1994',
- thumb: '',
+ thumb:
+ 'https://consumerminiaclprd01.blob.core.chinacloudapi.cn/miniappbackground/sfgmember/lin/thumb/p511118051.webp',
images: {
small: 'http://img1.doubanio.com/view/photo/s_ratio_poster/public/p511118051.webp',
large: 'http://img1.doubanio.com/view/photo/s_ratio_poster/public/p511118051.webp',
@@ -254,7 +257,8 @@ export const movieList = [
},
],
year: '1994',
- thumb: '',
+ thumb:
+ 'https://consumerminiaclprd01.blob.core.chinacloudapi.cn/miniappbackground/sfgmember/lin/thumb/p510876377.webp',
images: {
small: 'http://img3.doubanio.com/view/photo/s_ratio_poster/public/p510876377.webp',
large: 'http://img3.doubanio.com/view/photo/s_ratio_poster/public/p510876377.webp',
@@ -320,7 +324,8 @@ export const movieList = [
},
],
year: '1997',
- thumb: '',
+ thumb:
+ 'https://consumerminiaclprd01.blob.core.chinacloudapi.cn/miniappbackground/sfgmember/lin/thumb/p510861873.webp',
images: {
small: 'http://img1.doubanio.com/view/photo/s_ratio_poster/public/p510861873.webp',
large: 'http://img1.doubanio.com/view/photo/s_ratio_poster/public/p510861873.webp',
@@ -386,7 +391,8 @@ export const movieList = [
},
],
year: '1997',
- thumb: '',
+ thumb:
+ 'https://consumerminiaclprd01.blob.core.chinacloudapi.cn/miniappbackground/sfgmember/lin/thumb/p457760035.webp',
images: {
small: 'http://img1.doubanio.com/view/photo/s_ratio_poster/public/p457760035.webp',
large: 'http://img1.doubanio.com/view/photo/s_ratio_poster/public/p457760035.webp',
@@ -452,7 +458,8 @@ export const movieList = [
},
],
year: '2001',
- thumb: '',
+ thumb:
+ 'https://consumerminiaclprd01.blob.core.chinacloudapi.cn/miniappbackground/sfgmember/lin/thumb/p1606727862.webp',
images: {
small: 'http://img1.doubanio.com/view/photo/s_ratio_poster/public/p1606727862.webp',
large: 'http://img1.doubanio.com/view/photo/s_ratio_poster/public/p1606727862.webp',
@@ -518,7 +525,8 @@ export const movieList = [
},
],
year: '1993',
- thumb: '',
+ thumb:
+ 'https://consumerminiaclprd01.blob.core.chinacloudapi.cn/miniappbackground/sfgmember/lin/thumb/p492406163.webp',
images: {
small: 'http://img1.doubanio.com/view/photo/s_ratio_poster/public/p492406163.webp',
large: 'http://img1.doubanio.com/view/photo/s_ratio_poster/public/p492406163.webp',
@@ -584,7 +592,8 @@ export const movieList = [
},
],
year: '2010',
- thumb: '',
+ thumb:
+ 'https://consumerminiaclprd01.blob.core.chinacloudapi.cn/miniappbackground/sfgmember/lin/thumb/p513344864.webp',
images: {
small: 'http://img1.doubanio.com/view/photo/s_ratio_poster/public/p513344864.webp',
large: 'http://img1.doubanio.com/view/photo/s_ratio_poster/public/p513344864.webp',
@@ -650,7 +659,8 @@ export const movieList = [
},
],
year: '2009',
- thumb: '',
+ thumb:
+ 'https://consumerminiaclprd01.blob.core.chinacloudapi.cn/miniappbackground/sfgmember/lin/thumb/p524964016.webp',
images: {
small: 'http://img3.doubanio.com/view/photo/s_ratio_poster/public/p524964016.webp',
large: 'http://img3.doubanio.com/view/photo/s_ratio_poster/public/p524964016.webp',
@@ -716,7 +726,8 @@ export const movieList = [
},
],
year: '2008',
- thumb: '',
+ thumb:
+ 'https://consumerminiaclprd01.blob.core.chinacloudapi.cn/miniappbackground/sfgmember/lin/thumb/p1461851991.webp',
images: {
small: 'http://img1.doubanio.com/view/photo/s_ratio_poster/public/p1461851991.webp',
large: 'http://img1.doubanio.com/view/photo/s_ratio_poster/public/p1461851991.webp',
@@ -782,7 +793,8 @@ export const movieList = [
},
],
year: '2009',
- thumb: '',
+ thumb:
+ 'https://consumerminiaclprd01.blob.core.chinacloudapi.cn/miniappbackground/sfgmember/lin/thumb/p579729551.webp',
images: {
small: 'http://img1.doubanio.com/view/photo/s_ratio_poster/public/p579729551.webp',
large: 'http://img1.doubanio.com/view/photo/s_ratio_poster/public/p579729551.webp',
@@ -848,7 +860,8 @@ export const movieList = [
},
],
year: '1998',
- thumb: '',
+ thumb:
+ 'https://consumerminiaclprd01.blob.core.chinacloudapi.cn/miniappbackground/sfgmember/lin/thumb/p511146807.webp',
images: {
small: 'http://img3.doubanio.com/view/photo/s_ratio_poster/public/p511146807.webp',
large: 'http://img3.doubanio.com/view/photo/s_ratio_poster/public/p511146807.webp',
diff --git a/src/plugin/lin-cms-ui/view/basic/button/button.vue b/src/plugin/lin-cms-ui/view/basic/button/button.vue
index 1c5db81b..a6d2ad2e 100644
--- a/src/plugin/lin-cms-ui/view/basic/button/button.vue
+++ b/src/plugin/lin-cms-ui/view/basic/button/button.vue
@@ -2,7 +2,7 @@
Button 按钮
-
+
基础按钮
默认按钮
@@ -11,15 +11,14 @@
警告按钮
危险按钮
-
- {{ primary }}
+ {{ primary }}
-
+
朴素按钮
朴素按钮
@@ -28,14 +27,14 @@
警告按钮
危险按钮
-
+
- {{ plain }}
+ {{ plain }}
-
+
圆形按钮
@@ -51,14 +50,14 @@
- {{ circle }}
+ {{ circle }}
-
+
禁用状态
-
+
默认按钮
主要按钮
成功按钮
@@ -75,12 +74,12 @@
- {{ disabled }}
+ {{ disabled }}
-
+
图标按钮
@@ -89,24 +88,24 @@
上传
- {{ icon }}
+ {{ icon }}
-
+
加载中
加载中
- {{ loade }}
+ {{ loade }}
-
+
按钮组
-
+
上一页
下一页
@@ -117,12 +116,12 @@
- {{ group }}
+ {{ group }}
-
+
不同尺寸
默认按钮
@@ -130,7 +129,7 @@
小型按钮
超小按钮
-
+
默认按钮
中等按钮
小型按钮
@@ -138,7 +137,7 @@
- {{ size }}
+ {{ size }}
@@ -153,7 +152,7 @@ export default {
data() {
return {
text: '',
- primary: `
+ primary: `
默认按钮
主要按钮
成功按钮
@@ -171,7 +170,7 @@ export default {
-
+
diff --git a/src/plugin/lin-cms-ui/view/basic/icon/icon.vue b/src/plugin/lin-cms-ui/view/basic/icon/icon.vue
index 74c95f2f..ffc9dab3 100644
--- a/src/plugin/lin-cms-ui/view/basic/icon/icon.vue
+++ b/src/plugin/lin-cms-ui/view/basic/icon/icon.vue
@@ -43,7 +43,9 @@
diff --git a/src/plugin/lin-cms-ui/view/data/badge/badge.vue b/src/plugin/lin-cms-ui/view/data/badge/badge.vue
index afadccfd..4f201cce 100644
--- a/src/plugin/lin-cms-ui/view/data/badge/badge.vue
+++ b/src/plugin/lin-cms-ui/view/data/badge/badge.vue
@@ -86,7 +86,7 @@ export default {
data() {
return {
text: '',
- base: `
+ base: `
评论
@@ -152,7 +152,7 @@ export default {
@@ -370,7 +366,7 @@ export default {
margin-left: 10px;
vertical-align: bottom;
}
-.input-new-tag :v-deep(.el-input__inner) {
+.input-new-tag /deep/ .el-input__inner {
height: 24px;
}
diff --git a/src/plugin/lin-cms-ui/view/form/input.vue b/src/plugin/lin-cms-ui/view/form/input.vue
index 941225a7..a42f8277 100644
--- a/src/plugin/lin-cms-ui/view/form/input.vue
+++ b/src/plugin/lin-cms-ui/view/form/input.vue
@@ -50,14 +50,18 @@
- Http://
+ Http://
- .com
+ .com
@@ -189,7 +193,7 @@ export default {
diff --git a/src/plugin/lin-cms-ui/view/notice/notification.vue b/src/plugin/lin-cms-ui/view/notice/notification.vue
index f2931c2d..10e921db 100644
--- a/src/plugin/lin-cms-ui/view/notice/notification.vue
+++ b/src/plugin/lin-cms-ui/view/notice/notification.vue
@@ -3,9 +3,7 @@
Notification 通知
-
- 基础用法
-
+ 基础用法
@@ -21,9 +19,7 @@
-
- 带有倾向性
-
+ 带有倾向性
@@ -41,9 +37,7 @@
-
- 自定义弹出位置
-
+ 自定义弹出位置
@@ -62,9 +56,7 @@
-
- 带有偏移
-
+ 带有偏移
@@ -80,9 +72,7 @@
-
- 使用 HTML 片段
-
+ 使用 HTML 片段
diff --git a/src/plugin/lin-cms-ui/view/other/dialog.vue b/src/plugin/lin-cms-ui/view/other/dialog.vue
index c4255845..a273cea1 100644
--- a/src/plugin/lin-cms-ui/view/other/dialog.vue
+++ b/src/plugin/lin-cms-ui/view/other/dialog.vue
@@ -3,19 +3,15 @@
Dialog 对话框
-
- 基础用法
-
+ 基础用法
点击打开 Dialog
-
+
这是一段信息
-
-
-
+
@@ -25,13 +21,11 @@
-
- 自定义内容
-
+ 自定义内容
打开嵌套表格的 Dialog
-
+
@@ -42,7 +36,7 @@
打开嵌套表单的 Dialog
-
+
@@ -54,12 +48,10 @@
-
-
-
+
@@ -69,22 +61,18 @@
-
- 嵌套的 Dialog
-
+ 嵌套的 Dialog
如果需要在一个 Dialog 内部嵌套另一个 Dialog,需要使用 append-to-body 属性
点击打开外层 Dialog
-
-
-
-
-
+
+
+
@@ -95,21 +83,17 @@
-
- 居中布局
-
+ 居中布局
标题和底部可水平居中
点击打开 Dialog
-
+
需要注意的是内容是默认不居中的
-
-
-
+
@@ -355,7 +339,7 @@ export default {
margin-bottom: 20px;
}
-.dialogForm :v-deep(.el-select) {
+.dialogForm /deep/ .el-select {
width: 100%;
}
diff --git a/src/plugin/lin-cms-ui/view/other/timeline.vue b/src/plugin/lin-cms-ui/view/other/timeline.vue
index 95165569..b32dc0a9 100644
--- a/src/plugin/lin-cms-ui/view/other/timeline.vue
+++ b/src/plugin/lin-cms-ui/view/other/timeline.vue
@@ -3,9 +3,7 @@
Timeline 时间线
-
- 基础用法
-
+ 基础用法
Timeline 可拆分成多个按照时间戳正序或倒序排列的 activity,时间戳是其区分于其他控件的重要特征,使⽤时注意与
@@ -33,9 +31,7 @@
-
- ⾃定义时间戳
-
+ ⾃定义节点样式
@@ -60,9 +56,7 @@
-
- ⾃定义时间戳
-
+ ⾃定义时间戳
@@ -276,15 +270,15 @@ export default {
margin-bottom: 20px;
}
-.timeLineCard :v-deep(.el-card__body) {
+.timeLineCard /deep/ .el-card__body {
padding: 20px;
}
-.timeLineCard :v-deep(.el-card__body h4) {
+.timeLineCard /deep/ .el-card__body h4 {
margin: 20px 0px;
}
-.timeLineCard :v-deep(.el-card__body) {
+.timeLineCard /deep/ .el-card__body {
margin: 14px 0px;
}
diff --git a/src/plugin/lin-cms-ui/view/table/table-combo.vue b/src/plugin/lin-cms-ui/view/table/table-combo.vue
index 1319786a..10a83648 100644
--- a/src/plugin/lin-cms-ui/view/table/table-combo.vue
+++ b/src/plugin/lin-cms-ui/view/table/table-combo.vue
@@ -11,7 +11,7 @@
-
+
选择要展示的列:
@@ -51,7 +51,7 @@
>
-
+
@@ -72,7 +72,7 @@
-
+
-
+
{{ props.row.remark }}
@@ -126,7 +126,7 @@
-
+
-
+
{{ item.name }}
@@ -165,7 +165,7 @@
@@ -518,16 +518,16 @@ export default {
}
}
// dialog
-.tableSample :v-deep(.el-dialog__footer) {
+.tableSample /deep/ .el-dialog__footer {
text-align: left;
padding-left: 30px;
}
-.tableSample :v-deep(.el-dialog__header) {
+.tableSample /deep/ .el-dialog__header {
padding-left: 30px;
}
-.tableSample :v-deep(.el-dialog__body) {
+.tableSample /deep/ .el-dialog__body {
padding: 30px;
}
diff --git a/src/plugin/lin-cms-ui/view/table/table.vue b/src/plugin/lin-cms-ui/view/table/table.vue
index 34262441..c4133c9e 100644
--- a/src/plugin/lin-cms-ui/view/table/table.vue
+++ b/src/plugin/lin-cms-ui/view/table/table.vue
@@ -3,9 +3,7 @@
Table
-
- 基础表格
-
+ 基础表格
@@ -24,9 +22,7 @@
-
- 带边框表格
-
+ 带边框表格
@@ -45,9 +41,7 @@
-
- 固定表头
-
+ 固定表头
@@ -66,9 +60,7 @@
-
- 固定列
-
+ 固定列
@@ -87,9 +79,7 @@
-
- 带操作区表格
-
+ 带操作区表格
@@ -99,7 +89,7 @@
-
+
编辑
删除
diff --git a/src/plugin/poem/README.md b/src/plugin/poem/README.md
new file mode 100644
index 00000000..6d94cd7f
--- /dev/null
+++ b/src/plugin/poem/README.md
@@ -0,0 +1,26 @@
+# 唐诗宋词:poem
+唐诗宋词插件,是一个``AB型插件``,主要用于制作一个唐诗宋词展示页面,插件中为用户提供了获取唐诗宋词内容的api——``fetchPoem``。
+
+## 插件文件目录
+
+```
+.
+|——assets # 静态资源文件
+| └──images # 静态资源图片
+|
+|——models # 业务逻辑,api
+|
+|——views # 视图文件
+|
+|——config.js # 配置文件
+|
+|——route.js # 路由文件
+|
+└──info.json # 插件信息
+```
+
+## 事件:
+
+| Name | Argument | Desc |
+| :----: |:------------:| :----: |
+| fetchPoem | 无参数 | 获取唐诗宋词的api|
\ No newline at end of file
diff --git a/src/plugin/poem/config.js b/src/plugin/poem/config.js
new file mode 100644
index 00000000..e69de29b
diff --git a/src/plugin/poem/model/poem.js b/src/plugin/poem/model/poem.js
new file mode 100644
index 00000000..5a00868b
--- /dev/null
+++ b/src/plugin/poem/model/poem.js
@@ -0,0 +1,11 @@
+/* eslint-disable class-methods-use-this */
+import { get } from '@/lin/plugin/axios'
+
+class Poem {
+ async fetchPoem(params) {
+ const res = await get(`plugin/poem/all?count=${params.count}`)
+ return res
+ }
+}
+
+export default new Poem()
diff --git a/src/plugin/poem/package.json b/src/plugin/poem/package.json
new file mode 100644
index 00000000..816f2981
--- /dev/null
+++ b/src/plugin/poem/package.json
@@ -0,0 +1,6 @@
+{
+ "name": "lc-plugin-poem",
+ "version": "0.0.1",
+ "dependencies": {},
+ "devDependencies": {}
+}
\ No newline at end of file
diff --git a/src/plugin/poem/stage-config.js b/src/plugin/poem/stage-config.js
new file mode 100644
index 00000000..153e6aba
--- /dev/null
+++ b/src/plugin/poem/stage-config.js
@@ -0,0 +1,12 @@
+const poemsRouter = {
+ title: '插件示例',
+ type: 'view',
+ name: Symbol('poems'),
+ route: '/poems',
+ filePath: 'plugin/poem/view/poem.vue',
+ inNav: false,
+ icon: 'iconfont icon-chajian',
+ order: null,
+}
+
+export default poemsRouter
diff --git a/src/plugin/poem/view/poem.vue b/src/plugin/poem/view/poem.vue
new file mode 100644
index 00000000..72ea4f43
--- /dev/null
+++ b/src/plugin/poem/view/poem.vue
@@ -0,0 +1,262 @@
+
+
+
+
+
+
+
加载中...
+
+
+
+
![]()
+
+
{{ poem.title }}
+
+ {{ poem.author }}·{{ poem.dynasty }}
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/router/home-router.js b/src/router/home-router.js
index 2a8df151..7a262431 100644
--- a/src/router/home-router.js
+++ b/src/router/home-router.js
@@ -1,16 +1,12 @@
import stageConfig from '@/config/stage' // 引入舞台配置
-/**
- * 深度遍历配置树, 摘取叶子节点作为路由部分
- * @param {*} config 配置项
- * @param {*} fuc 回调函数
- */
+// 深度遍历配置树, 摘取叶子节点作为路由部分
function deepTravel(config, fuc) {
if (Array.isArray(config)) {
config.forEach(subConfig => {
deepTravel(subConfig, fuc)
})
- } else if (config.children?.length) {
+ } else if (config.children && config.children.length) {
config.children.forEach(subConfig => {
deepTravel(subConfig, fuc)
})
@@ -21,10 +17,8 @@ function deepTravel(config, fuc) {
const homeRouter = []
-/**
- * 构造舞台view路由
- */
deepTravel(stageConfig, viewConfig => {
+ // 构造舞台view路由
const viewRouter = {}
viewRouter.path = viewConfig.route
viewRouter.name = viewConfig.name
diff --git a/src/router/index.js b/src/router/index.js
index a9bb6984..577a855d 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -1,11 +1,11 @@
-import { createRouter, createWebHashHistory } from 'vue-router'
-import { ElMessage } from 'element-plus'
-
+import Vue from 'vue'
+import Router from 'vue-router'
+import routes from './route'
+import store from '../store'
import appConfig from '@/config/index'
import Util from '@/lin/util/util'
-import autoJump from '@/lin/util/auto-jump'
-import store from '../store'
-import routes from './route'
+
+Vue.use(Router)
// 判断是否需要登录访问, 配置位于 config 文件夹
let isLoginRequired = routeName => {
@@ -35,16 +35,18 @@ let isLoginRequired = routeName => {
return isLoginRequired(routeName)
}
-const router = createRouter({
- scrollBehavior: () => ({ y: 0 }),
+const router = new Router({
+ // mode: 'history',
+ scrollBehavior: () => ({
+ y: 0,
+ }),
base: process.env.BASE_URL,
- history: createWebHashHistory(),
routes,
})
router.beforeEach((to, from, next) => {
// 登录验证
- if (isLoginRequired(to.name) && !store.state.loggedIn) {
+ if (isLoginRequired(to.name) && !store.state.logined) {
next({ path: '/login' })
return
}
@@ -52,17 +54,21 @@ router.beforeEach((to, from, next) => {
// TODO: tab 模式重复点击验证
// 权限验证
- if (store?.state && store?.getters) {
+ if (store && store.state && store.getters) {
const { permissions, user } = store.getters
if (to.path !== '/about' && !Util.hasPermission(permissions, to.meta, user)) {
- ElMessage.error('您无此页面的权限哟')
+ Vue.prototype.$notify({
+ title: '无权限',
+ dangerouslyUseHTMLString: true,
+ message: '您无此页面的权限哟',
+ })
next({ path: '/about' })
return
}
}
// 路由发生变化重新计时
- autoJump(router)
+ Vue.prototype.$_lin_jump()
// 路由发生变化修改页面title
if (to.meta.title) {
diff --git a/src/router/route.js b/src/router/route.js
index 42e80107..045ff438 100644
--- a/src/router/route.js
+++ b/src/router/route.js
@@ -15,7 +15,7 @@ const routes = [
},
{
redirect: '/404',
- path: '/:pathMatch(.*)',
+ path: '*',
},
]
diff --git a/src/store/action.js b/src/store/action.js
index 020b318e..5fe5cdaf 100644
--- a/src/store/action.js
+++ b/src/store/action.js
@@ -1,18 +1,21 @@
import * as types from './mutation-type'
+import { removeToken } from '@/lin/util/token'
export default {
setUserAndState({ commit }, user) {
+ // 如果登陆成功,设置logined标志位
+ commit(types.SET_LOGINED, true)
+ // 设置全局用户状态
commit(types.SET_USER, user)
- commit(types.SET_LOGGED_IN, true)
},
loginOut({ commit }) {
- localStorage.clear()
- commit(types.REMOVE_LOGGED_IN, false)
+ removeToken()
+ commit(types.REMOVE_LOGINED, false)
},
readMessage({ commit }, message) {
commit(types.REMOVE_UNREAD_MESSAGE, message.id)
- commit(types.MARK_READ_MESSAGE, message)
+ commit(types.ADD_READED_MESSAGE, message)
},
}
diff --git a/src/store/getter.js b/src/store/getter.js
index cc089a52..e725a351 100644
--- a/src/store/getter.js
+++ b/src/store/getter.js
@@ -2,20 +2,70 @@ import Util from '@/lin/util/util'
let stageMap = {}
-export const loggedIn = state => state.loggedIn
+const deepTravel = (obj, fuc) => {
+ if (Array.isArray(obj)) {
+ obj.forEach(item => {
+ deepTravel(item, fuc)
+ })
+ return
+ }
+ if (obj && obj.children) {
+ fuc(obj)
+ deepTravel(obj.children, fuc)
+ return
+ }
+ if (obj.name) {
+ fuc(obj)
+ }
+}
+
+export const logined = state => state.logined
export const user = state => state.user
-export const alreadyReadMessages = state => state.alreadyReadMessages
+export const readedMessages = state => state.readedMessages
export const unreadMessages = state => state.unreadMessages
/**
- * 获取有权限的舞台配置
- * @param {*} state
+ * 在侧边栏展示时,如果当前路由 children 属性为空,则删除该路由
+ * @param {*} arr 路由配置项数据
+ */
+function IterationDelateMenuChildren(arr) {
+ if (arr.length) {
+ for (const i in arr) {
+ if (arr[i].children && !arr[i].children.length) {
+ delete arr[i]
+ } else if (arr[i].children && arr[i].children.length) {
+ IterationDelateMenuChildren(arr[i].children)
+ }
+ }
+ }
+ return arr
+}
+
+/**
+ * Shaking 掉无限制路由
+ * @param {array} stageConfig 路由配置项数据
+ * @param {array} permissions 当前登录管理员所拥有的权限集合
+ * @param {object} currentUser 当前登录管理员
*/
+function permissionShaking(stageConfig, permissions, currentUser) {
+ const shookConfig = stageConfig.filter(route => {
+ if (Util.hasPermission(permissions, route, currentUser)) {
+ if (route.children && route.children.length) {
+ route.children = permissionShaking(route.children, permissions, currentUser)
+ }
+ return true
+ }
+ return false
+ })
+ return IterationDelateMenuChildren(shookConfig)
+}
+
+// 获取有权限的舞台配置
export const permissionStageConfig = state => {
- const { stageConfig, permissions, user } = state
+ const { stageConfig, permissions, user } = state // eslint-disable-line
const tempStageConfig = Util.deepClone(stageConfig)
const shookConfig = permissionShaking(tempStageConfig, permissions, user)
@@ -28,19 +78,15 @@ export const permissionStageConfig = state => {
return shookConfig
}
-/**
- * 获取有权限的左侧菜单数据
- * @param {*} state
- * @param {*} getters 其他 getter
- */
-export const sidebarList = (state, getters) => {
- const { sidebarLevel } = state
- const { permissionStageConfig } = getters
+// 获取侧边栏配置
+export const sideBarList = (state, getter) => {
+ const { sideBarLevel } = state // eslint-disable-line
+ const { permissionStageConfig } = getter // eslint-disable-line
- function deepGetSidebar(target, level = 3) {
+ function deepGetSideBar(target, level = 3) {
// 集合节点处理
if (Array.isArray(target)) {
- const acc = target.map(item => deepGetSidebar(item, level - 1))
+ const acc = target.map(item => deepGetSideBar(item, level - 1))
return acc.filter(item => item !== null)
}
@@ -55,9 +101,8 @@ export const sidebarList = (state, getters) => {
sideConfig.name = target.name
sideConfig.title = target.title
sideConfig.icon = target.icon
- sideConfig.isElementIcon = target.isElementIcon
sideConfig.path = target.route || Util.getRandomStr(6)
- sideConfig.children = target.children.map(item => deepGetSidebar(item, level - 1))
+ sideConfig.children = target.children.map(item => deepGetSideBar(item, level - 1))
sideConfig.children = sideConfig.children.filter(item => item !== null)
return sideConfig
}
@@ -68,7 +113,6 @@ export const sidebarList = (state, getters) => {
sideConfig.name = target.name
sideConfig.title = target.title
sideConfig.icon = target.icon
- sideConfig.isElementIcon = target.isElementIcon
sideConfig.path = target.route
return sideConfig
}
@@ -79,7 +123,6 @@ export const sidebarList = (state, getters) => {
sideConfig.name = target.name
sideConfig.title = target.title
sideConfig.icon = target.icon
- sideConfig.isElementIcon = target.isElementIcon
sideConfig.path = target.route
// 如果 Tab 没有设置默认打开的路由, 则设置为第一个子节点路由
if (!sideConfig.path) {
@@ -89,14 +132,12 @@ export const sidebarList = (state, getters) => {
}
return sideConfig
}
-
// 最后一层, 都当做子节点处理
if (level <= 0) {
const sideConfig = {}
sideConfig.name = target.name
sideConfig.title = target.title
sideConfig.icon = target.icon
- sideConfig.isElementIcon = target.isElementIcon
sideConfig.path = Util.getRandomStr(6)
if (target.children && target.children.length > 0 && target.children[0].route) {
sideConfig.path = target.children[0].route
@@ -106,21 +147,23 @@ export const sidebarList = (state, getters) => {
return null
}
- const sideBar = deepGetSidebar(permissionStageConfig, sidebarLevel)
+ const sideBar = deepGetSideBar(permissionStageConfig, sideBarLevel)
return sideBar
}
-/**
- * 获取有权限的所有节点配置对象
- */
-export const getStageByName = () => name => stageMap[name]
+// 获取有权限的所有节点配置对象
+// eslint-disable-next-line
+export const getStageByName = () => {
+ return name => stageMap[name]
+}
-/**
- * 获取有权限的所有节点配置对象
- */
-export const getStageByRoute = () => path => {
- const result = Object.getOwnPropertySymbols(stageMap).find(key => stageMap[key].route === path)
- return stageMap[result]
+// 获取有权限的所有节点配置对象
+// eslint-disable-next-line
+export const getStageByRoute = () => {
+ return path => {
+ const result = Object.getOwnPropertySymbols(stageMap).find(key => stageMap[key].route === path)
+ return stageMap[result]
+ }
}
export const stageList = () => stageMap
@@ -166,62 +209,3 @@ export const getStageInfo = state => {
return stageInfo
}
}
-
-/**
- * 递归
- * @param {*} obj
- * @param {*} fuc
- */
-function deepTravel(obj, fuc) {
- if (Array.isArray(obj)) {
- obj.forEach(item => {
- deepTravel(item, fuc)
- })
- return
- }
- if (obj && obj.children) {
- fuc(obj)
- deepTravel(obj.children, fuc)
- return
- }
- if (obj.name) {
- fuc(obj)
- }
-}
-
-/**
- * 在侧边栏展示时,如果当前路由 children 属性为空,则删除该路由
- * @param {*} arr 路由配置项数据
- */
-function IterationDelateMenuChildren(arr) {
- if (arr.length) {
- // eslint-disable-next-line no-unused-vars
- for (const i in arr) {
- if (arr[i].children && !arr[i].children.length) {
- delete arr[i]
- } else if (arr[i].children && arr[i].children.length) {
- IterationDelateMenuChildren(arr[i].children)
- }
- }
- }
- return arr
-}
-
-/**
- * Shaking 掉无权限路由
- * @param {array} stageConfig 路由配置项数据
- * @param {array} permissions 当前登录管理员所拥有的权限集合
- * @param {object} currentUser 当前登录管理员
- */
-function permissionShaking(stageConfig, permissions, currentUser) {
- const shookConfig = stageConfig.filter(route => {
- if (Util.hasPermission(permissions, route, currentUser)) {
- if (route.children && route.children.length) {
- route.children = permissionShaking(route.children, permissions, currentUser)
- }
- return true
- }
- return false
- })
- return IterationDelateMenuChildren(shookConfig)
-}
diff --git a/src/store/index.js b/src/store/index.js
index 3410ef3c..5925bd32 100644
--- a/src/store/index.js
+++ b/src/store/index.js
@@ -1,27 +1,31 @@
-import { createStore, createLogger } from 'vuex'
+import Vue from 'vue'
+import Vuex from 'vuex'
+import createLogger from 'vuex/dist/logger'
import VuexPersistence from 'vuex-persist'
-
import mutations from './mutation'
import state from './state'
import * as getters from './getter'
import actions from './action'
+Vue.use(Vuex)
+
const vuexLocal = new VuexPersistence({
storage: window.localStorage,
reducer: stateData => ({
+ // eslint-disable-line
+ logined: stateData.logined,
user: stateData.user,
- loggedIn: stateData.loggedIn,
permissions: stateData.permissions,
}),
})
const debug = process.env.NODE_ENV !== 'production'
-export default createStore({
+export default new Vuex.Store({
state,
getters,
- actions,
mutations,
- strict: debug,
+ actions,
plugins: debug ? [vuexLocal.plugin, createLogger()] : [vuexLocal.plugin],
+ strict: debug,
})
diff --git a/src/store/mutation-type.js b/src/store/mutation-type.js
index 5eb93b4d..57d8558a 100644
--- a/src/store/mutation-type.js
+++ b/src/store/mutation-type.js
@@ -1,15 +1,15 @@
-export const SET_LOGGED_IN = 'SET_LOGGED_IN'
+export const SET_LOGINED = 'SET_LOGINED'
-export const REMOVE_LOGGED_IN = 'REMOVE_LOGGED_IN'
+export const REMOVE_LOGINED = 'REMOVE_LOGINED'
export const SET_USER = 'SET_USER'
-export const MARK_READ_MESSAGE = 'MARK_READ_MESSAGE'
+export const ADD_READED_MESSAGE = 'ADD_READED_MESSAGE'
export const REMOVE_UNREAD_MESSAGE = 'REMOVE_UNREAD_MESSAGE'
-export const MARK_UNREAD_MESSAGE = 'MARK_UNREAD_MESSAGE'
+export const ADD_UNREAD_MESSAGE = 'ADD_UNREAD_MESSAGE'
export const SET_USER_PERMISSIONS = 'SET_USER_PERMISSIONS'
-export const SET_REFRESH_OPTION = 'SET_REFRESH_OPTION'
+export const SET_REFERSH_OPTION = 'SET_REFERSH_OPTION'
diff --git a/src/store/mutation.js b/src/store/mutation.js
index 719463db..47c3a556 100644
--- a/src/store/mutation.js
+++ b/src/store/mutation.js
@@ -1,12 +1,13 @@
import * as types from './mutation-type'
export default {
- [types.SET_LOGGED_IN](state) {
- state.loggedIn = true
+ [types.SET_LOGINED](state) {
+ /* eslint no-param-reassign: 0 */
+ state.logined = true
},
- [types.REMOVE_LOGGED_IN](state) {
- state.loggedIn = false
+ [types.REMOVE_LOGINED](state) {
+ state.logined = false
state.user = null
},
@@ -14,11 +15,11 @@ export default {
state.user = payload
},
- [types.MARK_READ_MESSAGE](state, payload) {
- state.alreadyReadMessages.push(payload)
+ [types.ADD_READED_MESSAGE](state, payload) {
+ state.readedMessages.push(payload)
},
- [types.MARK_UNREAD_MESSAGE](state, payload) {
+ [types.ADD_UNREAD_MESSAGE](state, payload) {
// console.log('===: ', payload)
state.unreadMessages.push(payload)
},
@@ -31,13 +32,19 @@ export default {
},
[types.SET_USER_PERMISSIONS](state, permissions) {
- state.permissions = permissions
- .map(permission => Object.values(permission))
- .flat(2)
- .map(p => p.permission)
- },
-
- [types.SET_REFRESH_OPTION](state, option) {
+ const _permissions = []
+ for (let i = 0; i < permissions.length; i++) {
+ for (const key in permissions[i]) {
+ // console.log(i, state.user.permissions[i][key])
+ for (let j = 0; j < permissions[i][key].length; j++) {
+ _permissions.push(permissions[i][key][j].permission)
+ }
+ }
+ }
+ state.permissions = _permissions
+ },
+
+ [types.SET_REFERSH_OPTION](state, option) {
state.refreshOptions = option
},
}
diff --git a/src/store/state.js b/src/store/state.js
index a1e36404..6462a0ff 100644
--- a/src/store/state.js
+++ b/src/store/state.js
@@ -1,24 +1,21 @@
-import appConfig from '@/config/index' // 引入项目配置
import stageConfig from '@/config/stage' // 引入舞台配置
+import AppConfig from '@/config/index' // 引入项目配置
export default {
+ logined: false, // 是否登录
user: {}, // 当前用户
- loggedIn: false, // 是否登录
- permissions: [], // 每个用户的所有权限
-
+ sideBarLevel: AppConfig.sideBarLevel || 3,
+ defaultRoute: AppConfig.defaultRoute || '/about',
// 推送消息
+ readedMessages: [],
unreadMessages: [],
- alreadyReadMessages: [],
+ permissions: [], // 每个用户的所有权限
// 舞台配置
stageConfig,
-
// 当前页信息
currentRoute: {
config: null,
treePath: [],
},
-
- sidebarLevel: appConfig.sidebarLevel || 3,
- defaultRoute: appConfig.defaultRoute || '/about',
}
diff --git a/src/view/about/about.vue b/src/view/about/about.vue
index 6c7b7596..09cc489b 100644
--- a/src/view/about/about.vue
+++ b/src/view/about/about.vue
@@ -6,7 +6,7 @@
您还可以点击林间有风官方网站,查看更多作品
-
+
@@ -169,35 +169,23 @@
@@ -466,12 +454,12 @@ export default {
.personal-tabs {
margin-bottom: 20px;
}
- .personal-tabs :v-deep(.is-top) {
+ .personal-tabs /deep/ .is-top {
width: 320px;
display: flex;
justify-content: space-around;
}
- .personal-tabs :v-deep(.el-tabs__content) {
+ .personal-tabs /deep/ .el-tabs__content {
text-indent: 20px;
}
}
diff --git a/src/view/admin/group/group-create.vue b/src/view/admin/group/group-create.vue
index 46ae4940..2339b6b6 100644
--- a/src/view/admin/group/group-create.vue
+++ b/src/view/admin/group/group-create.vue
@@ -5,23 +5,28 @@
-
+
-
+
-
+
@@ -36,100 +41,78 @@
diff --git a/src/view/admin/group/group-permission.vue b/src/view/admin/group/group-permission.vue
index e3876411..eb877d18 100644
--- a/src/view/admin/group/group-permission.vue
+++ b/src/view/admin/group/group-permission.vue
@@ -6,7 +6,7 @@
@@ -34,33 +32,43 @@
diff --git a/src/view/admin/group/use-group.js b/src/view/admin/group/use-group.js
deleted file mode 100644
index 56179f8e..00000000
--- a/src/view/admin/group/use-group.js
+++ /dev/null
@@ -1,127 +0,0 @@
-import { ref, onMounted, reactive } from 'vue'
-import { ElMessageBox, ElMessage } from 'element-plus'
-import AdminModel from '@/lin/model/admin'
-
-export const useGroupList = () => {
- const tableData = ref([]) // 表格数据
- const loading = ref(false)
-
- /**
- * 获取所有分组并传给table渲染
- */
- const getAllGroups = async () => {
- try {
- loading.value = true
- tableData.value = await AdminModel.getAllGroups()
- loading.value = false
- } catch (e) {
- loading.value = false
- console.error(e)
- }
- }
-
- /**
- * 删除某项数据
- * @param {object} id 选中的一行数据 ID
- */
- const handleDelete = id => {
- let res = {}
- ElMessageBox.confirm('此操作将永久删除该分组, 是否继续?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning',
- }).then(async () => {
- try {
- loading.value = true
- res = await AdminModel.deleteOneGroup(id)
- } catch (e) {
- loading.value = false
- console.log(e)
- }
- if (res.code < window.MAX_SUCCESS_CODE) {
- await getAllGroups()
- ElMessage.message({ type: 'success', message: `${res.message}` })
- } else {
- loading.value = false
- ElMessage.message({ type: 'error', message: `${res.message}` })
- }
- })
- }
-
- onMounted(async () => {
- await getAllGroups()
- })
-
- return {
- loading,
- tableData,
- handleDelete,
- getAllGroups,
- }
-}
-
-export const useEditGroup = (ctx, getAllGroups) => {
- let cacheGroup = {}
- const id = ref(0) // 分组id
- const form = ref(null)
- const group = reactive({ name: '', info: '' })
- const dialogFormVisible = ref(false) // 是否弹窗
- const rules = {
- // 表单验证规则
- info: [],
- name: [{ required: true, message: '请输入分组名称', trigger: 'blur' }],
- }
-
- /**
- * 获取所拥有的权限并渲染 由子组件提供
- * @param {*} val 选中的某行数据
- */
- const handleEdit = row => {
- id.value = row.id
- group.name = row.name
- group.info = row.info
- cacheGroup = { ...group }
- dialogFormVisible.value = true
- }
-
- /**
- * 修改分组信息
- */
- const confirmEdit = async () => {
- if (group.name === '') {
- ElMessage.warning('请将信息填写完整')
- return
- }
- if (cacheGroup.name !== group.name || cacheGroup.info !== group.info) {
- const res = await AdminModel.updateOneGroup(group.name, group.info, id.value)
- if (res.code < window.MAX_SUCCESS_CODE) {
- ElMessage.success(`${res.message}`)
- getAllGroups()
- }
- }
- dialogFormVisible.value = false
- }
-
- const handleClose = done => {
- done()
- }
- const rowDoubleClick = row => {
- handleEdit(row)
- }
- const resetForm = () => {
- form.value.resetFields()
- }
-
- return {
- id,
- form,
- rules,
- group,
- resetForm,
- handleEdit,
- confirmEdit,
- handleClose,
- rowDoubleClick,
- dialogFormVisible,
- }
-}
diff --git a/src/view/admin/user/use-user.js b/src/view/admin/user/use-user.js
deleted file mode 100644
index 03122f9f..00000000
--- a/src/view/admin/user/use-user.js
+++ /dev/null
@@ -1,168 +0,0 @@
-import { ref, onMounted } from 'vue'
-import AdminModel from '@/lin/model/admin'
-
-export const useUserList = () => {
- const allGroups = ref([])
- const pageCount = ref(10) // 每页10条数据
- const tableData = ref([])
- const groupId = ref(null)
- const loading = ref(false)
- const totalNum = ref(0) // 分组内的用户总数
- const currentPage = ref(1) // 默认获取第一页的数据
-
- /**
- * 获取管理员列表数据
- */
- const getAdminUsers = async () => {
- let res = {}
- try {
- loading.value = true
- res = await AdminModel.getAdminUsers({
- groupId: groupId.value,
- count: pageCount.value,
- page: currentPage.value - 1,
- })
- loading.value = false
- tableData.value = shuffleList(res.items)
- totalNum.value = res.total
- } catch (e) {
- loading.value = false
- console.error(e)
- }
- }
-
- /**
- * 获取所有分组数据
- */
- const getAllGroups = async () => {
- try {
- loading.value = true
- allGroups.value = await AdminModel.getAllGroups()
- loading.value = false
- } catch (e) {
- loading.value = false
- console.error(e)
- }
- }
-
- /**
- * 多分组用 ',' 分割展示
- */
- const shuffleList = users => {
- const list = []
- users.forEach(element => {
- element.groupNames = element.groups.map(item => item.name).join(',')
- list.push(element)
- })
- return list
- }
-
- onMounted(async () => {
- await getAdminUsers()
- getAllGroups()
- })
-
- return {
- groupId,
- loading,
- totalNum,
- allGroups,
- pageCount,
- tableData,
- currentPage,
- getAdminUsers,
- }
-}
-
-export const useFormData = (ctx, dialogFormVisible, getAdminUsers, currentPage, loading, info, password) => {
- const id = ref(null)
- const activeTab = ref('修改信息')
-
- /**
- * 监听子组件更新管理员信息是否成功
- * 如果更新了管理员信息,重新请求管理员列表
- */
- const handleInfoResult = flag => {
- dialogFormVisible.value = false
- if (flag === true) {
- getAdminUsers()
- }
- }
-
- /**
- * 根据分组查询管理员
- */
- const handleChange = async () => {
- currentPage.value = 1
- loading.value = true
- await getAdminUsers()
- loading.value = false
- }
-
- /**
- * 监听是否完成密码更新
- * @param {boolean} result 是否完成密码更新
- */
- const handlePasswordResult = result => {
- if (result === true) {
- dialogFormVisible.value = false
- }
- }
-
- /**
- * 翻页
- */
- const handleCurrentChange = async val => {
- currentPage.value = val
- await getAdminUsers()
- }
-
- /**
- * 提交表单信息,更新管理员信息
- */
- const confirmEdit = async () => {
- if (activeTab.value === '修改信息') {
- await info.value.submitForm()
- } else {
- await password.value.submitForm()
- }
- }
-
- /**
- * 关闭编辑弹窗
- */
- const handleClose = done => {
- dialogFormVisible.value = false
- password.value.resetForm()
- activeTab.value = '修改信息'
- done()
- }
-
- const handleClick = tab => {
- activeTab.value = tab.props.name
- }
-
- /**
- * 重置表单
- */
- const resetForm = () => {
- if (activeTab.value === '修改信息') {
- info.value.resetForm()
- } else {
- password.value.resetForm()
- }
- }
-
- return {
- id,
- activeTab,
- resetForm,
- confirmEdit,
- handleClose,
- handleClick,
- handleChange,
- handleInfoResult,
- handleCurrentChange,
- handlePasswordResult,
- }
-}
diff --git a/src/view/admin/user/user-create.vue b/src/view/admin/user/user-create.vue
index 294c7348..a6772e53 100644
--- a/src/view/admin/user/user-create.vue
+++ b/src/view/admin/user/user-create.vue
@@ -1,12 +1,11 @@
@@ -242,3 +264,20 @@ function getRules(userInfo) {
}
}
+
+
diff --git a/src/view/admin/user/user-list.vue b/src/view/admin/user/user-list.vue
index f630e6b2..f9eb9a8c 100644
--- a/src/view/admin/user/user-list.vue
+++ b/src/view/admin/user/user-list.vue
@@ -3,50 +3,49 @@
-
-
-
-
-
- 编辑
- 删除
-
-
-
+
-
-
+
+
@@ -55,129 +54,221 @@
-
-
-
+
diff --git a/src/view/admin/user/user-password.vue b/src/view/admin/user/user-password.vue
index e9d3316e..32404d8c 100644
--- a/src/view/admin/user/user-password.vue
+++ b/src/view/admin/user/user-password.vue
@@ -1,133 +1,107 @@
-
-
+
+
-
-
+
+
- 保存
- 取消
+ 保存
+ 取消
-
-
diff --git a/src/view/book/book-create.vue b/src/view/book/book-create.vue
new file mode 100644
index 00000000..7dc11794
--- /dev/null
+++ b/src/view/book/book-create.vue
@@ -0,0 +1,94 @@
+
+
+
新建图书
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 保 存
+ 重 置
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/view/book/book-list.vue b/src/view/book/book-list.vue
index 76d1e5be..092bf38a 100644
--- a/src/view/book/book-list.vue
+++ b/src/view/book/book-list.vue
@@ -2,104 +2,94 @@
-
+
-
-
-
-
-
-
- 编辑
- 删除
-
-
-
+
-
+
diff --git a/src/view/book/book-modify.vue b/src/view/book/book-modify.vue
new file mode 100644
index 00000000..6e47bfcd
--- /dev/null
+++ b/src/view/book/book-modify.vue
@@ -0,0 +1,108 @@
+
+
+
+ 修改图书 返回
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 保 存
+ 重 置
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/view/book/book.vue b/src/view/book/book.vue
deleted file mode 100644
index b31dccb9..00000000
--- a/src/view/book/book.vue
+++ /dev/null
@@ -1,171 +0,0 @@
-
-
-
新建图书{{ editBookId }}
-
- 修改图书 返回
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 保 存
- 重 置
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/view/center/center.vue b/src/view/center/center.vue
index 1d4a910f..97978443 100644
--- a/src/view/center/center.vue
+++ b/src/view/center/center.vue
@@ -32,13 +32,13 @@
-
+
+
+
+
diff --git a/src/view/home/home.vue b/src/view/home/home.vue
index 51da858a..e286632d 100644
--- a/src/view/home/home.vue
+++ b/src/view/home/home.vue
@@ -1,8 +1,8 @@
-
-
+
+