youzan / vant-weapp

轻量、可靠的小程序 UI 组件库
https://vant.pro/vant-weapp/
MIT License
17.77k stars 3.48k forks source link

[控制台黄色提示]addGlobalClass选项已被弃用。。。 #5809

Closed talmudmaster closed 4 months ago

talmudmaster commented 5 months ago

重现链接

按钮

Vant Weapp 版本

1.11.6

描述一下你遇到的问题。

引入vant weapp并使用相关样式,控制台会有多个相同的黄色提示,该如何解决?

控制台黄色提示:

Dynamic addGlobalClass option in component definition of "miniprogram_npm/@vant/weapp/loading/index" have been deprecated, and will NOT take effect in glass-easel. Consider migrating this option to component static config (miniprogram_npm/@vant/weapp/loading/index.json) by adding { "styleIsolation": "apply-shared"}

重现步骤

引入vant weapp并使用相关样式,控制台会有多个相同的黄色提示,该如何解决?

设备/浏览器

No response

TLovers commented 5 months ago

是不是开启了 "renderer": "skyline", 如果是的话,好像是有这个问题

landluck commented 5 months ago

skyline 模式暂时还没有适配。skyline 组件库现在也用不了

talmudmaster commented 5 months ago

感谢大伙的解答,期待之后的适配

解决方法:删掉 app.json 中的 "renderer": "skyline", 就行了