mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-24 14:58:36 +08:00
fix(prop): update to mutable option
This commit is contained in:
@ -38,7 +38,7 @@ export class Alert {
|
||||
@Prop() subTitle: string;
|
||||
@Prop() message: string;
|
||||
@Prop() buttons: AlertButton[] = [];
|
||||
@Prop({state: true}) inputs: AlertInput[] = [];
|
||||
@Prop({ mutable: true}) inputs: AlertInput[] = [];
|
||||
@Prop() enableBackdropDismiss: boolean = true;
|
||||
|
||||
@Prop() enterAnimation: AnimationBuilder;
|
||||
|
@ -88,17 +88,17 @@ export class Checkbox {
|
||||
/*
|
||||
* @input {boolean} If true, the checkbox is checked. Default false.
|
||||
*/
|
||||
@Prop({ state: true }) checked: boolean = false;
|
||||
@Prop({ mutable: true }) checked: boolean = false;
|
||||
|
||||
/*
|
||||
* @input {boolean} If true, the user cannot interact with this element. Default false.
|
||||
*/
|
||||
@Prop({ state: true }) disabled: boolean = false;
|
||||
@Prop({ mutable: true }) disabled: boolean = false;
|
||||
|
||||
/**
|
||||
* @input {string} the value of the checkbox.
|
||||
*/
|
||||
@Prop({ state: true }) value: string;
|
||||
@Prop({ mutable: true }) value: string;
|
||||
|
||||
|
||||
ionViewWillLoad() {
|
||||
|
@ -86,7 +86,7 @@ export class Input implements InputComponent {
|
||||
/**
|
||||
* @input {boolean} If true, the value will be cleared after focus upon edit. Defaults to `true` when `type` is `"password"`, `false` for all other types.
|
||||
*/
|
||||
@Prop({ state: true }) clearOnEdit: boolean;
|
||||
@Prop({ mutable: true }) clearOnEdit: boolean;
|
||||
|
||||
/**
|
||||
* @input {boolean} If true, the user cannot interact with this element. Defaults to `false`.
|
||||
@ -184,7 +184,7 @@ export class Input implements InputComponent {
|
||||
/**
|
||||
* @input {string} The text value of the input.
|
||||
*/
|
||||
@Prop({ state: true }) value: string;
|
||||
@Prop({ mutable: true }) value: string;
|
||||
|
||||
|
||||
/**
|
||||
|
@ -100,7 +100,7 @@ export class Textarea implements TextareaComponent {
|
||||
/**
|
||||
* @input {boolean} If true, the value will be cleared after focus upon edit. Defaults to `true` when `type` is `"password"`, `false` for all other types.
|
||||
*/
|
||||
@Prop({ state: true }) clearOnEdit: boolean;
|
||||
@Prop({ mutable: true }) clearOnEdit: boolean;
|
||||
|
||||
/**
|
||||
* @input {boolean} If true, the user cannot interact with this element. Defaults to `false`.
|
||||
@ -168,7 +168,7 @@ export class Textarea implements TextareaComponent {
|
||||
/**
|
||||
* @input {string} The text value of the input.
|
||||
*/
|
||||
@Prop({ state: true }) value: string;
|
||||
@Prop({ mutable: true }) value: string;
|
||||
|
||||
/**
|
||||
* @hidden
|
||||
|
@ -76,22 +76,22 @@ export class Searchbar {
|
||||
/**
|
||||
* @input {boolean} If true, enable searchbar animation. Default `false`.
|
||||
*/
|
||||
@Prop({ state: true }) animated: boolean = false;
|
||||
@Prop({ mutable: true }) animated: boolean = false;
|
||||
|
||||
/**
|
||||
* @input {string} Set the input's autocomplete property. Values: `"on"`, `"off"`. Default `"off"`.
|
||||
*/
|
||||
@Prop({ state: true }) autocomplete: string = 'off';
|
||||
@Prop({ mutable: true }) autocomplete: string = 'off';
|
||||
|
||||
/**
|
||||
* @input {string} Set the input's autocorrect property. Values: `"on"`, `"off"`. Default `"off"`.
|
||||
*/
|
||||
@Prop({ state: true }) autocorrect: string = 'off';
|
||||
@Prop({ mutable: true }) autocorrect: string = 'off';
|
||||
|
||||
/**
|
||||
* @input {string} Set the the cancel button text. Default: `"Cancel"`.
|
||||
*/
|
||||
@Prop({ state: true }) cancelButtonText: string = 'Cancel';
|
||||
@Prop({ mutable: true }) cancelButtonText: string = 'Cancel';
|
||||
|
||||
|
||||
// _inputDebouncer: TimeoutDebouncer = new TimeoutDebouncer(0);
|
||||
@ -111,32 +111,32 @@ export class Searchbar {
|
||||
/**
|
||||
* @input {number} Set the amount of time, in milliseconds, to wait to trigger the `ionInput` event after each keystroke. Default `250`.
|
||||
*/
|
||||
@Prop({ state: true }) debounce: number = 250;
|
||||
@Prop({ mutable: true }) debounce: number = 250;
|
||||
|
||||
/**
|
||||
* @input {string} Set the input's placeholder. Default `"Search"`.
|
||||
*/
|
||||
@Prop({ state: true }) placeholder: string = 'Search';
|
||||
@Prop({ mutable: true }) placeholder: string = 'Search';
|
||||
|
||||
/**
|
||||
* @input {boolean} If true, show the cancel button. Default `false`.
|
||||
*/
|
||||
@Prop({ state: true }) showCancelButton: boolean = false;
|
||||
@Prop({ mutable: true }) showCancelButton: boolean = false;
|
||||
|
||||
/**
|
||||
* @input {boolean} If true, enable spellcheck on the input. Default `false`.
|
||||
*/
|
||||
@Prop({ state: true }) spellcheck: boolean = false;
|
||||
@Prop({ mutable: true }) spellcheck: boolean = false;
|
||||
|
||||
/**
|
||||
* @input {string} Set the type of the input. Values: `"text"`, `"password"`, `"email"`, `"number"`, `"search"`, `"tel"`, `"url"`. Default `"search"`.
|
||||
*/
|
||||
@Prop({ state: true }) type: string = 'search';
|
||||
@Prop({ mutable: true }) type: string = 'search';
|
||||
|
||||
/**
|
||||
* @input {string} Set the value of the searchbar.
|
||||
*/
|
||||
@Prop({ state: true }) value: string;
|
||||
@Prop({ mutable: true }) value: string;
|
||||
|
||||
|
||||
ionViewDidLoad() {
|
||||
|
@ -58,17 +58,17 @@ export class SegmentButton {
|
||||
/*
|
||||
* @input {boolean} If true, the button is selected. Default false.
|
||||
*/
|
||||
@Prop({ state: true }) checked: boolean = false;
|
||||
@Prop({ mutable: true }) checked: boolean = false;
|
||||
|
||||
/*
|
||||
* @input {boolean} If true, the user cannot interact with this element. Default false.
|
||||
*/
|
||||
@Prop({ state: true }) disabled: boolean = false;
|
||||
@Prop({ mutable: true }) disabled: boolean = false;
|
||||
|
||||
/**
|
||||
* @input {string} the value of the segment button. Required.
|
||||
*/
|
||||
@Prop({ state: true }) value: string;
|
||||
@Prop({ mutable: true }) value: string;
|
||||
|
||||
segmentButtonClick(ev: UIEvent) {
|
||||
ev.preventDefault();
|
||||
|
@ -76,9 +76,9 @@ export class Segment {
|
||||
|
||||
@Event() ionChange: EventEmitter;
|
||||
|
||||
@Prop({ state: true }) disabled: boolean = false;
|
||||
@Prop({ mutable: true }) disabled: boolean = false;
|
||||
|
||||
@Prop({ state: true }) value: string;
|
||||
@Prop({ mutable: true }) value: string;
|
||||
|
||||
@PropDidChange('value')
|
||||
changed(val: string) {
|
||||
|
@ -15,7 +15,7 @@ export interface SelectPopoverOption {
|
||||
export class SelectPopover {
|
||||
@Prop() options: SelectPopoverOption[];
|
||||
|
||||
@Prop({ state: true }) value: string;
|
||||
@Prop({ mutable: true }) value: string;
|
||||
|
||||
@PropDidChange('value')
|
||||
valueChanged(val: string) {
|
||||
|
@ -83,7 +83,7 @@ export class Select {
|
||||
/**
|
||||
* @input {string} the value of the select.
|
||||
*/
|
||||
@Prop({ state: true }) value: string;
|
||||
@Prop({ mutable: true }) value: string;
|
||||
|
||||
// /**
|
||||
// * @hidden
|
||||
|
@ -29,9 +29,9 @@ export class Toggle implements BooleanInputComponent {
|
||||
@Prop() color: string;
|
||||
@Prop() mode: string;
|
||||
|
||||
@Prop({ state: true }) checked: boolean = false;
|
||||
@Prop({ state: true }) disabled: boolean = false;
|
||||
@Prop({ state: true }) value: string;
|
||||
@Prop({ mutable: true }) checked: boolean = false;
|
||||
@Prop({ mutable: true }) disabled: boolean = false;
|
||||
@Prop({ mutable: true }) value: string;
|
||||
|
||||
|
||||
ionViewWillLoad() {
|
||||
|
Reference in New Issue
Block a user