wip: make <script setup>
closed by default
This commit is contained in:
parent
468e0d95cf
commit
a603d56970
@ -816,13 +816,14 @@ export function compileScript(
|
|||||||
s.appendRight(endOffset, `\nreturn ${returned}\n}\n\n`)
|
s.appendRight(endOffset, `\nreturn ${returned}\n}\n\n`)
|
||||||
|
|
||||||
// 11. finalize default export
|
// 11. finalize default export
|
||||||
let runtimeOptions = ``
|
// expose: [] makes <script setup> components "closed" by default.
|
||||||
|
let runtimeOptions = `\n expose: [],`
|
||||||
if (optionsArg) {
|
if (optionsArg) {
|
||||||
runtimeOptions = `\n ${scriptSetup.content
|
runtimeOptions += `\n ${scriptSetup.content
|
||||||
.slice(optionsArg.start! + 1, optionsArg.end! - 1)
|
.slice(optionsArg.start! + 1, optionsArg.end! - 1)
|
||||||
.trim()},`
|
.trim()},`
|
||||||
} else if (optionsType) {
|
} else if (optionsType) {
|
||||||
runtimeOptions =
|
runtimeOptions +=
|
||||||
genRuntimeProps(typeDeclaredProps) + genRuntimeEmits(typeDeclaredEmits)
|
genRuntimeProps(typeDeclaredProps) + genRuntimeEmits(typeDeclaredEmits)
|
||||||
}
|
}
|
||||||
if (isTS) {
|
if (isTS) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user