Skip to content

Commit c2d4c61

Browse files
authored
fix: number and date format components not using scope prop (#1786)
1 parent 9e61ca6 commit c2d4c61

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/vue-i18n-core/src/components/DatetimeFormat.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export const DatetimeFormatImpl = /* #__PURE__*/ defineComponent({
4444
const i18n =
4545
props.i18n ||
4646
(useI18n({
47-
useScope: 'parent',
47+
useScope: props.scope as 'global' | 'parent',
4848
__useComponent: true
4949
}) as unknown as Composer & ComposerInternal)
5050

packages/vue-i18n-core/src/components/NumberFormat.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export const NumberFormatImpl = /*#__PURE__*/ defineComponent({
4343
const i18n =
4444
props.i18n ||
4545
(useI18n({
46-
useScope: 'parent',
46+
useScope: props.scope as 'global' | 'parent',
4747
__useComponent: true
4848
}) as unknown as Composer & ComposerInternal)
4949

0 commit comments

Comments
 (0)