fix: vue injection warn (#6168)

#### What type of PR is this?

/area ui
/kind bug
/milestone 2.17.x

#### What this PR does / why we need it:

Fix the vue injection warn in browser console

<img width="559" alt="image" src="https://github.com/halo-dev/halo/assets/21301288/4160cbe4-fe8b-4b30-a1db-57d35d78e4f9">

#### Does this PR introduce a user-facing change?

```release-note
None 
```
pull/6174/head
Ryan Wang 2024-06-27 16:08:56 +08:00 committed by GitHub
parent f277655e11
commit c59c61b251
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -8,7 +8,7 @@ const props = withDefaults(defineProps<AvatarProps>(), {
circle: false,
});
const groupProps = inject(AvatarGroupContextInjectionKey);
const groupProps = inject(AvatarGroupContextInjectionKey, undefined);
const size = computed(() => groupProps?.size || props.size);
const circle = computed(() => groupProps?.circle || props.circle);