Skip to content

Commit 8161493

Browse files
committed
docs: remove Bit
1 parent 902fbd9 commit 8161493

File tree

13 files changed

+37
-73
lines changed

13 files changed

+37
-73
lines changed

Diff for: docs/.vuepress/components/Bit.vue

-8
This file was deleted.

Diff for: docs/README.md

-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# Introduction
22

3-
<Bit/>
4-
53
:::tip VERSION NOTE
64
For TypeScript users, `[email protected]+` requires `[email protected]+`, and vice versa.
75
:::

Diff for: docs/api/README.md

-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ sidebar: auto
44

55
# API Reference
66

7-
<Bit/>
8-
97
## `<router-link>`
108

119
`<router-link>` is the component for enabling user navigation in a router-enabled app. The target location is specified with the `to` prop. It renders as an `<a>` tag with correct `href` by default, but can be configured with the `tag` prop. In addition, the link automatically gets an active CSS class when the target route is active.

Diff for: docs/fr/README.md

-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# Introduction
22

3-
<Bit/>
4-
53
:::tip VERSION NOTE
64
Pour les utilisateurs de TypeScript, `[email protected]+` requière `[email protected]+`, et vice versa.
75
:::

Diff for: docs/fr/api/README.md

+12-10
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ sidebar: auto
44

55
# API
66

7-
<Bit/>
8-
97
## `<router-link>`
108

119
`<router-link>` est le composant pour activer la navigation utilisateur dans une application où le routeur est activé. La localisation cible est spécifiée grâce à la prop `to`. Il est rendu en tant que balise `<a>` avec le `href` correct par défaut, mais peut être configuré grâce à la prop `tag`. De plus, le lien se verra attribuer une classe CSS active lorsque la route cible est active.
@@ -55,10 +53,14 @@ Dans ce cas, `<a>` sera le lien actuel (et récupèrera le bon `href`), mais la
5553
<router-link :to="{ path: 'home' }">Accueil</router-link>
5654

5755
<!-- route nommée -->
58-
<router-link :to="{ name: 'user', params: { userId: 123 }}">Utilisateur</router-link>
56+
<router-link :to="{ name: 'user', params: { userId: 123 }}"
57+
>Utilisateur</router-link
58+
>
5959

6060
<!-- avec une requête, résulte en `/register?plan=private` -->
61-
<router-link :to="{ path: 'register', query: { plan: 'private' }}">S'enregistrer</router-link>
61+
<router-link :to="{ path: 'register', query: { plan: 'private' }}"
62+
>S'enregistrer</router-link
63+
>
6264
```
6365

6466
### replace
@@ -169,7 +171,7 @@ Le composant `<router-view>` est un composant fonctionnel qui fait le rendu du c
169171

170172
// 2.6.0+
171173
caseSensitive?: boolean, // use case sensitive match? (default: false)
172-
pathToRegexpOptions?: Object, // path-to-regexp options for compiling regex
174+
pathToRegexpOptions?: Object // path-to-regexp options for compiling regex
173175
}
174176
```
175177

@@ -361,7 +363,7 @@ L'objet `Route` peut être trouvé à plusieurs endroits :
361363
const router = new VueRouter({
362364
scrollBehavior(to, from, savedPosition) {
363365
// `to` et `from` sont tous les deux des objets Route
364-
},
366+
}
365367
})
366368
```
367369

@@ -412,10 +414,10 @@ L'objet `Route` peut être trouvé à plusieurs endroits :
412414
component: Foo,
413415
children: [
414416
// c'est aussi un itinéraire
415-
{ path: 'bar', component: Bar },
416-
],
417-
},
418-
],
417+
{ path: 'bar', component: Bar }
418+
]
419+
}
420+
]
419421
})
420422
```
421423

Diff for: docs/fr/guide/README.md

+6-10
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
11
# Pour commencer
22

3-
<Bit/>
4-
53
::: tip Note
64
Nous utiliserons [ES2015](https://github.com/lukehoban/es6features) dans les exemples de code dans ce guide.
7-
Tous les exemples utiliseront la version complète de Vue pour rendre l'analyse de template possible. Plus de détails [ici](https://fr.vuejs.org/guide/installation.html#Runtime-Compiler-vs-Runtime-seul).
5+
Tous les exemples utiliseront la version complète de Vue pour rendre l'analyse de template possible. Plus de détails [ici](https://fr.vuejs.org/guide/installation.html#Runtime-Compiler-vs-Runtime-seul).
86
:::
97

108
Créer une application monopage avec Vue + Vue Router est vraiment simple. Avec Vue.js, nous concevons déjà notre application avec des composants. En ajoutant vue-router dans notre application, tout ce qu'il nous reste à faire est de relier nos composants aux routes, et de laisser vue-router faire le rendu. Voici un exemple de base :
119

1210
## HTML
1311

14-
``` html
12+
```html
1513
<script src="https://unpkg.com/vue/dist/vue.js"></script>
1614
<script src="https://unpkg.com/vue-router/dist/vue-router.js"></script>
1715

@@ -32,7 +30,7 @@ Créer une application monopage avec Vue + Vue Router est vraiment simple. Avec
3230

3331
## JavaScript
3432

35-
``` js
33+
```js
3634
// 0. Si vous utilisez un système de module (par ex. via vue-cli), il faut importer Vue et Vue Router et ensuite appeler `Vue.use(VueRouter)`.
3735

3836
// 1. Définissez les composants de route.
@@ -73,16 +71,14 @@ En injectant le routeur, nous y avons accès à travers `this.$router`. Nous avo
7371
// Home.vue
7472
export default {
7573
computed: {
76-
username () {
74+
username() {
7775
// Nous verrons ce que représente `params` dans un instant.
7876
return this.$route.params.username
7977
}
8078
},
8179
methods: {
82-
goBack () {
83-
window.history.length > 1
84-
? this.$router.go(-1)
85-
: this.$router.push('/')
80+
goBack() {
81+
window.history.length > 1 ? this.$router.go(-1) : this.$router.push('/')
8682
}
8783
}
8884
}

Diff for: docs/guide/README.md

+5-9
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# Getting Started
22

3-
<Bit/>
4-
53
::: tip Note
64
We will be using [ES2015](https://github.com/lukehoban/es6features) in the code samples in the guide.
75

@@ -12,7 +10,7 @@ Creating a Single-page Application with Vue + Vue Router is dead simple. With Vu
1210

1311
## HTML
1412

15-
``` html
13+
```html
1614
<script src="https://unpkg.com/vue/dist/vue.js"></script>
1715
<script src="https://unpkg.com/vue-router/dist/vue-router.js"></script>
1816

@@ -33,7 +31,7 @@ Creating a Single-page Application with Vue + Vue Router is dead simple. With Vu
3331

3432
## JavaScript
3533

36-
``` js
34+
```js
3735
// 0. If using a module system (e.g. via vue-cli), import Vue and VueRouter
3836
// and then call `Vue.use(VueRouter)`.
3937

@@ -75,16 +73,14 @@ By injecting the router, we get access to it as `this.$router` as well as the cu
7573
// Home.vue
7674
export default {
7775
computed: {
78-
username () {
76+
username() {
7977
// We will see what `params` is shortly
8078
return this.$route.params.username
8179
}
8280
},
8381
methods: {
84-
goBack () {
85-
window.history.length > 1
86-
? this.$router.go(-1)
87-
: this.$router.push('/')
82+
goBack() {
83+
window.history.length > 1 ? this.$router.go(-1) : this.$router.push('/')
8884
}
8985
}
9086
}

Diff for: docs/ru/README.md

-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# Введение
22

3-
<Bit/>
4-
53
:::tip ПРИМЕЧАНИЕ К ВЕРСИИ
64
Для пользователей TypeScript, `[email protected]+` требуется `[email protected]+`, и наоборот.
75
:::

Diff for: docs/ru/api/README.md

+3-5
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ sidebar: auto
44

55
# Справочник API
66

7-
<Bit/>
8-
97
## `<router-link>`
108

119
`<router-link>` — это компонент предназначенный для навигации пользователя в приложении с клиентской маршрутизацией. Путь назначения указывается входным параметром `to`. По умолчанию компонент рендерится в тег `<a>` с корректным значением `href`, но это можно изменить входным параметром `tag`. Кроме того, ссылка автоматически получает активный класс CSS при переходе на путь назначения.
@@ -167,7 +165,7 @@ sidebar: auto
167165

168166
## `<router-view>`
169167

170-
Функциональный компонент `<router-view>` отображает компонент соответствующий данному маршруту. Компоненты внутри `<router-view>` также могут содержать в шаблоне собственный `<router-view>` (он будет использован для отображения компонентов вложенных маршрутов).
168+
Функциональный компонент `<router-view>` отображает компонент соответствующий данному маршруту. Компоненты внутри `<router-view>` также могут содержать в шаблоне собственный `<router-view>` (он будет использован для отображения компонентов вложенных маршрутов).
171169

172170
Все остальные входные параметры передаются в отображаемый компонент, однако данные маршрута удобнее получать из `$route.params` текущего маршрута.
173171

@@ -457,7 +455,7 @@ router.onError(callback)
457455
458456
```js
459457
const router = new VueRouter({
460-
scrollBehavior (to, from, savedPosition) {
458+
scrollBehavior(to, from, savedPosition) {
461459
// как `to` так и `from` являются объектами маршрута
462460
}
463461
})
@@ -475,7 +473,7 @@ router.onError(callback)
475473
476474
- тип: `Object`
477475
478-
Объект, который содержит пары ключ/значение динамических сегментов маршрута (включая *-сегменты). Если параметров нет, то значением будет пустой объект.
476+
Объект, который содержит пары ключ/значение динамических сегментов маршрута (включая \*-сегменты). Если параметров нет, то значением будет пустой объект.
479477
480478
- **\$route.query**
481479

Diff for: docs/ru/guide/README.md

+3-7
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# Начало работы
22

3-
<Bit/>
4-
53
::: tip Примечание
64
Мы будем использовать синтаксис [ES2015](https://github.com/lukehoban/es6features) в примерах кода в этом руководстве.
75

@@ -73,16 +71,14 @@ const app = new Vue({
7371
// Home.vue
7472
export default {
7573
computed: {
76-
username () {
74+
username() {
7775
// Мы скоро разберём что такое `params`
7876
return this.$route.params.username
7977
}
8078
},
8179
methods: {
82-
goBack () {
83-
window.history.length > 1
84-
? this.$router.go(-1)
85-
: this.$router.push('/')
80+
goBack() {
81+
window.history.length > 1 ? this.$router.go(-1) : this.$router.push('/')
8682
}
8783
}
8884
}

Diff for: docs/zh/README.md

-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# 介绍
22

3-
<Bit/>
4-
53
:::tip 版本说明
64
对于 TypeScript 用户来说,`[email protected]+` 依赖 `[email protected]+`,反之亦然。
75
:::

Diff for: docs/zh/api/README.md

+2-4
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ sidebar: auto
44

55
# API 参考
66

7-
<Bit/>
8-
97
## `<router-link>`
108

119
`<router-link>` 组件支持用户在具有路由功能的应用中 (点击) 导航。
@@ -14,7 +12,7 @@ sidebar: auto
1412
`<router-link>` 比起写死的 `<a href="...">` 会好一些,理由如下:
1513

1614
- 无论是 HTML5 history 模式还是 hash 模式,它的表现行为一致,所以,当你要切换路由模式,或者在 IE9 降级使用 hash 模式,无须作任何变动。
17-
- 在 HTML5 history 模式下,`router-link` 会守卫点击事件,让浏览器不再重新加载页面。
15+
- 在 HTML5 history 模式下,`router-link` 会守卫点击事件,让浏览器不再重新加载页面。
1816
- 当你在 HTML5 history 模式下使用 `base` 选项之后,所有的 `to` 属性都不需要写 (基路径) 了。
1917

2018
### `v-slot` API (3.1.0 新增)
@@ -121,7 +119,7 @@ sidebar: auto
121119
- 类型: `string`
122120
- 默认值: `"a"`
123121

124-
有时候想要 `<router-link>` 渲染成某种标签,例如 `<li>`
122+
有时候想要 `<router-link>` 渲染成某种标签,例如 `<li>`
125123
于是我们使用 `tag` prop 类指定何种标签,同样它还是会监听点击,触发导航。
126124

127125
```html

Diff for: docs/zh/guide/README.md

+6-10
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# 起步
22

3-
<Bit/>
4-
53
::: tip 注意
64
教程中的案例代码将使用 [ES2015](https://github.com/lukehoban/es6features) 来编写。
75

@@ -12,7 +10,7 @@
1210

1311
## HTML
1412

15-
``` html
13+
```html
1614
<script src="https://unpkg.com/vue/dist/vue.js"></script>
1715
<script src="https://unpkg.com/vue-router/dist/vue-router.js"></script>
1816

@@ -33,7 +31,7 @@
3331

3432
## JavaScript
3533

36-
``` js
34+
```js
3735
// 0. 如果使用模块化机制编程,导入Vue和VueRouter,要调用 Vue.use(VueRouter)
3836

3937
// 1. 定义 (路由) 组件。
@@ -73,16 +71,14 @@ const app = new Vue({
7371
// Home.vue
7472
export default {
7573
computed: {
76-
username () {
74+
username() {
7775
// 我们很快就会看到 `params` 是什么
7876
return this.$route.params.username
7977
}
8078
},
8179
methods: {
82-
goBack () {
83-
window.history.length > 1
84-
? this.$router.go(-1)
85-
: this.$router.push('/')
80+
goBack() {
81+
window.history.length > 1 ? this.$router.go(-1) : this.$router.push('/')
8682
}
8783
}
8884
}
@@ -92,4 +88,4 @@ export default {
9288

9389
你可以看看这个[在线的](https://jsfiddle.net/yyx990803/xgrjzsup/)例子。
9490

95-
要注意,当 `<router-link>` 对应的路由匹配成功,将自动设置 class 属性值 `.router-link-active`。查看 [API 文档](../api/#router-link) 学习更多相关内容。
91+
要注意,当 `<router-link>` 对应的路由匹配成功,将自动设置 class 属性值 `.router-link-active`。查看 [API 文档](../api/#router-link) 学习更多相关内容。

0 commit comments

Comments
 (0)