Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
京东前端
nutui
提交
22511709
N
nutui
项目概览
京东前端
/
nutui
通知
37
Star
4
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
N
nutui
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
22511709
编写于
2月 19, 2021
作者:
richard_1015
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'next' of
https://github.com/jdf2e/nutui
into next
上级
0b3a3859
6b28487c
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
132 addition
and
39 deletion
+132
-39
src/packages/backtop/demo.vue
src/packages/backtop/demo.vue
+3
-1
src/packages/backtop/index.vue
src/packages/backtop/index.vue
+2
-1
src/sites/doc/components/Header.vue
src/sites/doc/components/Header.vue
+26
-17
src/sites/doc/components/Search.vue
src/sites/doc/components/Search.vue
+30
-5
src/sites/doc/views/Resource.vue
src/sites/doc/views/Resource.vue
+8
-14
src/styles/font/iconfont.js
src/styles/font/iconfont.js
+63
-1
未找到文件。
src/packages/backtop/demo.vue
浏览文件 @
22511709
...
@@ -24,7 +24,9 @@
...
@@ -24,7 +24,9 @@
<div
class=
"text-data"
>
我是测试数据22
</div>
<div
class=
"text-data"
>
我是测试数据22
</div>
<div
class=
"text-data"
>
我是测试数据23
</div>
<div
class=
"text-data"
>
我是测试数据23
</div>
<div
class=
"text-data"
>
我是测试数据24
</div>
<div
class=
"text-data"
>
我是测试数据24
</div>
<nut-backtop
@
click=
"handleClick"
elId=
"elId"
:distance=
"100"
:bottom=
"90"
><view>
无
</view></nut-backtop>
<nut-backtop
@
click=
"handleClick"
elId=
"elId"
:distance=
"100"
:bottom=
"90"
><view>
无
</view></nut-backtop
>
<nut-backtop
@
click=
"handleClick"
elId=
"elId"
:distance=
"200"
></nut-backtop>
<nut-backtop
@
click=
"handleClick"
elId=
"elId"
:distance=
"200"
></nut-backtop>
</div>
</div>
</
template
>
</
template
>
...
...
src/packages/backtop/index.vue
浏览文件 @
22511709
...
@@ -68,7 +68,8 @@ export default create({
...
@@ -68,7 +68,8 @@ export default create({
//滚动条偏移量
//滚动条偏移量
//Window
//Window
if
(
scrollEl
instanceof
Window
)
{
if
(
scrollEl
instanceof
Window
)
{
const
scrollTop
=
scrollEl
.
pageYOffset
!==
undefined
?
scrollEl
.
pageYOffset
:
''
;
const
scrollTop
=
scrollEl
.
pageYOffset
!==
undefined
?
scrollEl
.
pageYOffset
:
''
;
backTop
.
value
=
scrollTop
>=
props
.
distance
;
backTop
.
value
=
scrollTop
>=
props
.
distance
;
//DOM
//DOM
}
else
if
(
scrollEl
instanceof
HTMLElement
)
{
}
else
if
(
scrollEl
instanceof
HTMLElement
)
{
...
...
src/sites/doc/components/Header.vue
浏览文件 @
22511709
...
@@ -10,24 +10,24 @@
...
@@ -10,24 +10,24 @@
<div
class=
"nav-box"
>
<div
class=
"nav-box"
>
<ul
class=
"nav-list"
>
<ul
class=
"nav-list"
>
<li
class=
"nav-item"
:class=
"
{ active: isActive(header[0].name) }">
<li
class=
"nav-item"
:class=
"
{ active: isActive(header[0].name) }">
<router-link
:to=
"header[0].name"
>
{{
<router-link
:to=
"header[0].name"
>
header
[
0
].
cName
{{
header
[
0
].
cName
}}
}}
</router-link>
</router-link>
</li>
</li>
<li
class=
"nav-item"
:class=
"
{ active: isActive(header[1].name) }">
<li
class=
"nav-item"
:class=
"
{ active: isActive(header[1].name) }">
<router-link
:to=
"header[1].name"
>
{{
<router-link
:to=
"header[1].name"
>
header
[
1
].
cName
{{
header
[
1
].
cName
}}
}}
</router-link>
</router-link>
</li>
<li
class=
"nav-item"
:class=
"
{ active: isActive(header[2].name) }">
<a
href=
"http://localhost:8080/demo.html#/"
>
{{
header
[
2
].
cName
}}
</a>
</li>
</li>
<li
class=
"nav-item"
:class=
"
{ active: isActive(header[2].name) }"
>
<a
href=
"http://localhost:8080/demo.html#/"
>
{{
header
[
2
].
cName
}}
</a></li
>
<li
class=
"nav-item"
:class=
"
{ active: isActive(header[3].name) }">
<li
class=
"nav-item"
:class=
"
{ active: isActive(header[3].name) }">
<router-link
:to=
"header[3].name"
>
{{
<router-link
:to=
"header[3].name"
>
header
[
3
].
cName
{{
header
[
3
].
cName
}}
}}
</router-link>
</router-link>
</li>
</li>
<li
class=
"nav-item"
>
<li
class=
"nav-item"
>
<div
<div
...
@@ -234,7 +234,7 @@ export default defineComponent({
...
@@ -234,7 +234,7 @@ export default defineComponent({
height
:
26px
;
height
:
26px
;
vertical-align
:
middle
;
vertical-align
:
middle
;
background
:
url('../../assets/images/icon-user.png')
no-repeat
;
background
:
url('../../assets/images/icon-user.png')
no-repeat
;
background-size
:
100%
;
background-size
:
26px
;
}
}
}
}
}
}
...
@@ -322,6 +322,9 @@ export default defineComponent({
...
@@ -322,6 +322,9 @@ export default defineComponent({
}
}
.user-link
{
.user-link
{
background-position
:
0
0
;
background-position
:
0
0
;
// &:hover {
// background-position: -26px 0;
// }
}
}
}
}
}
}
...
@@ -397,7 +400,10 @@ export default defineComponent({
...
@@ -397,7 +400,10 @@ export default defineComponent({
}
}
}
}
.user-link
{
.user-link
{
background-position
:
0
-26px
;
background-position
:
0
-25px
;
// &:hover {
// background-position: -26px -25px;
// }
}
}
}
}
}
}
...
@@ -473,7 +479,10 @@ export default defineComponent({
...
@@ -473,7 +479,10 @@ export default defineComponent({
}
}
}
}
.user-link
{
.user-link
{
background-position
:
0
-52px
;
background-position
:
0
-51px
;
// &:hover {
// background-position: -26px -51px;
// }
}
}
}
}
}
}
...
...
src/sites/doc/components/Search.vue
浏览文件 @
22511709
...
@@ -20,7 +20,6 @@
...
@@ -20,7 +20,6 @@
{{
item
.
name
}}
{{
item
.
name
}}
<span>
{{
item
.
cName
}}
</span>
<span>
{{
item
.
cName
}}
</span>
</router-link>
</router-link>
<!--
<router-link
v-if=
"!_package.isLink"
:to=
"_package.name.toLowerCase()"
>
{{
_package
.
cName
}}
</router-link>
-->
</li>
</li>
</ul>
</ul>
</div>
</div>
...
@@ -57,7 +56,6 @@ export default defineComponent({
...
@@ -57,7 +56,6 @@ export default defineComponent({
watch
(
watch
(
()
=>
data
.
searchVal
,
()
=>
data
.
searchVal
,
sVal
=>
{
sVal
=>
{
console
.
log
(
sVal
,
'
改变
'
);
if
(
sVal
)
{
if
(
sVal
)
{
data
.
searchList
=
data
.
navList
.
filter
(
item
=>
{
data
.
searchList
=
data
.
navList
.
filter
(
item
=>
{
if
(
item
.
show
===
false
)
return
false
;
if
(
item
.
show
===
false
)
return
false
;
...
@@ -83,11 +81,38 @@ export default defineComponent({
...
@@ -83,11 +81,38 @@ export default defineComponent({
data
.
searchVal
=
''
;
data
.
searchVal
=
''
;
},
200
);
},
200
);
};
};
const
checklist
=
item
=>
{
const
checklist
=
()
=>
{
console
.
log
(
1
);
data
.
searchVal
=
''
;
data
.
searchCurName
=
''
;
data
.
searchIndex
=
0
;
};
};
const
choseList
=
e
=>
{
const
choseList
=
e
=>
{
data
.
searchIndex
=
0
;
let
searchIndex
=
data
.
searchIndex
;
if
(
e
.
keyCode
==
40
)
{
searchIndex
++
;
}
if
(
e
.
keyCode
==
38
)
{
searchIndex
--
;
}
if
(
searchIndex
<
0
)
{
searchIndex
=
0
;
}
const
searchList
=
data
.
searchList
;
if
(
searchList
.
length
>
0
)
{
const
cName
=
searchList
[
searchIndex
]
&&
searchList
[
searchIndex
].
name
;
if
(
cName
)
{
data
.
searchCurName
=
cName
;
data
.
searchIndex
=
searchIndex
;
if
(
e
.
keyCode
==
13
)
{
data
.
$router
.
push
({
path
:
'
/
'
+
searchList
[
searchIndex
].
name
});
data
.
searchCurName
=
''
;
data
.
searchIndex
=
0
;
data
.
searchVal
=
''
;
}
}
}
};
};
return
{
return
{
data
,
data
,
...
...
src/sites/doc/views/Resource.vue
浏览文件 @
22511709
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
</div>
</div>
<!-- 设计资源 -->
<!-- 设计资源 -->
<div
class=
"resource-content"
>
<div
class=
"resource-content"
>
<div
class=
"resource-block"
v-if=
"
data.
articleList.length === 0"
>
<div
class=
"resource-block"
v-if=
"articleList.length === 0"
>
<h4
class=
"sub-title"
>
设计资源
</h4>
<h4
class=
"sub-title"
>
设计资源
</h4>
<p
class=
"sub-desc"
<p
class=
"sub-desc"
>
这里提供 NUT UI
>
这里提供 NUT UI
...
@@ -33,18 +33,18 @@
...
@@ -33,18 +33,18 @@
<div
class=
"tab-hd"
>
<div
class=
"tab-hd"
>
<div
<div
class=
"tab-hd-item"
class=
"tab-hd-item"
:class=
"
{ active:
data.
activeIndex === index }"
:class=
"
{ active: activeIndex === index }"
v-for="(item, index) in
data.
tabData"
v-for="(item, index) in tabData"
:key="index"
:key="index"
@click="clickTab(index)"
@click="clickTab(index)"
>
>
{{
item
.
title
}}
{{
item
.
title
}}
</div>
</div>
</div>
</div>
<div
class=
"tab-bd"
v-show=
"
data.
activeIndex === 0"
>
<div
class=
"tab-bd"
v-show=
"activeIndex === 0"
>
<div
<div
class=
"design-item"
class=
"design-item"
v-for=
"item in
data.
articleList"
v-for=
"item in articleList"
:key=
"item.id"
:key=
"item.id"
@
click=
"toLink(item.id)"
@
click=
"toLink(item.id)"
>
>
...
@@ -52,7 +52,7 @@
...
@@ -52,7 +52,7 @@
<p
class=
"design-title"
>
{{
item
.
title
}}
</p>
<p
class=
"design-title"
>
{{
item
.
title
}}
</p>
</div>
</div>
</div>
</div>
<div
class=
"tab-bd"
v-show=
"
data.
activeIndex === 1"
>
<div
class=
"tab-bd"
v-show=
"activeIndex === 1"
>
<div
class=
"design-item"
>
<div
class=
"design-item"
>
<img
class=
"img-design"
src=
"../../assets/images/img-article.jpg"
/>
<img
class=
"img-design"
src=
"../../assets/images/img-article.jpg"
/>
<p
class=
"design-title"
<p
class=
"design-title"
...
@@ -93,7 +93,7 @@
...
@@ -93,7 +93,7 @@
<doc-footer></doc-footer>
<doc-footer></doc-footer>
</
template
>
</
template
>
<
script
lang=
"ts"
>
<
script
lang=
"ts"
>
import
{
defineComponent
,
onMounted
,
reactive
}
from
'
vue
'
;
import
{
defineComponent
,
onMounted
,
reactive
,
toRefs
}
from
'
vue
'
;
import
{
import
{
onBeforeRouteUpdate
,
onBeforeRouteUpdate
,
RouteLocationNormalized
,
RouteLocationNormalized
,
...
@@ -116,12 +116,6 @@ export default defineComponent({
...
@@ -116,12 +116,6 @@ export default defineComponent({
tabData
:
[
tabData
:
[
{
{
title
:
'
全部文章
'
title
:
'
全部文章
'
},
{
title
:
'
性能体验
'
},
{
title
:
'
性能体验1
'
}
}
// {
// {
// title: '性能体验'
// title: '性能体验'
...
@@ -158,7 +152,7 @@ export default defineComponent({
...
@@ -158,7 +152,7 @@ export default defineComponent({
window
.
open
(
'
//jelly.jd.com/article/
'
+
id
);
window
.
open
(
'
//jelly.jd.com/article/
'
+
id
);
};
};
return
{
return
{
data
,
...
toRefs
(
data
)
,
clickTab
,
clickTab
,
toLink
toLink
};
};
...
...
src/styles/font/iconfont.js
浏览文件 @
22511709
因为 它太大了无法显示 source diff 。你可以改为
查看blob
。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录