Skip to content

Commit 722bda2

Browse files
committed
docs: opt style
1 parent 2550180 commit 722bda2

File tree

8 files changed

+34
-22
lines changed

8 files changed

+34
-22
lines changed

packages/hooks/docs/.vitepress/theme/home/DemoEditor.vue

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
11
<template>
2-
<div>
3-
<h2 class="name">
4-
Grace
5-
</h2>
6-
</div>
72
<div id="demo-editor" ref="domRef">
83
<div class="terminal">
94
<slot />

packages/hooks/docs/.vitepress/theme/home/Home.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,13 @@
9797
</div>
9898
</section>
9999
</div>
100+
100101
<DemoEditor>
101102
<div class="demo-name">
102103
Demo.vue
103104
</div>
104105
</DemoEditor>
106+
105107
<HomeTeam />
106108
</div>
107109
</template>

packages/hooks/docs/.vitepress/theme/home/HomeTeam.vue

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,35 +4,38 @@
44
</script>
55

66
<template>
7-
<div>
8-
<h2 class="name">
9-
Meet The Team
10-
</h2>
11-
</div>
12-
<div class="main">
13-
<div class="grid">
14-
<TeamMember v-for="c of coreTeamMembers" :key="c.github" :data="c" />
7+
<div class="container">
8+
<div class="main">
9+
<div>
10+
<h2 class="name">
11+
Meet The Team
12+
</h2>
13+
</div>
14+
<div class="grid">
15+
<TeamMember v-for="c of coreTeamMembers" :key="c.github" :data="c" />
16+
</div>
1517
</div>
1618
</div>
1719
</template>
1820

1921
<style scoped>
20-
.container {
21-
display: flex;
22-
}
23-
2422
h2 {
2523
text-align: center;
2624
font-weight: 600;
2725
/* transform: scale(0.8); */
2826
color: var(--vp-font-color);
2927
padding-bottom: 1rem;
28+
padding-top: 2rem;
3029
}
3130
3231
.main {
3332
/* padding: 96px 32px; */
3433
text-align: center;
3534
background-color: var(--vp-c-bg);
35+
border-top-left-radius: 2rem;
36+
border-top-right-radius: 2rem;
37+
/* border: 1.5px solid rgba(0, 0, 0, 0.05); */
38+
box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05), 0 0 30px 1px rgba(0, 0, 0, 0.15);
3639
}
3740
3841
.grid {

packages/hooks/docs/.vitepress/theme/home/index.less

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
height: 100%;
33
padding-top: 24px;
44
// background: url('/light.jpg');
5-
background-size: contain;
5+
background-size: cover;
66
}
77
.dark {
88
.home {
99
padding-top: 24px;
1010
background: url('/dark.jpg') no-repeat;
11-
background-size: contain;
11+
background-size: cover;
1212
}
1313
}

packages/hooks/docs/.vitepress/theme/var.less

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,12 +121,24 @@ input:focus {
121121
}
122122

123123
@media (max-width: 639px) {
124+
h2 {
125+
text-align: center;
126+
font-weight: 600;
127+
/* transform: scale(0.8); */
128+
// color: var(--vp-font-color);
129+
}
124130
.vp-doc div[class*='language-'] {
125131
border-radius: 4px;
126132
}
127133
}
128134

129135
@media (max-width: 767px) {
136+
h2 {
137+
text-align: center;
138+
font-weight: 600;
139+
/* transform: scale(0.8); */
140+
// color: var(--vp-font-color);
141+
}
130142
.VPNavBar {
131143
border-bottom: 0 !important;
132144
}

packages/hooks/src/useRequest/docs/basic/index.zh-CN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ runAsync()
110110

111111
我们修改了用户名,但是我们不希望等编辑接口调用成功之后,才给用户反馈。而是直接修改页面数据,同时在背后去调用修改接口,等修改接口返回之后,另外提供反馈。
112112

113-
### 错误回滚 `1.7.7.alpha.4`
113+
### 错误回滚
114114

115115
当你使用 `mutate`时,有可能在乐观数据展示给用户后,远程数据更改却失败了。在这种情况下,你可以启用 `rollbackOnError`,将本地缓存恢复到之前的状态,确保用户看到的是正确的数据。
116116

packages/hooks/src/useRequest/docs/refreshDeps/index.en-US.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ When `refreshDeps` passes in an array of responsive objects, when its value chan
2626
title=""
2727
desc="In the example code above, useRequest will execution when it is initialized and Id & store ID changes."> </demo>
2828

29-
## Automatically collect dependencies `v1.6.0`
29+
## Automatically collect dependencies
3030

3131
When `refreshDeps` is passed in `true`, `useRequest` will automatically collect the response object parameters in the function parameters, as long as the response object in the parameters changes, it will carry the latest value to re-initiate the request.
3232

packages/hooks/src/useRequest/docs/refreshDeps/index.zh-CN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ source:
2626
title=""
2727
desc="每次参数依赖发生,都会携带参数重新发起请求"> </demo>
2828

29-
## 自动收集依赖 `v1.6.0`
29+
## 自动收集依赖
3030

3131
`refreshDeps` 传入的是 `true` 的时候,`useRequest` 会自动收集函数参数中的响应式对象参数,只要参数里面的响应式对象发生变化就会携带最新的值重新发起请求 。
3232

0 commit comments

Comments
 (0)