diff --git a/src/ui-switch.component.ts b/src/ui-switch.component.ts index 32a11c5..1ccb99d 100644 --- a/src/ui-switch.component.ts +++ b/src/ui-switch.component.ts @@ -148,7 +148,7 @@ export class UiSwitchComponent implements ControlValueAccessor { defaultBgColor: string = '#fff'; defaultBoColor: string = '#dfdfdf'; - getColor(flag) { + getColor(flag?:string) { if (flag === 'borderColor') return this.defaultBoColor; if (flag === 'switchColor') { if (this.reverse) return !this.checked ? this.switchColor : this.switchOffColor || this.switchColor;