Skip to content

Commit e914057

Browse files
committed
Merge branch '0.3.6' into vue-next
2 parents 032e3eb + f82da10 commit e914057

5 files changed

Lines changed: 28 additions & 17 deletions

File tree

README.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<a href="#简介">简介</a>&nbsp;|&nbsp;<a href="#快速上手">快速上手</a>&nbsp;|&nbsp;<a href="#版本日志">版本日志</a>
1010
</p>
1111

12-
![](https://img.shields.io/badge/版本-0.2.1-3963bc.svg)
12+
![](https://img.shields.io/badge/版本-0.3.5-3963bc.svg)
1313
![](https://img.shields.io/badge/node-8.11.0+-3963bc.svg)
1414
![](https://img.shields.io/badge/脚手架-vuecli3-3963bc.svg)
1515
![](https://img.shields.io/badge/license-MIT-3963bc.svg)
@@ -25,17 +25,19 @@ Lin-CMS 可以有效的帮助开发者提高 CMS 的开发效率。
2525

2626
Lin-CMS 是一套前后端完整的解决方案,后端部署请移步:
2727

28+
[lin-cms-koa](https://github.com/TaleLin/lin-cms-koa)
29+
2830
[lin-cms-flask](https://github.com/TaleLin/lin-cms-flask)
2931

30-
[lin-cms-koa](https://github.com/TaleLin/lin-cms-koa)
32+
[lin-cms-spring-boot](https://github.com/TaleLin/lin-cms-spring-boot)
3133

3234
### 注意
3335

3436
**Lin-CMS 是工程类开源项目,不能保证无缝升级**
3537

3638
### 文档地址
3739

38-
[http://doc.cms.7yue.pro/](http://doc.cms.7yue.pro/)
40+
[http://doc.cms.talelin.com/](http://doc.cms.talelin.com/)
3941

4042
### 线上 Demo
4143

@@ -91,13 +93,13 @@ npm run serve or yarn (run) serve
9193
<br>
9294
<img class="QR-img" src="http://i1.sleeve.7yue.pro/wechat-account.jpeg" width="150" height="150">
9395

94-
QQ群搜索:林间有风 或 643205479
96+
QQ群搜索:Lin CMS 官方交流群 或 814597236
9597

96-
<img src="https://consumerminiaclprd01.blob.core.chinacloudapi.cn/miniappbackground/sfgmember/lin/qrcode_1558012902375.jpg" width="150" height="205" >
98+
<img src="https://consumerminiaclprd01.blob.core.chinacloudapi.cn/miniappbackground/sfgmember/lin/lin-cms.png" width="150" height="205" >
9799

98100
## 版本日志
99101

100-
最新版本 `0.3.4`
102+
最新版本 `0.3.5`
101103

102104
### 0.3.5
103105

src/component/layout/breadcrumb.vue

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,6 @@ export default {
2121
return this.stageInfo.map(item => item.title).filter(item => !!item)
2222
},
2323
},
24-
// created() {},
25-
// mounted() {},
26-
// watch: {},
27-
// components: {},
2824
}
2925
</script>
3026

src/plugin/custom/stage-config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const CustomRouter = {
1212
title: 'upload 图像上传',
1313
type: 'view',
1414
name: 'ImgsUploadDemo',
15-
route: '/upload-image/stage1',
15+
route: '/custom/upload-image',
1616
filePath: 'plugin/custom/view/upload-image.vue',
1717
inNav: true,
1818
icon: 'iconfont icon-zidingyi',

src/router/home-router.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
import stageConfig from '@/config/stage' // 引入舞台配置
22

3+
console.log('stageConfig', stageConfig)
4+
35
// 深度遍历配置树, 摘取叶子节点作为路由部分
46
function deepTravel(config, fuc) {
57
if (Array.isArray(config)) {
68
config.forEach(subConfig => {
79
deepTravel(subConfig, fuc)
810
})
9-
} else if (config.children) {
11+
} else if (config.children && config.children.length) {
1012
config.children.forEach(subConfig => {
1113
deepTravel(subConfig, fuc)
1214
})
@@ -33,4 +35,6 @@ deepTravel(stageConfig, viewConfig => {
3335
homeRouter.push(viewRouter)
3436
})
3537

38+
console.log(homeRouter)
39+
3640
export default homeRouter

src/store/getter.js

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,25 +27,34 @@ export const readedMessages = state => state.readedMessages
2727

2828
export const unreadMessages = state => state.unreadMessages
2929

30+
/**
31+
* 在侧边栏展示时,如果当前路由 children 属性为空,则删除该路由
32+
* @param {*} arr 路由配置项数据
33+
*/
3034
function IterationDelateMenuChildren(arr) {
3135
if (arr.length) {
3236
for (const i in arr) {
3337
if (arr[i].children && !arr[i].children.length) {
34-
delete arr[i] // eslint-disable-line
35-
} else if (arr[i].children && !arr[i].children.length) {
38+
delete arr[i]
39+
} else if (arr[i].children && arr[i].children.length) {
3640
IterationDelateMenuChildren(arr[i].children)
3741
}
3842
}
3943
}
4044
return arr
4145
}
4246

47+
/**
48+
* Shaking 掉无限制路由
49+
* @param {array} stageConfig 路由配置项数据
50+
* @param {array} permissions 当前登录管理员所拥有的权限集合
51+
* @param {object} currentUser 当前登录管理员
52+
*/
4353
function permissionShaking(stageConfig, permissions, currentUser) {
44-
// eslint-disable-line
4554
const shookConfig = stageConfig.filter(route => {
4655
if (Util.hasPermission(permissions, route, currentUser)) {
4756
if (route.children && route.children.length) {
48-
route.children = permissionShaking(route.children, permissions, currentUser) // eslint-disable-line
57+
route.children = permissionShaking(route.children, permissions, currentUser)
4958
}
5059
return true
5160
}
@@ -176,7 +185,7 @@ export const getStageInfo = state => {
176185
return result
177186
}
178187

179-
if (stages.children) {
188+
if (stages.children && stages.children.length) {
180189
result = findStage(stages.children, name)
181190
if (result) {
182191
result.unshift(stages)

0 commit comments

Comments
 (0)