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

feat: support isCustomElement, isNativeTag (#3133)

上级 743c8786
......@@ -61,8 +61,32 @@ export function initPluginVueOptions(
if (miniProgram) {
;(compilerOptions as any).miniProgram = miniProgram
}
compilerOptions.isNativeTag = isNativeTag
compilerOptions.isCustomElement = isCustomElement
if (isNativeTag) {
const userIsNativeTag = compilerOptions.isNativeTag
compilerOptions.isNativeTag = (tag) => {
if (isNativeTag(tag)) {
return true
}
if (userIsNativeTag && userIsNativeTag(tag)) {
return true
}
return false
}
}
if (isCustomElement) {
const userIsCustomElement = compilerOptions.isCustomElement
compilerOptions.isCustomElement = (tag) => {
if (isCustomElement(tag)) {
return true
}
if (userIsCustomElement && userIsCustomElement(tag)) {
return true
}
return false
}
}
compilerOptions.directiveTransforms = {
...compilerOptions.directiveTransforms,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册