parent
54e6a72f3a
commit
066ab7ec22
13 changed files with 107 additions and 19 deletions
@ -0,0 +1,4 @@ |
|||||||
|
@import "../theme"; |
||||||
|
@primary-color: @primary; |
||||||
|
@processing-color: @primary; |
||||||
|
@link-color: @primary; |
@ -0,0 +1 @@ |
|||||||
|
@import "color"; |
@ -0,0 +1,2 @@ |
|||||||
|
@import '~ant-design-vue/dist/antd.less'; |
||||||
|
@import "default/index"; |
@ -0,0 +1 @@ |
|||||||
|
@primary: #1890ff; |
@ -0,0 +1,17 @@ |
|||||||
|
import client from 'webpack-theme-color-replacer/client' |
||||||
|
import generate from '@ant-design/colors/lib/generate' |
||||||
|
|
||||||
|
export default { |
||||||
|
primaryColor: '#1890ff', |
||||||
|
changeThemeColor (newColor) { |
||||||
|
let lastColor = this.lastColor || this.primaryColor |
||||||
|
let options = { |
||||||
|
cssUrl: '/css/theme-colors.css', |
||||||
|
oldColors: generate(lastColor), |
||||||
|
newColors: generate(newColor) |
||||||
|
} |
||||||
|
let promise = client.changer.changeColor(options) |
||||||
|
this.lastColor = lastColor |
||||||
|
return promise |
||||||
|
} |
||||||
|
} |
Loading…
Reference in new issue