28
28
- ` y2 ` (` string | number ` , 必要值): 终点 y 位置
29
29
- ` width ` (` string | number ` , 默认为: ` 2 ` ): 线宽
30
30
- ` color ` (` string ` , 默认为: ` 'currentColor' ` ): 颜色
31
- - ` two-way ` (` boolean ` , default : ` false ` ): draw a two-way arrow
31
+ - ` two-way ` (` boolean ` , 默认为 : ` false ` ): 是否为双向箭头
32
32
33
33
## ` VDragArrow `
34
34
60
60
61
61
## ` LightOrDark `
62
62
63
- 你可以使用它来根据活动的亮色或暗色主题,显示一种或另一种内容 。
63
+ 你可以使用它来根据当前的主题色(亮色或暗色),显示不同的内容 。
64
64
65
65
### 用法 {#light-or-dark-使用方式}
66
66
67
67
与 ` #dark ` 和 ` #light ` 插槽一起使用:
68
68
69
69
``` md
70
70
<LightOrDark>
71
- <template #dark>Dark mode is on </template>
72
- <template #light>Light mode is on </template>
71
+ <template #dark>正在使用暗色主题 </template>
72
+ <template #light>正在使用亮色主题 </template>
73
73
</LightOrDark>
74
74
```
75
75
110
110
### 使用方式
111
111
112
112
``` md
113
- <Link to="42">Go to slide 42 </Link>
113
+ <Link to="42">跳转到第 42 张 slide </Link>
114
114
<Link to="42" title="Go to slide 42"/>
115
115
<Link to="solutions" title="Go to solutions"/>
116
116
```
127
127
routeAlias: solutions
128
128
---
129
129
130
- # Now some solutions!
130
+ # 现在来些解决方案!
131
131
```
132
132
133
133
## ` PoweredBySlidev `
134
134
135
- Renders "Powered by Slidev" with a link to the Slidev website.
135
+ 添加一个带有指向 slidev 网站的 “Powered by Slidev” 标志到幻灯片信息中。
136
+ 你可以在导航栏中点击<carbon-information class =" inline-icon-btn " />来查看
136
137
137
138
## ` RenderWhen `
138
139
@@ -141,12 +142,12 @@ Renders "Powered by Slidev" with a link to the Slidev website.
141
142
### 使用方式
142
143
143
144
``` md
144
- <RenderWhen context="presenter">This will only be rendered in presenter view. </RenderWhen>
145
+ <RenderWhen context="presenter">这只会在演讲者视图中显示。 </RenderWhen>
145
146
```
146
147
147
- Context type : ` 'main' | 'visible' | 'print' | 'slide' | 'overview' | 'presenter' | 'previewNext' `
148
+ context 的类型 : ` 'main' | 'visible' | 'print' | 'slide' | 'overview' | 'presenter' | 'previewNext' `
148
149
149
- Props :
150
+ 尝试 :
150
151
151
152
- ` context ` (` Context | Context[] ` ): 要求的渲染上下文或渲染上下文数组
152
153
- ` 'main' ` : 在幻灯片和演示者视图中渲染(相当于 [ 'slide', 'presenter'] ),
@@ -157,10 +158,10 @@ Props:
157
158
- ` 'presenter' ` : 在演示者视图中渲染
158
159
- ` 'previewNext' ` : 在演示者的下一张幻灯片视图中渲染
159
160
160
- Slots :
161
+ 插槽 :
161
162
162
- - ` #default ` : Rendered when the context matches
163
- - ` #fallback ` : Rendered when the context does not match
163
+ - ` #default ` : 在 context 符合时显示
164
+ - ` #fallback ` : 在 context 不符合时显示
164
165
165
166
## ` SlideCurrentNo `
166
167
@@ -192,7 +193,7 @@ Slots:
192
193
193
194
``` yml
194
195
---
195
- title : Amazing slide title
196
+ title : 一个令人惊叹的标题
196
197
level : 2
197
198
---
198
199
```
@@ -211,7 +212,7 @@ import TitleRenderer from '#slidev/title-renderer'
211
212
<TitleRenderer no="42" />
212
213
```
213
214
214
- Props :
215
+ 参数 :
215
216
216
217
- ` no ` (` string | number ` ): 显示标题的幻灯片编号(幻灯片从 ` 1 ` 开始)
217
218
@@ -259,7 +260,7 @@ hideInToc: true
259
260
</Transform>
260
261
```
261
262
262
- Props :
263
+ 参数 :
263
264
264
265
- ` scale ` (` number | string ` , 默认为 ` 1 ` ): 大小比例
265
266
- ` origin ` (` string ` , 默认为 ` 'top left' ` ): 原点位置
@@ -274,7 +275,7 @@ Props:
274
275
<Tweet id="20" />
275
276
```
276
277
277
- Props :
278
+ 参数 :
278
279
279
280
- ` id ` (` number | string ` , 必要值): 推文 id
280
281
- ` scale ` (` number | string ` , 默认为: ` 1 ` ): 大小比例
@@ -307,7 +308,7 @@ Props:
307
308
308
309
``` md
309
310
<SlidevVideo v-click autoplay controls>
310
- <!-- Anything that can go in an HTML video element. -->
311
+ <!-- 可以加入 HTML video 元素中能包含的任何内容。 -->
311
312
<source src="/myMovie.mp4" type="video/mp4" />
312
313
<source src="/myMovie.webm" type="video/webm" />
313
314
<p>
@@ -320,7 +321,7 @@ Props:
320
321
321
322
查阅 [ HTML video 元素文档] ( https://developer.mozilla.org/docs/Web/HTML/Element/Video ) 以了解可以包含在此组件插槽中的内容。
322
323
323
- Props :
324
+ 参数 :
324
325
325
326
- ` controls ` (` boolean ` , 默认为 ` false ` ): 显示视频控件
326
327
- ` autoplay ` (` boolean | 'once' ` , 默认为 ` false ` ):
0 commit comments