From 9d97341d040620de4be1b65ce8e02805dc0c785b Mon Sep 17 00:00:00 2001 From: Pig Fang Date: Wed, 24 Jan 2024 02:19:02 +0800 Subject: [PATCH] feat(jsx-explorer): add `resolveType` option (#692) --- packages/jsx-explorer/src/options.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/packages/jsx-explorer/src/options.ts b/packages/jsx-explorer/src/options.ts index 1957dd9..3f5711e 100644 --- a/packages/jsx-explorer/src/options.ts +++ b/packages/jsx-explorer/src/options.ts @@ -8,6 +8,7 @@ export const compilerOptions: VueJSXPluginOptions = reactive({ optimize: false, transformOn: false, enableObjectSlots: true, + resolveType: false, }); const App = { @@ -86,6 +87,21 @@ const App = { }), h('label', { for: 'enableObjectSlots' }, 'enableObjectSlots'), ]), + + // resolveType + h('li', [ + h('input', { + type: 'checkbox', + id: 'resolveType', + checked: compilerOptions.resolveType, + onChange(e: Event) { + compilerOptions.resolveType = ( + e.target as HTMLInputElement + ).checked; + }, + }), + h('label', { for: 'resolveType' }, 'resolveType'), + ]), ]), ]), ];