|
@@ -122,9 +122,14 @@ export default {
|
|
|
watch: {
|
|
|
'$route': function (newVal) {
|
|
|
this.activeKey = newVal.fullPath
|
|
|
+ console.log(this.fullPathList.length)
|
|
|
if (this.fullPathList.indexOf(newVal.fullPath) < 0) {
|
|
|
- this.fullPathList.push(newVal.fullPath)
|
|
|
- this.pages.push(newVal)
|
|
|
+ if (this.fullPathList.length <= 10) {
|
|
|
+ this.fullPathList.push(newVal.fullPath)
|
|
|
+ this.pages.push(newVal)
|
|
|
+ } else {
|
|
|
+ this.$message.info('最多同时打开10个页签')
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
activeKey: function (newPathKey) {
|