fix: Textbox 不识别 typer props

This commit is contained in:
AncTe committed 2026-11-26 15:47:11 +08:00
1 parent b676cb185b
commit 95ca4029a6
1 file changed
+6 -2
@@ -86,7 +86,8 @@ const textContentOptions = {
'width',
'height',
'autoHeight',
'materials'
'materials',
'typer'
],
emits: ['typeEnd', 'typeStart', 'updateHeight']
} satisfies SetupComponentOptions<
@@ -100,7 +101,10 @@ export const TextContent = defineComponent<
TextContentEmits,
keyof TextContentEmits
>((props, { emit, expose }) => {
const defaultMaterials = inject<ITextureManager>('@default/materials');
const defaultMaterials = inject<ITextureManager | null>(
'@default/materials',
null
);
/** 使用的贴图管理器 */
const materials = computed(() => props.materials ?? defaultMaterials);