Skip to content
This repository was archived by the owner on Sep 12, 2023. It is now read-only.

feat: global attribute #53

Merged
merged 2 commits into from
Dec 4, 2020
Merged
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
coverage
node_modules
examples/legacy/index.js
examples/global/index.js
examples/compsable/index.js
.DS_Store
lib
Expand Down
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,15 @@ the below example that `examples/composable/App.vue` have `i18n` custom block:

<script>
import { useI18n } from 'vue-i18n'

export default {
name: 'App',
setup() {
return { ...useI18n({
const { t, locale } = useI18n({
inheritLocale: true
}) }
})

return { t, locale }
}
}
</script>
Expand Down
2 changes: 1 addition & 1 deletion e2e/example.test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
;['composable', 'legacy'].forEach(pattern => {
;['composable', 'legacy', 'globe'].forEach(pattern => {
describe(`${pattern}`, () => {
beforeAll(async () => {
await page.goto(`http://localhost:8080/${pattern}/`)
Expand Down
6 changes: 4 additions & 2 deletions examples/composable/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@ import { useI18n } from 'vue-i18n'
export default {
name: 'App',
setup() {
return { ...useI18n({
const { t, locale } = useI18n({
inheritLocale: true
}) }
})

return { t, locale }
}
}
</script>
Expand Down
Loading