提交 7b215b81 编写于 作者: Q qiang

fix: options with mp

上级 932d04b6
......@@ -111,7 +111,7 @@ const compilerModule = {
if (process.env.UNI_PLATFORM === 'quickapp-native') {
// 排查所有标签
(options.isUnaryTag.autoComponents || (options.isUnaryTag.autoComponents = new Set())).add(el.tag)
} else if (isComponent(el.tag, options.mp.platform) && el.tag !== 'App') { // App.vue
} else if (isComponent(el.tag, options.mp && options.mp.platform) && el.tag !== 'App') { // App.vue
// 挂在 isUnaryTag 上边,可以保证外部访问到
(options.isUnaryTag.autoComponents || (options.isUnaryTag.autoComponents = new Set())).add(el.tag)
}
......
......@@ -67,7 +67,7 @@ module.exports = {
options.optimize = false // 启用 staticRenderFns
// domProps => attrs
options.mustUseProp = () => false
options.isReservedTag = (tagName) => !isComponent(tagName, options.mp.platform) // 非组件均为内置
options.isReservedTag = (tagName) => !isComponent(tagName, options.mp && options.mp.platform) // 非组件均为内置
options.getTagNamespace = () => false
try {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册