提交 becec915 编写于 作者: fxy060608's avatar fxy060608 提交者: qiang

wip(uvue): 优化easycom类型

上级 b849c849
......@@ -244,18 +244,20 @@ function checkUTSEasyComAutoImports(
) {
const res = getUTSEasyComAutoImports()
Object.keys(res).forEach((fileName) => {
if (fileName.startsWith('@/')) {
fileName = fileName.slice(2)
}
const relativeFileName = parseUTSRelativeFilename(fileName, inputDir)
if (!bundle[relativeFileName]) {
const className = genClassName(relativeFileName, UVUE_CLASS_NAME_PREFIX)
ctx.emitFile({
type: 'asset',
fileName: relativeFileName,
source: `function ${className}Render(): any | null { return null }
if (fileName.endsWith('.vue') || fileName.endsWith('.uvue')) {
if (fileName.startsWith('@/')) {
fileName = fileName.slice(2)
}
const relativeFileName = parseUTSRelativeFilename(fileName, inputDir)
if (!bundle[relativeFileName]) {
const className = genClassName(relativeFileName, UVUE_CLASS_NAME_PREFIX)
ctx.emitFile({
type: 'asset',
fileName: relativeFileName,
source: `function ${className}Render(): any | null { return null }
const ${className}Styles = []`,
})
})
}
}
})
return res
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册