有没有办法在 ExtReact 中动态更改主题?
Is there a way to dynamically change theme in ExtReact?
我知道在 ExtJS 中有一种动态更改主题的方法,通过使用现代工具包的 Material 主题的 Fashion。
有没有办法在 ExtReact 中完成此操作?
我还没找到。由于切换主题的代码是由 Sencha 提供的,所以它在 ExtReact 中应该与在 ExtJS 中的相同位置可用。
但是,在 ExtJS modern kitchen sink 中,您可以像这样切换到深色模式:
Ext.theme.Material.setDarkMode(true)
在 ExtReact kitchen sink 中,您不能:
Ext.theme.Material.setDarkMode(true)
Uncaught ReferenceError: Fashion is not defined (ext.js?4ab9c69b8b9cea6d6cdb:1)
at constructor.hasFashion (ext.js?4ab9c69b8b9cea6d6cdb:1)
at constructor.setDarkMode (ext.js?4ab9c69b8b9cea6d6cdb:1)
at <anonymous>:1:20
我知道在 ExtJS 中有一种动态更改主题的方法,通过使用现代工具包的 Material 主题的 Fashion。
有没有办法在 ExtReact 中完成此操作?
我还没找到。由于切换主题的代码是由 Sencha 提供的,所以它在 ExtReact 中应该与在 ExtJS 中的相同位置可用。
但是,在 ExtJS modern kitchen sink 中,您可以像这样切换到深色模式:
Ext.theme.Material.setDarkMode(true)
在 ExtReact kitchen sink 中,您不能:
Ext.theme.Material.setDarkMode(true)
Uncaught ReferenceError: Fashion is not defined (ext.js?4ab9c69b8b9cea6d6cdb:1)
at constructor.hasFashion (ext.js?4ab9c69b8b9cea6d6cdb:1)
at constructor.setDarkMode (ext.js?4ab9c69b8b9cea6d6cdb:1)
at <anonymous>:1:20