mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-09 16:16:41 +08:00
feat(checkbox): add checkbox, consistent function names
This commit is contained in:
@ -31,8 +31,8 @@ export interface InputBaseComponent {
|
||||
inputFocused: (ev: any) => void;
|
||||
inputKeydown: (ev: any) => void;
|
||||
|
||||
setDisabled: (ev: any) => void;
|
||||
setValue: (ev: any) => void;
|
||||
disabledChanged: (ev: any) => void;
|
||||
valueChanged: (ev: any) => void;
|
||||
}
|
||||
|
||||
export interface InputComponent extends InputBaseComponent {
|
||||
@ -51,7 +51,7 @@ export interface InputComponent extends InputBaseComponent {
|
||||
size: number;
|
||||
type: string;
|
||||
|
||||
setChecked: (ev: any) => void;
|
||||
checkedChanged: (ev: any) => void;
|
||||
}
|
||||
|
||||
export interface TextareaComponent extends InputBaseComponent {
|
||||
|
||||
@ -73,7 +73,7 @@ export class Input implements InputComponent {
|
||||
* @hidden
|
||||
*/
|
||||
@PropDidChange('checked')
|
||||
setChecked() {
|
||||
checkedChanged() {
|
||||
this.emitStyle();
|
||||
}
|
||||
|
||||
@ -97,7 +97,7 @@ export class Input implements InputComponent {
|
||||
* @hidden
|
||||
*/
|
||||
@PropDidChange('disabled')
|
||||
setDisabled() {
|
||||
disabledChanged() {
|
||||
this.emitStyle();
|
||||
}
|
||||
|
||||
@ -192,7 +192,7 @@ export class Input implements InputComponent {
|
||||
* Update the native input element when the value changes
|
||||
*/
|
||||
@PropDidChange('value')
|
||||
setValue() {
|
||||
valueChanged() {
|
||||
const inputEl = this.el.querySelector('input');
|
||||
if (inputEl.value !== this.value) {
|
||||
inputEl.value = this.value;
|
||||
|
||||
@ -111,7 +111,7 @@ export class Textarea implements TextareaComponent {
|
||||
* @hidden
|
||||
*/
|
||||
@PropDidChange('disabled')
|
||||
setDisabled() {
|
||||
disabledChanged() {
|
||||
this.emitStyle();
|
||||
}
|
||||
|
||||
@ -175,7 +175,7 @@ export class Textarea implements TextareaComponent {
|
||||
* Update the native input element when the value changes
|
||||
*/
|
||||
@PropDidChange('value')
|
||||
setValue() {
|
||||
valueChanged() {
|
||||
const inputEl = this.el.querySelector('textarea');
|
||||
if (inputEl.value !== this.value) {
|
||||
inputEl.value = this.value;
|
||||
|
||||
Reference in New Issue
Block a user