|
|
@@ -195,8 +195,24 @@ vm.component('inner-menu', {
|
|
|
|
|
|
vm.component('inner-menu-li', {
|
|
|
template: `<li>
|
|
|
- <a v-bind:href="href" class="menu-item"><i class="fa fa-gears"></i>{{name}}</a>
|
|
|
+ <a v-bind:href="href" v-bind:class = "GetLocation?'menu-item active':'menu-item'"><i class="fa fa-gears"></i>{{name}}</a>
|
|
|
</li>`,
|
|
|
+ computed: {
|
|
|
+ GetLocation() {
|
|
|
+ var url_href = window.location.href;
|
|
|
+ var url = new URL(url_href);
|
|
|
+ var type = url.searchParams.get("type");
|
|
|
+ if (type != null) {
|
|
|
+ if (this.href.includes(type)) {
|
|
|
+ return true;
|
|
|
+ } else {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+d
|
|
|
+
|
|
|
+ }
|
|
|
+ },
|
|
|
props: {
|
|
|
href: String,
|
|
|
name: String,
|
|
|
@@ -317,8 +333,8 @@ vm.component('side-bar-list', {
|
|
|
</li>`,
|
|
|
computed: {
|
|
|
GetLocation() {
|
|
|
- var pathname = window.location.pathname.split('/');
|
|
|
- var type = pathname[pathname.length-1]
|
|
|
+ var pathname = window.location.pathname.split('/');
|
|
|
+ var type = pathname[pathname.length - 1]
|
|
|
if (this.href.includes(type)) {
|
|
|
return true;
|
|
|
} else {
|
|
|
@@ -618,4 +634,4 @@ vm.component('isotope-item', {
|
|
|
<div class="mg-description"><small style="display:none;">{{detail}}</small><small class="operate" style="display:none;">{{operate}}</small><small class="source" style="display:none;">{{source}}</small><small class="pull-right text-muted software" >{{software}}</small></div>
|
|
|
</div>
|
|
|
</div>`,
|
|
|
-});
|
|
|
+});
|