mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
chore: default tabs
This commit is contained in:
@@ -6,33 +6,33 @@ import { Switch as SwitchDefinition } from '.';
|
||||
|
||||
@CSSType('Switch')
|
||||
export class SwitchBase extends View implements SwitchDefinition {
|
||||
public static checkedChangeEvent = 'checkedChange';
|
||||
public static checkedChangeEvent = 'checkedChange';
|
||||
|
||||
public checked: boolean;
|
||||
public offBackgroundColor: Color;
|
||||
public checked: boolean;
|
||||
public offBackgroundColor: Color;
|
||||
|
||||
_onCheckedPropertyChanged(newValue: boolean) {
|
||||
//
|
||||
}
|
||||
_onCheckedPropertyChanged(newValue: boolean) {
|
||||
//
|
||||
}
|
||||
}
|
||||
|
||||
SwitchBase.prototype.recycleNativeView = 'auto';
|
||||
|
||||
function onCheckedPropertyChanged(switchBase: SwitchBase, oldValue: boolean, newValue: boolean) {
|
||||
switchBase._onCheckedPropertyChanged(newValue);
|
||||
switchBase._onCheckedPropertyChanged(newValue);
|
||||
}
|
||||
|
||||
export const checkedProperty = new Property<SwitchBase, boolean>({
|
||||
name: 'checked',
|
||||
defaultValue: false,
|
||||
valueConverter: booleanConverter,
|
||||
valueChanged: onCheckedPropertyChanged,
|
||||
name: 'checked',
|
||||
defaultValue: false,
|
||||
valueConverter: booleanConverter,
|
||||
valueChanged: onCheckedPropertyChanged,
|
||||
});
|
||||
checkedProperty.register(SwitchBase);
|
||||
|
||||
export const offBackgroundColorProperty = new Property<SwitchBase, Color>({
|
||||
name: 'offBackgroundColor',
|
||||
equalityComparer: Color.equals,
|
||||
valueConverter: (v) => new Color(v),
|
||||
name: 'offBackgroundColor',
|
||||
equalityComparer: Color.equals,
|
||||
valueConverter: (v) => new Color(v),
|
||||
});
|
||||
offBackgroundColorProperty.register(SwitchBase);
|
||||
|
||||
Reference in New Issue
Block a user