fix 打包后无法切换样式模式的问题
This commit is contained in:
@@ -4,3 +4,8 @@
|
||||
body {
|
||||
line-height: 1.42857143;
|
||||
}
|
||||
#root {
|
||||
transition: @animation-duration-slow opacity;
|
||||
|
||||
opacity: 1 !important;
|
||||
}
|
||||
|
||||
@@ -4,3 +4,8 @@
|
||||
body {
|
||||
line-height: 1.42857143;
|
||||
}
|
||||
#root {
|
||||
transition: @animation-duration-slow opacity;
|
||||
|
||||
opacity: 1 !important;
|
||||
}
|
||||
|
||||
@@ -15,15 +15,18 @@ const SETTING = JSON.parse(window.localStorage.getItem(SETTING_KEY)) || {
|
||||
};
|
||||
|
||||
if (SETTING.theme === 'dark') {
|
||||
require('./assets/style/dark/index.less')
|
||||
import('./assets/style/dark/index.less')
|
||||
} else {
|
||||
require('./assets/style/default/index.less')
|
||||
import('./assets/style/default/index.less')
|
||||
}
|
||||
|
||||
moment.locale('zh-cn')
|
||||
|
||||
//<React.StrictMode></React.StrictMode>
|
||||
|
||||
const root = document.getElementById('root')
|
||||
root.style.opacity = 0
|
||||
|
||||
ReactDOM.render(
|
||||
<ConfigProvider
|
||||
locale={zhCN}
|
||||
@@ -38,7 +41,7 @@ ReactDOM.render(
|
||||
>
|
||||
<Router />
|
||||
</ConfigProvider>,
|
||||
document.getElementById('root')
|
||||
root
|
||||
);
|
||||
|
||||
// If you want to start measuring performance in your app, pass a function
|
||||
|
||||
Reference in New Issue
Block a user