Skip to content

Add Location definition under router-link section in API #2779

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions docs/api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,20 @@ In this case the `<a>` will be the actual link (and will get the correct `href`)
<router-link :to="{ path: 'register', query: { plan: 'private' }}">Register</router-link>
```

Type declaration for `Location`:

```js
declare type Location = {
name?: string; // for named routes
path?: string;
hash?: string; // Must start with a #
query?: Dictionary<string | (string | null)[] | null | undefined>;
params?: Dictionary<string>;
append?: boolean;
replace?: boolean;
}
```

### replace

- type: `boolean`
Expand Down
14 changes: 14 additions & 0 deletions docs/fr/api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,20 @@ Dans ce cas, `<a>` sera le lien actuel (et récupèrera le bon `href`), mais la
<router-link :to="{ path: 'register', query: { plan: 'private' }}">S'enregistrer</router-link>
```

Déclaration de type pour `Location`:

```js
declare type Location = {
name?: string; // pour les routes nommées
path?: string;
hash?: string; // Doit commencer par un #
query?: Dictionary<string | (string | null)[] | null | undefined>;
params?: Dictionary<string>;
append?: boolean;
replace?: boolean;
}
```


### replace

Expand Down
14 changes: 14 additions & 0 deletions docs/ja/api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,20 @@ sidebar: auto
<router-link :to="{ path: 'register', query: { plan: 'private' }}">Register</router-link>
```

`Location` の型宣言:

```js
declare type Location = {
name?: string; // 名前付きルート用
path?: string;
hash?: string; // #で始まらなければなりません
query?: Dictionary<string | (string | null)[] | null | undefined>;
params?: Dictionary<string>;
append?: boolean;
replace?: boolean;
}
```

### replace

- 型: `boolean`
Expand Down
14 changes: 14 additions & 0 deletions docs/kr/api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,20 @@ sidebar: auto
<router-link :to="{ path: 'register', query: { plan: 'private' }}">Register</router-link>
```

Type declaration for `Location`:

```js
declare type Location = {
name?: string; // for named routes
path?: string;
hash?: string; // Must start with a #
query?: Dictionary<string | (string | null)[] | null | undefined>;
params?: Dictionary<string>;
append?: boolean;
replace?: boolean;
}
```

### replace

- 자료형: `boolean`
Expand Down
14 changes: 14 additions & 0 deletions docs/ru/api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,20 @@ sidebar: auto
<router-link :to="{ path: 'register', query: { plan: 'private' }}">Register</router-link>
```

Декларация типа для `Location`:

```js
declare type Location = {
name?: string; // для именованных маршрутов
path?: string;
hash?: string; // Должен начинаться с #
query?: Dictionary<string | (string | null)[] | null | undefined>;
params?: Dictionary<string>;
append?: boolean;
replace?: boolean;
}
```

### replace

- тип: `boolean`
Expand Down
14 changes: 14 additions & 0 deletions docs/zh/api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,20 @@ sidebar: auto
<router-link :to="{ path: 'register', query: { plan: 'private' }}">Register</router-link>
```

`Location` 的类型定义:

```js
declare type Location = {
name?: string; // 命名路由
path?: string;
hash?: string; // 必须以#开头
query?: Dictionary<string | (string | null)[] | null | undefined>;
params?: Dictionary<string>;
append?: boolean;
replace?: boolean;
}
```

### replace

- 类型: `boolean`
Expand Down