mirror of
https://github.com/jeecgboot/JeecgBoot.git
synced 2025-12-20 04:36:29 +08:00
JeecgBoot 2.1.1 代码生成器AI版本发布
This commit is contained in:
@ -40,23 +40,23 @@ const updateTheme = primaryColor => {
|
||||
return;
|
||||
}
|
||||
const hideMessage = message.loading('正在编译主题!', 0);
|
||||
console.info(`正在编译主题!`)
|
||||
function buildIt() {
|
||||
if (!window.less) {
|
||||
// 正确的判定less是否已经加载less.modifyVars可用
|
||||
if (!window.less || !window.less.modifyVars) {
|
||||
return;
|
||||
}
|
||||
setTimeout(() => {
|
||||
window.less
|
||||
.modifyVars({
|
||||
'@primary-color': primaryColor,
|
||||
})
|
||||
.then(() => {
|
||||
hideMessage();
|
||||
})
|
||||
.catch(() => {
|
||||
message.error('Failed to update theme');
|
||||
hideMessage();
|
||||
});
|
||||
}, 200);
|
||||
// less.modifyVars可用
|
||||
window.less.modifyVars({
|
||||
'@primary-color': primaryColor,
|
||||
})
|
||||
.then(() => {
|
||||
hideMessage();
|
||||
})
|
||||
.catch(() => {
|
||||
message.error('Failed to update theme');
|
||||
hideMessage();
|
||||
});
|
||||
}
|
||||
if (!lessNodesAppended) {
|
||||
// insert less.js and color.less
|
||||
|
||||
Reference in New Issue
Block a user