@lambo-design/pro-layout 1.0.0-beta.336 → 1.0.0-beta.339
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/CHANGELOG.md +2 -0
- package/package.json +1 -1
- package/src/components/pro-layout-header/pro-layout-tools/components/pro-layout-tools-quick-search.vue +32 -25
- package/src/components/pro-layout-sider/components/pro-layout-sider-search.vue +5 -5
- package/src/components/pro-layout-sider/index.vue +1 -1
- package/src/components/pro-layout-tabs/index.vue +10 -10
- package/src/index.vue +14 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
# Changelog
|
|
2
|
+
## [1.0.0-beta.339](http://git.inspur.com/ecbh/lambo-design/lambo-design/-/compare/@lambo-design/pro-layout@1.0.0-beta.335...@lambo-design/pro-layout@1.0.0-beta.339) (2024-05-31)
|
|
3
|
+
|
|
2
4
|
## [1.0.0-beta.335](http://git.inspur.com/ecbh/lambo-design/lambo-design/-/compare/@lambo-design/pro-layout@1.0.0-beta.334...@lambo-design/pro-layout@1.0.0-beta.335) (2024-05-24)
|
|
3
5
|
|
|
4
6
|
## [1.0.0-beta.334](http://git.inspur.com/ecbh/lambo-design/lambo-design/-/compare/@lambo-design/pro-layout@1.0.0-beta.333...@lambo-design/pro-layout@1.0.0-beta.334) (2024-05-24)
|
package/package.json
CHANGED
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
</TabPane>
|
|
47
47
|
<TabPane label="消息" name="message">
|
|
48
48
|
<div v-if="tab==='message'">
|
|
49
|
-
<div v-for="(item,index) in
|
|
49
|
+
<div v-for="(item,index) in messageData" :key="index">
|
|
50
50
|
<div class="menu-style" @click="handleMessageClick(item)">
|
|
51
51
|
<Icon :type="item.icon"/>
|
|
52
52
|
<span class="label-style">{{ item.noticeTitle }}</span>
|
|
@@ -72,6 +72,7 @@ import Bus from '@lambo-design/shared/utils/bus'
|
|
|
72
72
|
import { deepCopy } from '@lambo-design/shared/utils/assist'
|
|
73
73
|
import {getSessionStorage} from '@lambo-design/shared/utils/platform'
|
|
74
74
|
import { mapActions } from 'vuex'
|
|
75
|
+
import config from '@/config/config'
|
|
75
76
|
|
|
76
77
|
export default {
|
|
77
78
|
name: 'pro-layout-tools-quick-search',
|
|
@@ -85,10 +86,30 @@ export default {
|
|
|
85
86
|
spinShowTop:false,
|
|
86
87
|
menuData:[],
|
|
87
88
|
tab:'menu',
|
|
88
|
-
noticeData:[]
|
|
89
|
+
noticeData:[],
|
|
90
|
+
messageData:[],
|
|
91
|
+
perSearchMap:new Map()
|
|
89
92
|
}
|
|
90
93
|
},
|
|
91
94
|
watch:{
|
|
95
|
+
searchTopText(keyword){
|
|
96
|
+
if (this.tab === 'notice'){
|
|
97
|
+
this.perSearchMap.set('notice',keyword)
|
|
98
|
+
Bus.$emit('change-search-keyword',keyword,this.tab)
|
|
99
|
+
}else if (this.tab === 'message'){
|
|
100
|
+
Bus.$emit('change-search-keyword',keyword,this.tab)
|
|
101
|
+
this.perSearchMap.set('message',keyword)
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
tab(val){
|
|
105
|
+
if (val === 'notice' && this.perSearchMap.get('notice') !== this.searchTopText){
|
|
106
|
+
this.perSearchMap.set('notice',this.searchTopText)
|
|
107
|
+
Bus.$emit('change-search-tab',this.searchTopText,val)
|
|
108
|
+
}else if (val === 'message' && this.perSearchMap.get('message') !== this.searchTopText){
|
|
109
|
+
Bus.$emit('change-search-tab',this.searchTopText,val)
|
|
110
|
+
this.perSearchMap.set('message',this.searchTopText)
|
|
111
|
+
}
|
|
112
|
+
}
|
|
92
113
|
},
|
|
93
114
|
methods: {
|
|
94
115
|
...mapActions([
|
|
@@ -98,14 +119,22 @@ export default {
|
|
|
98
119
|
Bus.$on('menu-list', (data) => {
|
|
99
120
|
this.initMenu(data);
|
|
100
121
|
})
|
|
122
|
+
Bus.$on('other-datas',(data)=>{
|
|
123
|
+
this.initNoticeAndMessage(data)
|
|
124
|
+
});
|
|
101
125
|
},
|
|
102
126
|
destroyListener() {
|
|
103
127
|
Bus.$off('menu-list')
|
|
104
128
|
},
|
|
129
|
+
initNoticeAndMessage(data){
|
|
130
|
+
this.noticeData = data.noticeList
|
|
131
|
+
this.messageData = data.messageList
|
|
132
|
+
},
|
|
105
133
|
initMenu(data){
|
|
106
134
|
let self = this
|
|
107
135
|
var appList = getSessionStorage('appList')
|
|
108
|
-
|
|
136
|
+
let permissionStoreKey = config.routerBase+'-permission'
|
|
137
|
+
var menuList = getSessionStorage(permissionStoreKey)
|
|
109
138
|
if (this.searchTopText){
|
|
110
139
|
const regex = new RegExp(this.searchTopText, "i");
|
|
111
140
|
this.menuData = this.menuList.filter(menuItem => {
|
|
@@ -127,7 +156,6 @@ export default {
|
|
|
127
156
|
async handleTopInput(){
|
|
128
157
|
this.searchTopModal = true
|
|
129
158
|
this.spinShowTop = true
|
|
130
|
-
this.noticeData = []
|
|
131
159
|
if (this.tab === 'menu'){
|
|
132
160
|
// 使用 filter 方法找到所有匹配的菜单项
|
|
133
161
|
const regex = new RegExp(this.searchTopText, "i");
|
|
@@ -135,17 +163,6 @@ export default {
|
|
|
135
163
|
return menuItem.label.match(regex) && menuItem.type === 2;
|
|
136
164
|
});
|
|
137
165
|
}
|
|
138
|
-
else if (this.tab ==='notice'){
|
|
139
|
-
this.noticeData = await this.getNoticeListData({
|
|
140
|
-
noticeType:'10',
|
|
141
|
-
noticeTitle:this.searchTopText
|
|
142
|
-
})
|
|
143
|
-
}else if (this.tab ==='message'){
|
|
144
|
-
this.noticeData = await this.getNoticeListData({
|
|
145
|
-
noticeType:'20',
|
|
146
|
-
noticeTitle:this.searchTopText
|
|
147
|
-
})
|
|
148
|
-
}
|
|
149
166
|
this.spinShowTop = false
|
|
150
167
|
},
|
|
151
168
|
handleTopBlur(){
|
|
@@ -197,16 +214,6 @@ export default {
|
|
|
197
214
|
this.tab = e
|
|
198
215
|
if (e === 'menu') {
|
|
199
216
|
this.initMenu(null)
|
|
200
|
-
} else if (e === 'notice') {
|
|
201
|
-
this.noticeData = await this.getNoticeListData({
|
|
202
|
-
noticeType:'10',
|
|
203
|
-
noticeTitle:this.searchTopText
|
|
204
|
-
})
|
|
205
|
-
} else if (e === 'message') {
|
|
206
|
-
this.noticeData = await this.getNoticeListData({
|
|
207
|
-
noticeType:'20',
|
|
208
|
-
noticeTitle:this.searchTopText
|
|
209
|
-
})
|
|
210
217
|
}
|
|
211
218
|
},
|
|
212
219
|
},
|
|
@@ -216,14 +216,14 @@ export default {
|
|
|
216
216
|
&.custom-tabs{
|
|
217
217
|
.search-fast-con-side{
|
|
218
218
|
.sideInput {
|
|
219
|
-
height:
|
|
219
|
+
height: 30px;
|
|
220
220
|
/deep/.ivu-icon{
|
|
221
|
-
height:
|
|
222
|
-
line-height:
|
|
221
|
+
height: 36px;
|
|
222
|
+
line-height: 36px;
|
|
223
223
|
}
|
|
224
224
|
}
|
|
225
225
|
/deep/.ivu-input{
|
|
226
|
-
height:
|
|
226
|
+
height: 36px;
|
|
227
227
|
}
|
|
228
228
|
}
|
|
229
229
|
}
|
|
@@ -302,7 +302,7 @@ export default {
|
|
|
302
302
|
}
|
|
303
303
|
&.custom-tabs{
|
|
304
304
|
.ivu-modal {
|
|
305
|
-
margin-top :
|
|
305
|
+
margin-top : 5px;
|
|
306
306
|
}
|
|
307
307
|
}
|
|
308
308
|
}
|
|
@@ -411,29 +411,29 @@ export default {
|
|
|
411
411
|
}
|
|
412
412
|
}
|
|
413
413
|
&.custom-tabs{
|
|
414
|
-
height:
|
|
415
|
-
line-height:
|
|
414
|
+
height: 36px;
|
|
415
|
+
line-height: 30px;
|
|
416
416
|
.close-con{
|
|
417
417
|
.btn-close{
|
|
418
|
-
margin-top:
|
|
418
|
+
margin-top: 5px;
|
|
419
419
|
}
|
|
420
420
|
}
|
|
421
421
|
.btn-con{
|
|
422
|
-
padding:
|
|
422
|
+
padding: 5px 0px;
|
|
423
423
|
}
|
|
424
424
|
.scroll-outer{
|
|
425
425
|
left: 8px;
|
|
426
426
|
right: 51px;
|
|
427
427
|
.scroll-body{
|
|
428
428
|
/deep/.ivu-tag-dot{
|
|
429
|
-
height:
|
|
430
|
-
line-height:
|
|
431
|
-
padding: 0
|
|
429
|
+
height: 28px;
|
|
430
|
+
line-height: 28px;
|
|
431
|
+
padding: 0 8px;
|
|
432
432
|
.ivu-tag-dot-inner{
|
|
433
|
-
width:
|
|
434
|
-
height:
|
|
433
|
+
width: 10px;
|
|
434
|
+
height: 10px;
|
|
435
435
|
margin-right: 2px;
|
|
436
|
-
top:
|
|
436
|
+
top: 1px;
|
|
437
437
|
}
|
|
438
438
|
}
|
|
439
439
|
/deep/.ivu-tag{
|
package/src/index.vue
CHANGED
|
@@ -196,6 +196,18 @@ export default {
|
|
|
196
196
|
Bus.$on('other-operate',(type,data)=>{
|
|
197
197
|
this.otherOperate(type,data);
|
|
198
198
|
})
|
|
199
|
+
Bus.$on('change-search-keyword',(keyword,tab)=>{
|
|
200
|
+
this.$emit('other-operate','search-keyword',{
|
|
201
|
+
keyword:keyword,
|
|
202
|
+
tab:tab
|
|
203
|
+
})
|
|
204
|
+
})
|
|
205
|
+
Bus.$on('change-search-tab',(keyword,tab)=>{
|
|
206
|
+
this.$emit('other-operate','search-keyword',{
|
|
207
|
+
keyword:keyword,
|
|
208
|
+
tab:tab
|
|
209
|
+
})
|
|
210
|
+
})
|
|
199
211
|
},
|
|
200
212
|
destroyListener(){
|
|
201
213
|
Bus.$off('trigger-change')
|
|
@@ -208,6 +220,8 @@ export default {
|
|
|
208
220
|
Bus.$off('toggle-collect-menu')
|
|
209
221
|
Bus.$off('click-logo')
|
|
210
222
|
Bus.$off('other-operate')
|
|
223
|
+
Bus.$off('change-keyword')
|
|
224
|
+
Bus.$off('change-tab')
|
|
211
225
|
},
|
|
212
226
|
initEmit(){
|
|
213
227
|
//在这里改this.menuList
|