-
Notifications
You must be signed in to change notification settings - Fork 380
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: processShowStyle 添加是否为 virtualHost 的判断 #1777
base: master
Are you sure you want to change the base?
Conversation
const setUsingComponentInfo = (name, moduleId, hasVirtualHost) => { | ||
usingComponentsInfo[name] = { | ||
mid: moduleId, | ||
hvh: hasVirtualHost |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这简写意义不明
@@ -78,8 +78,11 @@ module.exports = function ({ | |||
componentGenerics = Object.assign({}, ret.componentGenerics) | |||
} | |||
if (usingComponents) { | |||
const setUsingComponentInfo = (name, moduleId) => { | |||
usingComponentsInfo[name] = { mid: moduleId } | |||
const setUsingComponentInfo = (name, moduleId, hasVirtualHost) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
name, info即可
@@ -2189,6 +2189,10 @@ function isComponentNode (el, options) { | |||
return usingComponents.indexOf(el.tag) !== -1 || el.tag === 'component' | |||
} | |||
|
|||
function isVirtualHostNode (el, options) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
封一个方法 getComponentInfo吧
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isComponentNode 无效参数options删除
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
usingComponentsInfo作为闭包变量,与usingComponents拉齐
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
之前获取mid的逻辑也使用getComponentInfo获取,另外移除无效的||moduleId兜底
processShowStyle 添加是否为 virtualHost 的判断