提交 2fcc2a6a 编写于 作者: X xjh22222228

fix: urls

上级 6b14bfca
......@@ -70,7 +70,7 @@ const c: IConfig = {
// 百度统计
baiduStatisticsUrl: 'https://hm.baidu.com/hm.js?4582be7af7e7c95ef75351e07c6c32ba',
// 只支持 light 主题
// 只支持 Light 主题
// https://www.nav3.cn/#/index?q=grabient
backgroundLinear: [
'linear-gradient(62deg, #8EC5FC 0%, #E0C3FC 100%)',
......
......@@ -9,7 +9,6 @@ export interface INavFourProp {
name: string
desc: string
url?: string
language?: string|null|undefined[]
urls?: {
[key: string]: string
}
......
......@@ -38,7 +38,7 @@
</h2>
<div class="row">
<div class="item-list" *ngFor="let el of item.nav; index as i;">
<a (click)="handleToWebsite(el, i, $event)" href="javascript:;">
<a [href]="el.url" target="_blank">
<div class="top">
<app-logo
[src]="el.icon || item.icon"
......@@ -49,8 +49,6 @@
</div>
<div class="desc" [title]="el.desc">{{ el.desc }}</div>
</a>
<app-multiple-site [dataSource]="el"></app-multiple-site>
</div>
</div>
</li>
......
// Copyright @ 2018-2021 xiejiahe. All rights reserved. MIT license.
import config from '../../../../nav.config'
import { Component } from '@angular/core'
import { Router, ActivatedRoute } from '@angular/router'
import { queryString } from '../../../utils'
......@@ -19,7 +18,6 @@ export default class WebpComponent {
id: number = 0
page: number = 0
open: boolean = false
language: string[] = config.appLanguage
ngOnInit () {
this.activatedRoute.queryParams.subscribe(() => {
......@@ -53,21 +51,4 @@ export default class WebpComponent {
this.open = !this.open;
(<any>window).$('.nav-open').slideToggle(200)
}
handleToWebsite(item, index, event) {
if (!Array.isArray(item.language)) {
window.open(item.url)
return
}
const el = (<any>window).$('.bottom-slide')
const $this = (<any>window).$(event.currentTarget)
const len = el.length
for (let i = 0; i < len; i++) {
if (i === index) {
continue
}
el.eq(i).removeClass('active')
}
$this.siblings('.bottom-slide').toggleClass('active')
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册