fix
parent
ef7033cac0
commit
fdd19068a8
|
@ -62,7 +62,7 @@ const defaultSetting: LX.AppSetting = {
|
|||
'desktopLyric.style.lineGap': 15,
|
||||
'desktopLyric.style.lyricUnplayColor': 'rgba(255, 255, 255, 1)',
|
||||
'desktopLyric.style.lyricPlayedColor': 'rgba(7, 197, 86, 1)',
|
||||
'desktopLyric.style.lyricShadowColor': 'rgba(0, 0, 0, 0.15)',
|
||||
'desktopLyric.style.lyricShadowColor': 'rgba(0, 0, 0, 0.18)',
|
||||
// 'desktopLyric.style.fontWeight': false,
|
||||
'desktopLyric.style.opacity': 95,
|
||||
'desktopLyric.style.ellipsis': false,
|
||||
|
|
|
@ -4,7 +4,7 @@ import '@simonwep/pickr/dist/themes/classic.min.css'
|
|||
|
||||
export interface PickrTools {
|
||||
pickr: Pickr | null
|
||||
create: (dom: HTMLElement, color: string, swatches: string[] | null, change: (color: string) => void, reset: () => void) => PickrTools
|
||||
create: (dom: HTMLElement, color: string, swatches: string[] | null, change: (color: string) => void, reset?: () => void) => PickrTools
|
||||
destroy: () => void
|
||||
setColor: (color: string) => void
|
||||
}
|
||||
|
@ -72,10 +72,9 @@ export const pickrTools: PickrTools = {
|
|||
pickrTools.pickr.on('swatchselect', (color: any) => {
|
||||
swatchselectColor = color
|
||||
}).on('change', throttleChange).on('cancel', () => {
|
||||
change(color)
|
||||
console.log('cancel')
|
||||
}).on('cancel', () => {
|
||||
reset()
|
||||
change(color)
|
||||
reset?.()
|
||||
})
|
||||
|
||||
return pickrTools
|
||||
|
|
|
@ -215,7 +215,7 @@ const useLyricColor = () => {
|
|||
const defaultSetting = {
|
||||
'desktopLyric.style.lyricUnplayColor': 'rgba(255, 255, 255, 1)',
|
||||
'desktopLyric.style.lyricPlayedColor': 'rgba(7, 197, 86, 1)',
|
||||
'desktopLyric.style.lyricShadowColor': 'rgba(0, 0, 0, 0.15)',
|
||||
'desktopLyric.style.lyricShadowColor': 'rgba(0, 0, 0, 0.18)',
|
||||
}
|
||||
updateSetting(defaultSetting)
|
||||
setLyricUnplayColor(defaultSetting['desktopLyric.style.lyricUnplayColor'])
|
||||
|
|
Loading…
Reference in New Issue