mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-18 19:21:34 +08:00
style(): fix shadowed vars (#24609)
This commit is contained in:
@ -290,14 +290,14 @@ export class Modal implements ComponentInterface, OverlayInterface {
|
|||||||
const triggerEl = (trigger !== undefined) ? document.getElementById(trigger) : null;
|
const triggerEl = (trigger !== undefined) ? document.getElementById(trigger) : null;
|
||||||
if (!triggerEl) { return; }
|
if (!triggerEl) { return; }
|
||||||
|
|
||||||
const configureTriggerInteraction = (triggerEl: HTMLElement, modalEl: HTMLIonModalElement) => {
|
const configureTriggerInteraction = (trigEl: HTMLElement, modalEl: HTMLIonModalElement) => {
|
||||||
const openModal = () => {
|
const openModal = () => {
|
||||||
modalEl.present();
|
modalEl.present();
|
||||||
}
|
}
|
||||||
triggerEl.addEventListener('click', openModal);
|
trigEl.addEventListener('click', openModal);
|
||||||
|
|
||||||
return () => {
|
return () => {
|
||||||
triggerEl.removeEventListener('click', openModal);
|
trigEl.removeEventListener('click', openModal);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -374,6 +374,7 @@ export class PickerInternal implements ComponentInterface {
|
|||||||
const lastColumn = numericPickers[1];
|
const lastColumn = numericPickers[1];
|
||||||
|
|
||||||
let value = inputEl.value;
|
let value = inputEl.value;
|
||||||
|
let minuteValue;
|
||||||
switch (value.length) {
|
switch (value.length) {
|
||||||
case 1:
|
case 1:
|
||||||
this.searchColumn(firstColumn, value);
|
this.searchColumn(firstColumn, value);
|
||||||
@ -396,7 +397,7 @@ export class PickerInternal implements ComponentInterface {
|
|||||||
* for a match in the minutes column
|
* for a match in the minutes column
|
||||||
*/
|
*/
|
||||||
if (value.length === 1) {
|
if (value.length === 1) {
|
||||||
const minuteValue = inputEl.value.substring(inputEl.value.length - 1);
|
minuteValue = inputEl.value.substring(inputEl.value.length - 1);
|
||||||
this.searchColumn(lastColumn, minuteValue, 'end');
|
this.searchColumn(lastColumn, minuteValue, 'end');
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -417,7 +418,7 @@ export class PickerInternal implements ComponentInterface {
|
|||||||
* we can check the second value
|
* we can check the second value
|
||||||
* for a match in the minutes column
|
* for a match in the minutes column
|
||||||
*/
|
*/
|
||||||
const minuteValue = (value.length === 1) ? inputEl.value.substring(1) : inputEl.value.substring(2);
|
minuteValue = (value.length === 1) ? inputEl.value.substring(1) : inputEl.value.substring(2);
|
||||||
|
|
||||||
this.searchColumn(lastColumn, minuteValue, 'end');
|
this.searchColumn(lastColumn, minuteValue, 'end');
|
||||||
break;
|
break;
|
||||||
|
@ -177,7 +177,7 @@ export class Radio implements ComponentInterface {
|
|||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
tabindex="-1"
|
tabindex="-1"
|
||||||
id={inputId}
|
id={inputId}
|
||||||
ref={el => this.nativeInput = el as HTMLInputElement}
|
ref={nativeEl => this.nativeInput = nativeEl as HTMLInputElement}
|
||||||
/>
|
/>
|
||||||
</Host>
|
</Host>
|
||||||
);
|
);
|
||||||
|
@ -552,8 +552,8 @@ interface RangeKnob {
|
|||||||
handleKeyboard: (name: KnobName, isIncrease: boolean) => void;
|
handleKeyboard: (name: KnobName, isIncrease: boolean) => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
const renderKnob = (isRTL: boolean, { knob, value, ratio, min, max, disabled, pressed, pin, handleKeyboard, labelText, pinFormatter }: RangeKnob) => {
|
const renderKnob = (rtl: boolean, { knob, value, ratio, min, max, disabled, pressed, pin, handleKeyboard, labelText, pinFormatter }: RangeKnob) => {
|
||||||
const start = isRTL ? 'right' : 'left';
|
const start = rtl ? 'right' : 'left';
|
||||||
|
|
||||||
const knobStyle = () => {
|
const knobStyle = () => {
|
||||||
const style: any = {};
|
const style: any = {};
|
||||||
|
@ -225,13 +225,13 @@ export class Toggle implements ComponentInterface {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const shouldToggle = (isRTL: boolean, checked: boolean, deltaX: number, margin: number): boolean => {
|
const shouldToggle = (rtl: boolean, checked: boolean, deltaX: number, margin: number): boolean => {
|
||||||
if (checked) {
|
if (checked) {
|
||||||
return (!isRTL && (margin > deltaX)) ||
|
return (!rtl && (margin > deltaX)) ||
|
||||||
(isRTL && (- margin < deltaX));
|
(rtl && (- margin < deltaX));
|
||||||
} else {
|
} else {
|
||||||
return (!isRTL && (- margin < deltaX)) ||
|
return (!rtl && (- margin < deltaX)) ||
|
||||||
(isRTL && (margin > deltaX));
|
(rtl && (margin > deltaX));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user