You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
duoji-frontend/src/plugins/themePicker.js

19 lines
477 B
JavaScript

import less from './less';
// 更换antd主题色
export const changeTheme = (color) => {
console.log(less, color);
less
.modifyVars({
'@primary-color': color,
'@link-color': color,
'@btn-primary-bg': color
})
.then(() => {
console.log('antd主题颜色成功')
})
.catch(error => {
console.error('antd主题颜色失败')
console.error(error)
})
}