imatrix-ui 0.2.4-up → 0.2.6-up
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/super-ui.css +1 -1
- package/lib/super-ui.js +169 -190
- package/lib/super-ui.umd.cjs +13 -19
- package/package.json +2 -5
- package/packages/fs-upload/src/fs-upload-single.vue +313 -310
- package/packages/super-nine-grid/src/super-nine-grid.vue +1137 -1118
- package/src/styles/theme/dark-blue/index.scss +6 -5
- package/src/utils/auth-api.js +3 -2
- package/src/views/dsc-component/Sidebar/index.vue +219 -218
- package/src/views/layout/components/Breadcrumb/index.vue +141 -139
- package/src/views/layout/components/Menubar/index.vue +201 -201
- package/src/views/layout/components/Sidebar/index.vue +133 -133
|
@@ -1,156 +1,158 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
<el-breadcrumb class="app-breadcrumb" separator=">">
|
|
3
|
+
<transition-group name="breadcrumb" tag="span">
|
|
4
|
+
<el-breadcrumb-item
|
|
5
|
+
v-for="(item, index) in levelListWithTitle"
|
|
6
|
+
:key="item.path + '-' + index"
|
|
7
|
+
>
|
|
8
8
|
<span class="no-redirect">
|
|
9
9
|
{{ $t(item.meta.title) }}
|
|
10
10
|
</span>
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
</el-breadcrumb-item>
|
|
12
|
+
</transition-group>
|
|
13
|
+
</el-breadcrumb>
|
|
14
14
|
</template>
|
|
15
15
|
|
|
16
16
|
<script>
|
|
17
|
-
import
|
|
18
|
-
import { getLanguageWithLocale } from '../../../../utils/util'
|
|
17
|
+
import {getLanguageWithLocale} from '../../../../utils/util'
|
|
19
18
|
import * as pathToRegexp from 'path-to-regexp'
|
|
20
|
-
import
|
|
19
|
+
import Cookies from 'js-cookie'
|
|
21
20
|
|
|
22
21
|
export default {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
22
|
+
name: 'Breadcrumb',
|
|
23
|
+
data() {
|
|
24
|
+
return {
|
|
25
|
+
levelList: null,
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
computed: {
|
|
29
|
+
levelListWithTitle() {
|
|
30
|
+
return this.levelList.filter(
|
|
31
|
+
(item) => item.meta.title !== undefined && item.meta.title !== null
|
|
32
|
+
)
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
watch: {
|
|
36
|
+
$route() {
|
|
37
|
+
this.getBreadcrumb()
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
created() {
|
|
41
|
+
this.getBreadcrumb()
|
|
42
|
+
},
|
|
43
|
+
methods: {
|
|
44
|
+
getBreadcrumb() {
|
|
45
|
+
const {params} = this.$route
|
|
46
|
+
console.log('this.$route.matched==', this.$route.matched)
|
|
47
|
+
let matched = this.$route.matched.filter((item) => {
|
|
48
|
+
if (item.name) {
|
|
49
|
+
// To solve this problem https://github.com/PanJiaChen/vue-element-admin/issues/561
|
|
50
|
+
var toPath = pathToRegexp.compile(item.path)
|
|
51
|
+
item.path = toPath(params)
|
|
52
|
+
return true
|
|
53
|
+
}
|
|
54
|
+
})
|
|
55
|
+
// const first = matched[0]
|
|
56
|
+
if (matched) {
|
|
57
|
+
let systemName
|
|
58
|
+
const language = getLanguageWithLocale()
|
|
59
|
+
const systemNameObj =
|
|
60
|
+
window.$vueApp.config.globalProperties.systemNameObj
|
|
61
|
+
if (systemNameObj) {
|
|
62
|
+
systemName = systemNameObj[language]
|
|
63
|
+
}
|
|
64
|
+
matched = [
|
|
65
|
+
{path: '/', redirect: 'noredirect', meta: {title: systemName}},
|
|
66
|
+
].concat(matched)
|
|
67
|
+
const cookieMenu = Cookies.get('selectMenu')
|
|
68
|
+
const leftSelectMenu =
|
|
69
|
+
window.$vueApp.config.globalProperties._selectMenu
|
|
70
|
+
let selectMenu
|
|
71
|
+
if (leftSelectMenu) {
|
|
72
|
+
selectMenu = leftSelectMenu
|
|
73
|
+
} else if (cookieMenu) {
|
|
74
|
+
selectMenu = cookieMenu
|
|
75
|
+
}
|
|
76
|
+
if (selectMenu) {
|
|
77
|
+
// 解决表单页面无法获得列表路由
|
|
78
|
+
const path = selectMenu.substring(0, selectMenu.indexOf('~~'))
|
|
79
|
+
const title = selectMenu.substring(selectMenu.indexOf('~~') + 2)
|
|
80
|
+
if (matched && matched.length > 0) {
|
|
81
|
+
const lastRoute = matched[matched.length - 1]
|
|
82
|
+
if (this.isShouldConcatLastMenu(title, path, lastRoute)) {
|
|
83
|
+
matched.push({path: path, meta: {title: title}})
|
|
84
|
+
}
|
|
85
|
+
} else {
|
|
86
|
+
matched.push({path: path, meta: {title: title}})
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
this.levelList = matched
|
|
91
|
+
},
|
|
92
|
+
// 新建页面时会把列表页面路由刷没,导致菜单路径缺少最后一层菜单问题
|
|
93
|
+
isShouldConcatLastMenu(title, path, lastRoute) {
|
|
94
|
+
if (
|
|
95
|
+
this.isTitleNotEqual(title, lastRoute) &&
|
|
96
|
+
this.isPathNotEqual(path, lastRoute)
|
|
97
|
+
) {
|
|
98
|
+
// title和path都不同,表示是不同的页面,需要添加到matched集合中
|
|
99
|
+
return true
|
|
100
|
+
}
|
|
101
|
+
return false
|
|
102
|
+
},
|
|
103
|
+
/**
|
|
104
|
+
* Vue.prototype._selectMenu的菜单标题是否与最后的路由页面标题一致
|
|
105
|
+
* 返回true表示不一样,返回false表示一样
|
|
106
|
+
*/
|
|
107
|
+
isTitleNotEqual(title, lastRoute) {
|
|
108
|
+
if (
|
|
109
|
+
title &&
|
|
110
|
+
lastRoute.meta &&
|
|
111
|
+
title !== lastRoute.meta.title &&
|
|
112
|
+
title !== this.$t(lastRoute.meta.title)
|
|
113
|
+
) {
|
|
114
|
+
// 表示title不一样,当前可能是在表单页面,需要添加到matched集合中
|
|
115
|
+
return true
|
|
116
|
+
}
|
|
117
|
+
return false
|
|
118
|
+
},
|
|
119
|
+
/**
|
|
120
|
+
* Vue.prototype._selectMenu的菜单的访问路径是否与最后的路由页面的路径一致
|
|
121
|
+
* 返回true表示不一样,返回false表示一样
|
|
122
|
+
*/
|
|
123
|
+
isPathNotEqual(path, lastRoute) {
|
|
124
|
+
if (path && lastRoute.path && path !== lastRoute.path) {
|
|
125
|
+
// 表示path不一样,当前可能是在表单页面,需要添加到matched集合中
|
|
126
|
+
return true
|
|
127
|
+
}
|
|
128
|
+
return false
|
|
129
|
+
},
|
|
130
|
+
},
|
|
132
131
|
}
|
|
133
132
|
</script>
|
|
134
133
|
|
|
135
134
|
<style lang="scss" rel="stylesheet/scss" scoped>
|
|
136
135
|
.app-breadcrumb.el-breadcrumb {
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
136
|
+
background-color: #eee;
|
|
137
|
+
width: 100%;
|
|
138
|
+
border: 1px solid #ccc;
|
|
139
|
+
bottom: 2px;
|
|
140
|
+
margin-left: 2px;
|
|
141
|
+
display: inline-block;
|
|
142
|
+
font-size: 14px;
|
|
143
|
+
line-height: 40px;
|
|
144
|
+
|
|
145
|
+
.no-redirect {
|
|
146
|
+
color: #333;
|
|
147
|
+
cursor: text;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.el-breadcrumb__item {
|
|
151
|
+
padding-left: 5px;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.el-breadcrumb__separator {
|
|
155
|
+
margin: 0 5px;
|
|
156
|
+
}
|
|
155
157
|
}
|
|
156
158
|
</style>
|