优化代码

This commit is contained in:
java110 2022-02-27 19:55:41 +08:00
parent d13dfda8c4
commit 10377a1b4c
2 changed files with 8 additions and 1 deletions

View File

@ -3,7 +3,7 @@
<div class="navbar-header">
<span class="navbar-minimalize minimalize-styl-2 " @click="_doMenu()"><i class="fa fa-list-ul"></i> </span>
<ul class="nav navbar-top-links ">
<li class="nav-item dropdown " v-on:mouseover="_showModelDiv(item)" :class="{'tab-active' :item.active == '1' }" v-for="(item,index) in nav.catalogs">
<li class="nav-item dropdown " :class="{'tab-active' :item.active == '1' }" v-for="(item,index) in nav.catalogs">
<span class="dropdown-toggle count-info vc-tab-text" data-toggle="dropdown" @click="_changeMenuCatalog(item)">
<i :class="item.icon"></i>{{item.name}}
</span>

View File

@ -231,6 +231,10 @@
this.$forceUpdate();
},
_changeMenuCatalog: function(_catalog) {
//_showModelDiv(item)
if (vm._showModelDiv(_catalog)) {
return;
}
if (_catalog.url != '#') {
vm._settingActiveCatalog(_catalog);
vc.jumpToPage(_catalog.url);
@ -242,7 +246,10 @@
if (_catalog.url.startsWith('?')) {
let _modelName = _catalog.url.substring(1, _catalog.url.length);
$('#' + _modelName).modal('show');
return true;
}
return false;
}
}
});