Skip to content
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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Blackgan3
Copy link
Collaborator

processShowStyle 添加是否为 virtualHost 的判断

const setUsingComponentInfo = (name, moduleId, hasVirtualHost) => {
usingComponentsInfo[name] = {
mid: moduleId,
hvh: hasVirtualHost
Copy link
Collaborator

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) => {
Copy link
Collaborator

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) {
Copy link
Collaborator

@hiyuki hiyuki Dec 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

封一个方法 getComponentInfo吧

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isComponentNode 无效参数options删除

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

usingComponentsInfo作为闭包变量,与usingComponents拉齐

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

之前获取mid的逻辑也使用getComponentInfo获取,另外移除无效的||moduleId兜底

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants