feat(jsx-explorer): add resolveType option (#692)

This commit is contained in:
Pig Fang 2024-01-24 02:19:02 +08:00 committed by GitHub
parent 0838a222d9
commit 9d97341d04
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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'),
]),
]),
]),
];