@lambo-design/pro-layout 1.0.0-beta.92 → 1.0.0-beta.94
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 +1 -1
- package/src/components/pro-layout-nav.vue +9 -0
- package/src/index.vue +0 -26
package/package.json
CHANGED
|
@@ -65,6 +65,11 @@ export default {
|
|
|
65
65
|
}
|
|
66
66
|
if (this.topMenList.length > 0){
|
|
67
67
|
let appId = this.topMenList[0].appId;
|
|
68
|
+
for (let i = 0; i < this.topMenList.length; i++) {
|
|
69
|
+
if (this.topMenList[i].selected == true){
|
|
70
|
+
appId = this.topMenList[i].appId;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
68
73
|
if (this.activeName) {
|
|
69
74
|
appId = this.activeName;
|
|
70
75
|
}
|
|
@@ -96,6 +101,10 @@ export default {
|
|
|
96
101
|
created(){
|
|
97
102
|
this.initListener();
|
|
98
103
|
},
|
|
104
|
+
// 数据更新时执行
|
|
105
|
+
activated() {
|
|
106
|
+
this.initListener()
|
|
107
|
+
},
|
|
99
108
|
beforeDestroy(){
|
|
100
109
|
this.destroyListener();
|
|
101
110
|
}
|
package/src/index.vue
CHANGED
|
@@ -51,10 +51,6 @@ export default {
|
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
53
|
},
|
|
54
|
-
acceptAppId:{
|
|
55
|
-
type: String,
|
|
56
|
-
default: ''
|
|
57
|
-
},
|
|
58
54
|
userInfo: {
|
|
59
55
|
type: Object,
|
|
60
56
|
default: () => {}
|
|
@@ -114,7 +110,6 @@ export default {
|
|
|
114
110
|
allData: {
|
|
115
111
|
handler() {
|
|
116
112
|
this.initEmit();
|
|
117
|
-
this.initApp();
|
|
118
113
|
},
|
|
119
114
|
immediate: true,
|
|
120
115
|
deep: true
|
|
@@ -166,29 +161,9 @@ export default {
|
|
|
166
161
|
triggerChange(data){
|
|
167
162
|
this.collapsed = data;
|
|
168
163
|
},
|
|
169
|
-
initApp(){
|
|
170
|
-
let appInfo = {}
|
|
171
|
-
console.log('初始化')
|
|
172
|
-
console.log('acceptAppId:',this.acceptAppId)
|
|
173
|
-
console.log('navList',this.navList)
|
|
174
|
-
if (this.acceptAppId !== ''){
|
|
175
|
-
console.log('执行了')
|
|
176
|
-
appInfo = this.navList.filter(item => item.appId == this.acceptAppId)[0];
|
|
177
|
-
}
|
|
178
|
-
this.appId = this.acceptAppId;
|
|
179
|
-
let appId;
|
|
180
|
-
appId = this.appId
|
|
181
|
-
console.log("lambodesign-appId:",appId)
|
|
182
|
-
console.log("lambodesign-appInfo:",appInfo)
|
|
183
|
-
this.$emit('change-app',{appId,appInfo})
|
|
184
|
-
},
|
|
185
164
|
changeApp(appId,appInfo) {
|
|
186
165
|
if (!appInfo) {
|
|
187
|
-
if (this.appId !== ''){
|
|
188
|
-
appInfo = this.navList.filter(item => item.appId == this.appId)[0];
|
|
189
|
-
}else {
|
|
190
166
|
appInfo = this.navList.filter(item => item.appId == appId)[0];
|
|
191
|
-
}
|
|
192
167
|
}
|
|
193
168
|
this.appId = appId;
|
|
194
169
|
this.$emit('change-app',{appId,appInfo})
|
|
@@ -239,7 +214,6 @@ export default {
|
|
|
239
214
|
}
|
|
240
215
|
},
|
|
241
216
|
mounted(){
|
|
242
|
-
// this.initApp();
|
|
243
217
|
this.initTags();
|
|
244
218
|
},
|
|
245
219
|
created(){
|