leisure-core 0.6.7 → 0.6.9
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/le-button-audit/src/main.vue +10 -0
- package/le-home/src/main.vue +32 -12
- package/package.json +1 -1
|
@@ -65,6 +65,14 @@ export default {
|
|
|
65
65
|
type: String,
|
|
66
66
|
default: "驳 回",
|
|
67
67
|
},
|
|
68
|
+
uid: {
|
|
69
|
+
type: String,
|
|
70
|
+
default: "",
|
|
71
|
+
},
|
|
72
|
+
nick: {
|
|
73
|
+
type: String,
|
|
74
|
+
default: "",
|
|
75
|
+
},
|
|
68
76
|
},
|
|
69
77
|
data() {
|
|
70
78
|
return {
|
|
@@ -87,6 +95,8 @@ export default {
|
|
|
87
95
|
param.cid = this.cid;
|
|
88
96
|
param.opinion = this.opinion;
|
|
89
97
|
param.passed = passParam;
|
|
98
|
+
param.uid = this.uid;
|
|
99
|
+
param.nick = this.nick;
|
|
90
100
|
this.$emit("audit", param);
|
|
91
101
|
},
|
|
92
102
|
onClick() {
|
package/le-home/src/main.vue
CHANGED
|
@@ -406,23 +406,35 @@ export default {
|
|
|
406
406
|
},
|
|
407
407
|
clickMenuItem(item) {
|
|
408
408
|
this.style.display = "none";
|
|
409
|
-
|
|
410
|
-
if (
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
409
|
+
|
|
410
|
+
if (item.name === this.tabNameCurrent) {
|
|
411
|
+
this.$message.info("当前页面已经打开");
|
|
412
|
+
return;
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
// 查找是否已经存在相同name的标签页
|
|
416
|
+
const existingTabIndex = this.tabsAll.findIndex(
|
|
417
|
+
(tab) => tab.name === item.name
|
|
418
|
+
);
|
|
419
|
+
|
|
420
|
+
if (existingTabIndex > -1) {
|
|
421
|
+
// 已存在,用新的替换
|
|
422
|
+
const newTab = this._createTabItem(item);
|
|
423
|
+
this.tabsAll[existingTabIndex] = newTab;
|
|
424
|
+
|
|
425
|
+
// 如果替换的是当前激活的标签页,需要跳转
|
|
426
|
+
if (this.tabNameCurrent === item.name) {
|
|
427
|
+
this.$router.push(newTab);
|
|
418
428
|
} else {
|
|
419
|
-
|
|
429
|
+
// 如果替换的不是当前激活的标签页,设置当前激活并跳转
|
|
430
|
+
this.tabNameCurrent = newTab.name;
|
|
431
|
+
this.$router.push(newTab);
|
|
420
432
|
}
|
|
421
433
|
} else {
|
|
422
434
|
this._navi2Page(item);
|
|
423
435
|
}
|
|
424
436
|
},
|
|
425
|
-
|
|
437
|
+
_createTabItem(item) {
|
|
426
438
|
let value;
|
|
427
439
|
if (item.param) {
|
|
428
440
|
value = {
|
|
@@ -444,11 +456,19 @@ export default {
|
|
|
444
456
|
};
|
|
445
457
|
}
|
|
446
458
|
}
|
|
459
|
+
return value;
|
|
460
|
+
},
|
|
461
|
+
_navi2Page(item) {
|
|
462
|
+
const value = this._createTabItem(item);
|
|
463
|
+
if (!value) return; // 防止空值
|
|
464
|
+
|
|
447
465
|
this.tabNameCurrent = value.name;
|
|
448
466
|
if (this.tabsAll && this.tabsAll.length >= 8) {
|
|
449
467
|
let elen = this.tabsAll.length;
|
|
450
468
|
this.tabsAll[elen - 1] = value;
|
|
451
|
-
} else
|
|
469
|
+
} else {
|
|
470
|
+
this.tabsAll.push(value);
|
|
471
|
+
}
|
|
452
472
|
this.$router.push(value);
|
|
453
473
|
},
|
|
454
474
|
handleTabClick(clickTab, event) {
|