|
@@ -95,14 +95,15 @@ export function genElement(el: ASTElement, state: CodegenState): string {
|
|
|
code = genComponent(el.component, el, state)
|
|
code = genComponent(el.component, el, state)
|
|
|
} else {
|
|
} else {
|
|
|
let data
|
|
let data
|
|
|
- if (!el.plain || (el.pre && state.maybeComponent(el))) {
|
|
|
|
|
|
|
+ const maybeComponent = state.maybeComponent(el)
|
|
|
|
|
+ if (!el.plain || (el.pre && maybeComponent)) {
|
|
|
data = genData(el, state)
|
|
data = genData(el, state)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
let tag: string | undefined
|
|
let tag: string | undefined
|
|
|
// check if this is a component in <script setup>
|
|
// check if this is a component in <script setup>
|
|
|
const bindings = state.options.bindings
|
|
const bindings = state.options.bindings
|
|
|
- if (bindings && bindings.__isScriptSetup !== false) {
|
|
|
|
|
|
|
+ if (maybeComponent && bindings && bindings.__isScriptSetup !== false) {
|
|
|
tag =
|
|
tag =
|
|
|
checkBindingType(bindings, el.tag) ||
|
|
checkBindingType(bindings, el.tag) ||
|
|
|
checkBindingType(bindings, camelize(el.tag)) ||
|
|
checkBindingType(bindings, camelize(el.tag)) ||
|