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: Fixed the problem that the cssText attribute cannot be obtained … #2532

Merged
merged 2 commits into from
Jun 28, 2023

Conversation

aique127
Copy link
Contributor

@aique127 aique127 commented Jun 13, 2023

Checklist
  • npm test passes
  • tests are included
  • documentation is changed or added
  • commit message follows commit guidelines
Description of change

fix: Fixed the problem that the cssText attribute cannot be obtained when @keyfram has a -webkit prefix style in IE11

ie11环境下,当@Keyframe带有-webkit-私有前缀时,使用cssRules获取不到cssText导致报错: 找不到成员。
例如使用autoprefixe插件自动添加前缀

// 转换前
@keyframes donghua {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}
// autoprefixe插件转换后
@keyframes donghua {
    from {
        transform: rotate(0deg);
        -webkit-transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
        -webkit-transform: rotate(360deg);
    }
}

希望能在qiankun代码里进行错误捕获。防止获取cssText报错

@vercel
Copy link

vercel bot commented Jun 13, 2023

@aique127 is attempting to deploy a commit to a Personal Account owned by @umijs on Vercel.

@umijs first needs to authorize it.

@wangdaodao
Copy link

期待早日合并:)

@@ -102,7 +102,12 @@ export class ScopedCSS {
css += this.ruleSupport(rule as CSSSupportsRule, prefix);
break;
default:
css += `${rule.cssText}`;
try {
Copy link
Member

Choose a reason for hiding this comment

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

不建议这里 try catch,可以参考这个方案修复 https://github.com/gregnb/react-to-print/pull/99/files

Copy link
Contributor Author

Choose a reason for hiding this comment

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

已经重新提交了:)

@vercel
Copy link

vercel bot commented Jun 27, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
qiankun 🔄 Building (Inspect) Jun 27, 2023 2:11pm

@aique127
Copy link
Contributor Author

@kuitos 大佬,我重新提交了。

@aique127 aique127 requested a review from kuitos June 28, 2023 02:21
Copy link
Member

@kuitos kuitos left a comment

Choose a reason for hiding this comment

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

Nice work~

@kuitos kuitos merged commit becb7ad into umijs:master Jun 28, 2023
@github-actions
Copy link

感谢 PR!如果有兴趣一起参与维护 Qiankun,可加入我们的 Qiankun Contributors 群。加入方式是先用钉钉扫下方二维码加我钉钉,记得注明 github id,然后我会拉你到群里。

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