You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You might want to inject some global UI fixed somewhere on the page, e.g. `back-to-top`, `popup`. In VuePress, **a global UI is a Vue component**, you can directly define the component's name(s) in this option, e.g.
634
634
635
635
```js
636
636
module.exports= {
@@ -641,7 +641,7 @@ module.exports = {
641
641
}
642
642
```
643
643
644
-
VuePress 将会自动将这些组件注入到布局组件的隔壁:
644
+
Then, VuePress will automatically inject these components behind the layout component:
These fields starting with an `_`means you can only access them during build time.
531
+
::: warning 注意
532
+
那些以 `_`开头的字段意味着你只能在编译期访问。
533
533
:::
534
534
535
-
e.g.
535
+
例子:
536
536
537
537
```js
538
538
module.exports= {
@@ -542,17 +542,17 @@ module.exports = {
542
542
}
543
543
```
544
544
545
-
Then you can use this value via `this.$page.size`in any Vue component.
545
+
然后你可以在任意的 Vue 中通过 `this.$page.size`来访问这个变量。
546
546
547
547
### clientRootMixin
548
548
549
-
-Type: `String`
550
-
-Default: `undefined`
549
+
-类型: `String`
550
+
-默认值: `undefined`
551
551
552
-
A path to the mixin file which allow you to control the life cycle of root component.
552
+
指向 `mixin` 文件的路径,它让你你可以控制根组件的生命周期:
553
553
554
554
```js
555
-
//plugin's entry
555
+
//插件的入口
556
556
constpath=require('path')
557
557
558
558
module.exports= {
@@ -570,10 +570,10 @@ export default {
570
570
571
571
### additionalPages
572
572
573
-
-Type: `Array|Function`
574
-
-Default: `undefined`
573
+
-类型: `Array|Function`
574
+
-默认值: `undefined`
575
575
576
-
Add a page pointing to a markdown file:
576
+
增加一个指向某个 markdown 文件的页面:
577
577
578
578
```js
579
579
constpath=require('path')
@@ -588,7 +588,7 @@ module.exports = {
588
588
}
589
589
```
590
590
591
-
Add a page with explicit content:
591
+
或增加一个具有明确内容的页面:
592
592
593
593
```js
594
594
module.exports= {
@@ -608,7 +608,7 @@ module.exports = {
608
608
}
609
609
```
610
610
611
-
Add a pure route:
611
+
或增加一个纯粹的路由:
612
612
613
613
```js
614
614
module.exports= {
@@ -625,10 +625,10 @@ module.exports = {
625
625
626
626
### globalUIComponents
627
627
628
-
-Type: `Array|String`
629
-
-Default: `undefined`
628
+
-类型: `Array|String`
629
+
-默认值: `undefined`
630
630
631
-
You might want to inject some global UI fixed somewhere on the page, e.g. `back-to-top`, `popup`. In VuePress, **a global UI is a Vue component**, you can directly define the component's name(s) in this option, e.g.
0 commit comments