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

建议将用jquery动态查找link标签的逻辑给去除掉,在微前端应用中会出现问题 #75

Closed
the-didi opened this issue Nov 7, 2023 · 6 comments

Comments

@the-didi
Copy link
Contributor

the-didi commented Nov 7, 2023

Tencent/wujie#726

@Xavier9896
Copy link
Collaborator

r = $('link[media=print][href*="print-lock.css"]');

r = $('link[media=print][href*="print-lock.css"]'),

你指的是这两处吗?

@the-didi
Copy link
Contributor Author

the-didi commented Nov 7, 2023

r = $('link[media=print][href*="print-lock.css"]');

r = $('link[media=print][href*="print-lock.css"]'),

你指的是这两处吗?

是的

@CcSimple
Copy link
Owner

CcSimple commented Nov 8, 2023

查找? 查找有没有 还会出问题?

看你原文,是因为你自己 print-lock.css 是动态插入的呀...

@the-didi
Copy link
Contributor Author

the-didi commented Nov 8, 2023

查找? 查找有没有 还会出问题?

看你原文,是因为你自己 print-lock.css 是动态插入的呀...

你好,在wujie测试中,不是动态插入也会被转换,这个和动态插入没关系,这里我的解决方法是将wujie的shadow-root用innerHTML替换的方式加上去。不知道其他微前端框架【比如乾坤】有没有类似的问题。wujie中官网说是有办法可以自定义这个replace的钩子,我没试出来,后续有人试出来了可以在这里滴滴我一下

@killdada
Copy link

killdada commented Aug 6, 2024

image
无界二种方式可解决

@Xavier9896
Copy link
Collaborator

这个问题可能已经过时了,我将会关闭它,如果问题仍然存在你可以重新打开或重新发起一个新的反馈。

@Xavier9896 Xavier9896 pinned this issue Oct 31, 2024
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

No branches or pull requests

4 participants