Skip to content

Commit e3c5287

Browse files
authored
Merge pull request #62 from maxdzin/translate/props-default-this
2 parents fa72820 + 43223fb commit e3c5287

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed
Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
---
2-
title: Props Default Function this Access
2+
title: Доступ до this в функції реквізитів
33
badges:
44
- breaking
55
---
66

7-
# Props Default Function `this` Access <MigrationBadges :badges="$frontmatter.badges" />
7+
# Доступ до `this` в функції реквізитів <MigrationBadges :badges="$frontmatter.badges" />
88

9-
Props default value factory functions no longer have access to `this`.
9+
Фабричні функції значення реквізитів за замовчуванням більше не мають доступу до `this`.
1010

11-
Instead:
11+
Натомість:
1212

13-
- Raw props received by the component are passed to the default function as argument;
13+
- Необроблені реквізити, отримані компонентом, передаються функцію за замовчуванням як аргумент;
1414

15-
- The [inject](https://vuejs.org/api/composition-api-dependency-injection.html#inject) API can be used inside default functions.
15+
- API [inject](https://vuejs.org/api/composition-api-dependency-injection.html#inject) можна використовувати у функціях за замовчуванням.
1616

1717
```js
1818
import { inject } from 'vue'
@@ -21,16 +21,17 @@ export default {
2121
props: {
2222
theme: {
2323
default (props) {
24-
// `props` is the raw values passed to the component,
25-
// before any type / default coercions
26-
// can also use `inject` to access injected properties
24+
// `props` - це необроблені значення, передані компоненту,
25+
// до будь-якого типу / приведення по замовчуванню
26+
// також може використовувати `inject` для доступу до
27+
// введених властивостей
2728
return inject('theme', 'default-theme')
2829
}
2930
}
3031
}
3132
}
3233
```
3334

34-
## Migration Strategy
35+
## Стратегія міграції
3536

36-
[Migration build flag: `PROPS_DEFAULT_THIS`](../migration-build.html#compat-configuration)
37+
[Прапор збірки міграції: `PROPS_DEFAULT_THIS`](../migration-build.html#compat-configuration)

0 commit comments

Comments
 (0)