@lambo-design/pro-layout 1.0.0-beta.293 → 1.0.0-beta.295
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/package.json
CHANGED
package/src/components/pro-layout-header/pro-layout-nav/components/pro-layout-nav-slide-menu.vue
CHANGED
|
@@ -1,185 +1,188 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="menu-list" >
|
|
3
|
-
<ul class="top-menu" :style="layoutSize === 'default' ? {height: '64px'} : {height: '50px'}" ref="topNav">
|
|
4
|
-
<li class="top-menu-item" :class="{ 'active': activeName === item.appId }" v-for="(item,index) in topMenList" :key="item.appId" @click="selectApp(item.appId)">
|
|
5
|
-
<div class="menu-item" :style="layoutSize === 'default' ? {paddingTop: '10px'} : {paddingTop: '2px'}"
|
|
6
|
-
<p class="menu-icon"><Icon :type="item.icon" :size="20"></Icon></p>
|
|
7
|
-
<p class="menu-txt">{{ item.name }}</p>
|
|
8
|
-
</div>
|
|
9
|
-
</li>
|
|
10
|
-
</ul>
|
|
11
|
-
</div>
|
|
12
|
-
</template>
|
|
13
|
-
|
|
14
|
-
<script>
|
|
15
|
-
import Bus from '@lambo-design/shared/utils/bus'
|
|
16
|
-
import { deepCopy } from '@lambo-design/shared/utils/assist'
|
|
17
|
-
|
|
18
|
-
export default {
|
|
19
|
-
props: {
|
|
20
|
-
acceptInt: {
|
|
21
|
-
type: Number,
|
|
22
|
-
default: 0
|
|
23
|
-
},
|
|
24
|
-
topMenListNum: {
|
|
25
|
-
type: Number,
|
|
26
|
-
default: 0
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
|
-
data() {
|
|
30
|
-
return {
|
|
31
|
-
systemInfo:{},
|
|
32
|
-
pointer:0,
|
|
33
|
-
flag:true,
|
|
34
|
-
arrowFlag: true,
|
|
35
|
-
acceptAppId: '',
|
|
36
|
-
navList: [],
|
|
37
|
-
topMenList: [],
|
|
38
|
-
topTqmMenList:[],
|
|
39
|
-
otherList: [],
|
|
40
|
-
activeName: '',
|
|
41
|
-
topMenuNum: 7,
|
|
42
|
-
lastTopMenuNum:-1,
|
|
43
|
-
originMenuList: [],
|
|
44
|
-
layoutSize:"default"
|
|
45
|
-
}
|
|
46
|
-
},
|
|
47
|
-
methods: {
|
|
48
|
-
initListener() {
|
|
49
|
-
Bus.$on('system-info',(data) => {
|
|
50
|
-
this.initSystemInfo(data);
|
|
51
|
-
})
|
|
52
|
-
Bus.$on('nav-list', (data) => {
|
|
53
|
-
this.initNav(data)
|
|
54
|
-
})
|
|
55
|
-
Bus.$on('change-app', ({ appId, appInfo }) => {
|
|
56
|
-
this.changeApp(appId, appInfo)
|
|
57
|
-
})
|
|
58
|
-
},
|
|
59
|
-
destroyListener() {
|
|
60
|
-
Bus.$off('system-info')
|
|
61
|
-
Bus.$off('nav-list')
|
|
62
|
-
Bus.$off('change-app')
|
|
63
|
-
},
|
|
64
|
-
initSystemInfo(data) {
|
|
65
|
-
if (data) {
|
|
66
|
-
this.layoutSize = data.layoutSize ? data.layoutSize : 'default';
|
|
67
|
-
this.topMenuNum = data.
|
|
68
|
-
this.acceptAppId = data.acceptAppId ? data.acceptAppId : '';
|
|
69
|
-
if (!this.activeName) {
|
|
70
|
-
this.activeName = this.acceptAppId
|
|
71
|
-
}
|
|
72
|
-
this.initNav(this.navList)
|
|
73
|
-
}
|
|
74
|
-
},
|
|
75
|
-
initNav(data) {
|
|
76
|
-
if (data.toString() === this.navList.toString() && this.topMenuNum === this.lastTopMenuNum) {
|
|
77
|
-
return
|
|
78
|
-
}
|
|
79
|
-
this.navList = data
|
|
80
|
-
this.lastTopMenuNum = this.topMenuNum
|
|
81
|
-
if (data.length > this.topMenuNum) {
|
|
82
|
-
let navList = deepCopy(data)
|
|
83
|
-
this.topMenList = navList
|
|
84
|
-
this.$emit('topMen-list', this.topMenList);
|
|
85
|
-
this.$emit('topMen-num', this.topMenuNum);
|
|
86
|
-
this.$emit('topMen-true', true);
|
|
87
|
-
// this.topMenList = navList.splice(0, this.topMenuNum)
|
|
88
|
-
// this.otherList = navList
|
|
89
|
-
} else {
|
|
90
|
-
this.topMenList = this.navList
|
|
91
|
-
this.$emit('topMen-true', false);
|
|
92
|
-
}
|
|
93
|
-
if (this.topMenList.length > 0) {
|
|
94
|
-
let appId = this.topMenList[0].appId
|
|
95
|
-
for (let i = 0; i < this.topMenList.length; i++) {
|
|
96
|
-
if (this.topMenList[i].selected == true) {
|
|
97
|
-
appId = this.topMenList[i].appId
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
if (this.activeName) {
|
|
101
|
-
appId = this.activeName
|
|
102
|
-
}
|
|
103
|
-
this.selectApp(appId)
|
|
104
|
-
}
|
|
105
|
-
},
|
|
106
|
-
selectApp(appId) {
|
|
107
|
-
if (appId) {
|
|
108
|
-
this.activeName = appId
|
|
109
|
-
let res = this.navList.filter(app => app.appId == appId)
|
|
110
|
-
Bus.$emit('change-app', { appId, appInfo: res[0] })
|
|
111
|
-
}
|
|
112
|
-
},
|
|
113
|
-
changeApp(appId, appInfo){
|
|
114
|
-
if (appId) {
|
|
115
|
-
this.activeName = appId
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
},
|
|
119
|
-
watch: {
|
|
120
|
-
acceptInt(val){
|
|
121
|
-
this.pointer = val;
|
|
122
|
-
}
|
|
123
|
-
},
|
|
124
|
-
created() {
|
|
125
|
-
this.initListener()
|
|
126
|
-
},
|
|
127
|
-
beforeDestroy() {
|
|
128
|
-
this.destroyListener()
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
</script>
|
|
132
|
-
|
|
133
|
-
<style scoped lang="less">
|
|
134
|
-
@import '@lambo-design/core/src/styles/default.less';
|
|
135
|
-
.menu-list {
|
|
136
|
-
height: 100%;
|
|
137
|
-
line-height: 24px;
|
|
138
|
-
//color: #ffffff;
|
|
139
|
-
cursor: pointer;
|
|
140
|
-
font-size: 16px;
|
|
141
|
-
margin-left:
|
|
142
|
-
.top-menu {
|
|
143
|
-
overflow: hidden;
|
|
144
|
-
.top-menu-item {
|
|
145
|
-
margin-left: 34px;
|
|
146
|
-
position: relative;
|
|
147
|
-
height: 100%;
|
|
148
|
-
//color: #FFFFFF;
|
|
149
|
-
list-style: none;
|
|
150
|
-
float: left;
|
|
151
|
-
&:hover {
|
|
152
|
-
//background: transparent;
|
|
153
|
-
.menu-item {
|
|
154
|
-
//color: #fff;
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
&.active {
|
|
158
|
-
//background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0)) !important;
|
|
159
|
-
//border-bottom: 2px solid var(--primary-color-tint-5, @_primary-color-tint-5);
|
|
160
|
-
.menu-item {
|
|
161
|
-
//color: #fff;
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
}
|
|
185
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<div class="menu-list" >
|
|
3
|
+
<ul class="top-menu" :style="layoutSize === 'default' ? {height: '64px'} : {height: '50px'}" ref="topNav">
|
|
4
|
+
<li class="top-menu-item" v-show="pointer <= index && index < pointer + topMenuNum && flag" :class="{ 'active': activeName === item.appId }" v-for="(item,index) in topMenList" :key="item.appId" @click="selectApp(item.appId)">
|
|
5
|
+
<div class="menu-item" :style="layoutSize === 'default' ? {paddingTop: '10px'} : {paddingTop: '2px'}">
|
|
6
|
+
<p class="menu-icon"><Icon :type="item.icon" :size="20"></Icon></p>
|
|
7
|
+
<p class="menu-txt">{{ item.name }}</p>
|
|
8
|
+
</div>
|
|
9
|
+
</li>
|
|
10
|
+
</ul>
|
|
11
|
+
</div>
|
|
12
|
+
</template>
|
|
13
|
+
|
|
14
|
+
<script>
|
|
15
|
+
import Bus from '@lambo-design/shared/utils/bus'
|
|
16
|
+
import { deepCopy } from '@lambo-design/shared/utils/assist'
|
|
17
|
+
|
|
18
|
+
export default {
|
|
19
|
+
props: {
|
|
20
|
+
acceptInt: {
|
|
21
|
+
type: Number,
|
|
22
|
+
default: 0
|
|
23
|
+
},
|
|
24
|
+
topMenListNum: {
|
|
25
|
+
type: Number,
|
|
26
|
+
default: 0
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
data() {
|
|
30
|
+
return {
|
|
31
|
+
systemInfo:{},
|
|
32
|
+
pointer:0,
|
|
33
|
+
flag:true,
|
|
34
|
+
arrowFlag: true,
|
|
35
|
+
acceptAppId: '',
|
|
36
|
+
navList: [],
|
|
37
|
+
topMenList: [],
|
|
38
|
+
topTqmMenList:[],
|
|
39
|
+
otherList: [],
|
|
40
|
+
activeName: '',
|
|
41
|
+
topMenuNum: 7,
|
|
42
|
+
lastTopMenuNum:-1,
|
|
43
|
+
originMenuList: [],
|
|
44
|
+
layoutSize:"default"
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
methods: {
|
|
48
|
+
initListener() {
|
|
49
|
+
Bus.$on('system-info',(data) => {
|
|
50
|
+
this.initSystemInfo(data);
|
|
51
|
+
})
|
|
52
|
+
Bus.$on('nav-list', (data) => {
|
|
53
|
+
this.initNav(data)
|
|
54
|
+
})
|
|
55
|
+
Bus.$on('change-app', ({ appId, appInfo }) => {
|
|
56
|
+
this.changeApp(appId, appInfo)
|
|
57
|
+
})
|
|
58
|
+
},
|
|
59
|
+
destroyListener() {
|
|
60
|
+
Bus.$off('system-info')
|
|
61
|
+
Bus.$off('nav-list')
|
|
62
|
+
Bus.$off('change-app')
|
|
63
|
+
},
|
|
64
|
+
initSystemInfo(data) {
|
|
65
|
+
if (data) {
|
|
66
|
+
this.layoutSize = data.layoutSize ? data.layoutSize : 'default';
|
|
67
|
+
this.topMenuNum = data.topMenu ? data.topMenu : 4;
|
|
68
|
+
this.acceptAppId = data.acceptAppId ? data.acceptAppId : '';
|
|
69
|
+
if (!this.activeName) {
|
|
70
|
+
this.activeName = this.acceptAppId
|
|
71
|
+
}
|
|
72
|
+
this.initNav(this.navList)
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
initNav(data) {
|
|
76
|
+
if (data.toString() === this.navList.toString() && this.topMenuNum === this.lastTopMenuNum) {
|
|
77
|
+
return
|
|
78
|
+
}
|
|
79
|
+
this.navList = data
|
|
80
|
+
this.lastTopMenuNum = this.topMenuNum
|
|
81
|
+
if (data.length > this.topMenuNum) {
|
|
82
|
+
let navList = deepCopy(data)
|
|
83
|
+
this.topMenList = navList
|
|
84
|
+
this.$emit('topMen-list', this.topMenList);
|
|
85
|
+
this.$emit('topMen-num', this.topMenuNum);
|
|
86
|
+
this.$emit('topMen-true', true);
|
|
87
|
+
// this.topMenList = navList.splice(0, this.topMenuNum)
|
|
88
|
+
// this.otherList = navList
|
|
89
|
+
} else {
|
|
90
|
+
this.topMenList = this.navList
|
|
91
|
+
this.$emit('topMen-true', false);
|
|
92
|
+
}
|
|
93
|
+
if (this.topMenList.length > 0) {
|
|
94
|
+
let appId = this.topMenList[0].appId
|
|
95
|
+
for (let i = 0; i < this.topMenList.length; i++) {
|
|
96
|
+
if (this.topMenList[i].selected == true) {
|
|
97
|
+
appId = this.topMenList[i].appId
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
if (this.activeName) {
|
|
101
|
+
appId = this.activeName
|
|
102
|
+
}
|
|
103
|
+
this.selectApp(appId)
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
selectApp(appId) {
|
|
107
|
+
if (appId) {
|
|
108
|
+
this.activeName = appId
|
|
109
|
+
let res = this.navList.filter(app => app.appId == appId)
|
|
110
|
+
Bus.$emit('change-app', { appId, appInfo: res[0] })
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
changeApp(appId, appInfo){
|
|
114
|
+
if (appId) {
|
|
115
|
+
this.activeName = appId
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
watch: {
|
|
120
|
+
acceptInt(val){
|
|
121
|
+
this.pointer = val;
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
created() {
|
|
125
|
+
this.initListener()
|
|
126
|
+
},
|
|
127
|
+
beforeDestroy() {
|
|
128
|
+
this.destroyListener()
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
</script>
|
|
132
|
+
|
|
133
|
+
<style scoped lang="less">
|
|
134
|
+
@import '@lambo-design/core/src/styles/default.less';
|
|
135
|
+
.menu-list {
|
|
136
|
+
height: 100%;
|
|
137
|
+
line-height: 24px;
|
|
138
|
+
//color: #ffffff;
|
|
139
|
+
cursor: pointer;
|
|
140
|
+
font-size: 16px;
|
|
141
|
+
margin-left: 15px;
|
|
142
|
+
.top-menu {
|
|
143
|
+
overflow: hidden;
|
|
144
|
+
.top-menu-item {
|
|
145
|
+
margin-left: 34px;
|
|
146
|
+
position: relative;
|
|
147
|
+
height: 100%;
|
|
148
|
+
//color: #FFFFFF;
|
|
149
|
+
list-style: none;
|
|
150
|
+
float: left;
|
|
151
|
+
&:hover {
|
|
152
|
+
//background: transparent;
|
|
153
|
+
.menu-item {
|
|
154
|
+
//color: #fff;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
&.active {
|
|
158
|
+
//background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0)) !important;
|
|
159
|
+
//border-bottom: 2px solid var(--primary-color-tint-5, @_primary-color-tint-5);
|
|
160
|
+
.menu-item {
|
|
161
|
+
//color: #fff;
|
|
162
|
+
width: 135px;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
.menu-item {
|
|
166
|
+
display: flex;
|
|
167
|
+
margin-top: 10px;
|
|
168
|
+
padding-right: 10px;
|
|
169
|
+
width: 135px;
|
|
170
|
+
|
|
171
|
+
}
|
|
172
|
+
.menu-icon {
|
|
173
|
+
height: 20px;
|
|
174
|
+
line-height: 20px;
|
|
175
|
+
text-align: center;
|
|
176
|
+
margin-right: 10px;
|
|
177
|
+
margin-left: 10px;
|
|
178
|
+
margin-top: 3px;
|
|
179
|
+
}
|
|
180
|
+
.menu-txt {
|
|
181
|
+
text-align: center;
|
|
182
|
+
font-size: 14px;
|
|
183
|
+
line-height: 2;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
</style>
|
|
@@ -148,6 +148,14 @@ export default {
|
|
|
148
148
|
@import '@lambo-design/core/src/styles/default.less';
|
|
149
149
|
.quick-search-fast-con-modal {
|
|
150
150
|
.modal-content {
|
|
151
|
+
height: 300px;
|
|
152
|
+
overflow-x: hidden;
|
|
153
|
+
overflow-y: auto;
|
|
154
|
+
-ms-overflow-style: none; /* Internet Explorer 10+ */
|
|
155
|
+
scrollbar-width: none; /* Firefox */
|
|
156
|
+
&::-webkit-scrollbar {
|
|
157
|
+
display: none; /* Chrome, Safari 和 Opera */
|
|
158
|
+
}
|
|
151
159
|
.menu-style {
|
|
152
160
|
margin : 5px;
|
|
153
161
|
font-size : 16px;
|