Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
unidocs-zh
提交
7e3de289
unidocs-zh
项目概览
DCloud
/
unidocs-zh
通知
3561
Star
107
Fork
909
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
118
列表
看板
标记
里程碑
合并请求
104
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
unidocs-zh
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
118
Issue
118
列表
看板
标记
里程碑
合并请求
104
合并请求
104
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
7e3de289
编写于
3月 18, 2022
作者:
D
DCloud_LXH
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
wip: 样式调整
上级
b40a1a94
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
30 addition
and
18 deletion
+30
-18
docs/.vuepress/theme/components/DcloudSearchPage/components/Result.vue
...s/theme/components/DcloudSearchPage/components/Result.vue
+10
-6
docs/.vuepress/theme/components/DcloudSearchPage/components/Results.vue
.../theme/components/DcloudSearchPage/components/Results.vue
+12
-7
docs/.vuepress/theme/components/DcloudSearchPage/index.vue
docs/.vuepress/theme/components/DcloudSearchPage/index.vue
+8
-5
未找到文件。
docs/.vuepress/theme/components/DcloudSearchPage/components/Result.vue
浏览文件 @
7e3de289
...
...
@@ -75,17 +75,21 @@
},
};
</
script
>
<
style
lang=
"stylus"
scoped
>
<
style
lang=
"stylus"
>
.DocSearch-Hit
border-radius
4
px
border-radius
0
px
display flex
padding-bottom
4
px
padding-bottom
0
px
position relative
&:not(:first-child)
border-top 1px solid #f5f6f7
a
background var(--docsearch-hit-background)
border-radius 4px
box-shadow var(--docsearch-hit-shadow)
border-radius 0px
// box-shadow var(--docsearch-hit-shadow)
box-shadow none
display block
padding-left var(--docsearch-spacing)
width 100%
...
...
@@ -117,6 +121,6 @@
font-size 0.9em
.DocSearch-Hit-path
color $accentColor
//
color $accentColor
font-size 0.75em
</
style
>
docs/.vuepress/theme/components/DcloudSearchPage/components/Results.vue
浏览文件 @
7e3de289
...
...
@@ -29,14 +29,19 @@
methods
:
{},
};
</
script
>
<
style
lang=
"stylus"
scoped
>
.DocSearch-Hits mark {
background: none;
color: $accentColor;
}
<
style
lang=
"stylus"
>
#docsearch-list{
border-radius: 10px;
padding: 0;
}
.DocSearch-Hits mark {
background: none;
color: $accentColor;
}
.DocSearch-Hit-source {
background-color $search-container-color;
color: $accentColor;
background-color $search-container-color;
color: $accentColor;
}
</
style
>
docs/.vuepress/theme/components/DcloudSearchPage/index.vue
浏览文件 @
7e3de289
...
...
@@ -133,8 +133,8 @@
resultList
:
[],
searchPage
:
0
,
// 跳转页数
curHits
:
0
,
// 当前搜索条数
totalPage
:
0
,
// 搜索结果总共
条
数
curHits
:
0
,
// 当前搜索
结果总
条数
totalPage
:
0
,
// 搜索结果总共
页
数
curPage
:
1
,
// 当前页
pageSize
:
0
,
// 每页条数
};
...
...
@@ -144,6 +144,9 @@
showPagination
()
{
return
!!
(
this
.
resultList
.
length
&&
this
.
totalPage
>
1
);
},
currentCategory
()
{
return
this
.
category
[
this
.
categoryIndex
];
},
},
mounted
()
{
...
...
@@ -159,14 +162,13 @@
openSearch
(
val
)
{
this
.
$nextTick
(()
=>
{
if
(
val
)
{
this
.
$nextTick
(
forbidScroll
);
forbidScroll
(
);
document
.
body
.
appendChild
(
this
.
$el
);
this
.
$nextTick
(()
=>
this
.
$refs
.
searchInput
.
focus
());
}
else
{
this
.
cancel
();
forbidScroll
(
false
);
document
.
body
.
removeChild
(
this
.
$el
);
// window.removeEventListener('keydown', this.onKeyDown);
}
});
},
...
...
@@ -181,6 +183,7 @@
resetSearchPage
()
{
this
.
searchPage
=
0
;
},
research
(
curPage
)
{
this
.
searchPage
=
curPage
-
1
;
this
.
search
();
...
...
@@ -188,7 +191,7 @@
search
()
{
if
(
!
this
.
searchValue
)
return
;
const
{
text
,
type
}
=
this
.
c
ategory
[
this
.
categoryIndex
]
;
const
{
text
,
type
}
=
this
.
c
urrentCategory
;
switch
(
type
)
{
case
'
algolia
'
:
this
.
searchByAlgolia
(
this
.
searchValue
,
this
.
searchPage
).
then
(
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录