Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
gitcode_dev
开源百科
提交
2fcc2a6a
开
开源百科
项目概览
gitcode_dev
/
开源百科
通知
253
Star
3
Fork
3
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
17
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
代码片段
项目成员
Pages
开
开源百科
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
17
Issue
17
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
2fcc2a6a
编写于
1月 17, 2021
作者:
X
xjh22222228
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: urls
上级
6b14bfca
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
2 addition
and
24 deletion
+2
-24
nav.config.ts
nav.config.ts
+1
-1
src/types/index.d.ts
src/types/index.d.ts
+0
-1
src/view/app/default/app.component.html
src/view/app/default/app.component.html
+1
-3
src/view/app/default/app.component.ts
src/view/app/default/app.component.ts
+0
-19
未找到文件。
nav.config.ts
浏览文件 @
2fcc2a6a
...
...
@@ -70,7 +70,7 @@ const c: IConfig = {
// 百度统计
baiduStatisticsUrl
:
'
https://hm.baidu.com/hm.js?4582be7af7e7c95ef75351e07c6c32ba
'
,
// 只支持
l
ight 主题
// 只支持
L
ight 主题
// https://www.nav3.cn/#/index?q=grabient
backgroundLinear
:
[
'
linear-gradient(62deg, #8EC5FC 0%, #E0C3FC 100%)
'
,
...
...
src/types/index.d.ts
浏览文件 @
2fcc2a6a
...
...
@@ -9,7 +9,6 @@ export interface INavFourProp {
name
:
string
desc
:
string
url
?:
string
language
?:
string
|
null
|
undefined
[]
urls
?:
{
[
key
:
string
]:
string
}
...
...
src/view/app/default/app.component.html
浏览文件 @
2fcc2a6a
...
...
@@ -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>
...
...
src/view/app/default/app.component.ts
浏览文件 @
2fcc2a6a
// 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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录