mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-16 10:01:59 +08:00
style(components): fix build lint errors
This commit is contained in:
@ -148,7 +148,7 @@ export class Alert {
|
||||
return playAnimationAsync(animation);
|
||||
}).then((animation) => {
|
||||
animation.destroy();
|
||||
const firstInput = this.el.querySelector('[tabindex]');
|
||||
const firstInput = this.el.querySelector('[tabindex]') as HTMLElement;
|
||||
if (firstInput) {
|
||||
firstInput.focus();
|
||||
}
|
||||
|
@ -504,7 +504,7 @@ export class Datetime {
|
||||
}
|
||||
}
|
||||
const selectedIndex = column.selectedIndex = clamp(indexMin, column.selectedIndex, indexMax);
|
||||
opt = column.options[selectedIndex];
|
||||
const opt = column.options[selectedIndex];
|
||||
if (opt) {
|
||||
return opt.value;
|
||||
}
|
||||
|
@ -7,7 +7,7 @@ export default function iosEnterAnimation(Animation: Animation, baseElm: HTMLEle
|
||||
let originY = 'top';
|
||||
let originX = 'left';
|
||||
|
||||
const contentEl = baseElm.querySelector('.popover-content');
|
||||
const contentEl = baseElm.querySelector('.popover-content') as HTMLElement;
|
||||
const contentDimentions = contentEl.getBoundingClientRect();
|
||||
const contentWidth = contentDimentions.width;
|
||||
const contentHeight = contentDimentions.height;
|
||||
@ -28,7 +28,7 @@ export default function iosEnterAnimation(Animation: Animation, baseElm: HTMLEle
|
||||
const targetWidth = (targetDim && targetDim.width) || 0;
|
||||
const targetHeight = (targetDim && targetDim.height) || 0;
|
||||
|
||||
const arrowEl = baseElm.querySelector('.popover-arrow');
|
||||
const arrowEl = baseElm.querySelector('.popover-arrow') as HTMLElement;
|
||||
|
||||
const arrowDim = arrowEl.getBoundingClientRect();
|
||||
const arrowWidth = arrowDim.width;
|
||||
|
@ -7,7 +7,7 @@ export default function mdEnterAnimation(Animation: Animation, baseElm: HTMLElem
|
||||
let originY = 'top';
|
||||
let originX = 'left';
|
||||
|
||||
const contentEl = baseElm.querySelector('.popover-content');
|
||||
const contentEl = baseElm.querySelector('.popover-content') as HTMLElement;
|
||||
const contentDimentions = contentEl.getBoundingClientRect();
|
||||
const contentWidth = contentDimentions.width;
|
||||
const contentHeight = contentDimentions.height;
|
||||
|
@ -184,7 +184,7 @@ export class Searchbar {
|
||||
* based on whether there is a value in the searchbar or not.
|
||||
*/
|
||||
inputBlurred() {
|
||||
const inputEle = this.el.querySelector('.searchbar-input');
|
||||
const inputEle = this.el.querySelector('.searchbar-input') as HTMLInputElement;
|
||||
|
||||
// _shouldBlur determines if it should blur
|
||||
// if we are clearing the input we still want to stay focused in the input
|
||||
@ -240,8 +240,8 @@ export class Searchbar {
|
||||
*/
|
||||
positionPlaceholder() {
|
||||
const isRTL = document.dir === 'rtl';
|
||||
const inputEle = this.el.querySelector('.searchbar-input');
|
||||
const iconEle = this.el.querySelector('.searchbar-search-icon');
|
||||
const inputEle = this.el.querySelector('.searchbar-input') as HTMLInputElement;
|
||||
const iconEle = this.el.querySelector('.searchbar-search-icon') as HTMLElement;
|
||||
|
||||
if (this._shouldAlignLeft) {
|
||||
inputEle.removeAttribute('style');
|
||||
@ -279,7 +279,7 @@ export class Searchbar {
|
||||
*/
|
||||
positionCancelButton() {
|
||||
const isRTL = document.dir === 'rtl';
|
||||
const cancelButton = this.el.querySelector('.searchbar-ios-cancel');
|
||||
const cancelButton = this.el.querySelector('.searchbar-ios-cancel') as HTMLElement;
|
||||
const shouldShowCancel = this.focused;
|
||||
|
||||
if (shouldShowCancel !== this._isCancelVisible) {
|
||||
|
@ -7,7 +7,7 @@ export default function iosEnterAnimation(Animation: Animation, baseElm: HTMLEle
|
||||
const baseAnimation = new Animation();
|
||||
|
||||
const wrapperAnimation = new Animation();
|
||||
const wrapperEle = baseElm.querySelector('.toast-wrapper');
|
||||
const wrapperEle = baseElm.querySelector('.toast-wrapper') as HTMLElement;
|
||||
wrapperAnimation.addElement(wrapperEle);
|
||||
|
||||
switch (position) {
|
||||
|
@ -7,7 +7,7 @@ export default function iosLeaveAnimation(Animation: Animation, baseElm: HTMLEle
|
||||
const baseAnimation = new Animation();
|
||||
|
||||
const wrapperAnimation = new Animation();
|
||||
const wrapperEle = baseElm.querySelector('.toast-wrapper');
|
||||
const wrapperEle = baseElm.querySelector('.toast-wrapper') as HTMLElement;
|
||||
wrapperAnimation.addElement(wrapperEle);
|
||||
switch (position) {
|
||||
case 'top':
|
||||
|
@ -7,7 +7,7 @@ export default function mdEnterAnimation(Animation: Animation, baseElm: HTMLElem
|
||||
const baseAnimation = new Animation();
|
||||
|
||||
const wrapperAnimation = new Animation();
|
||||
const wrapperEle = baseElm.querySelector('.toast-wrapper');
|
||||
const wrapperEle = baseElm.querySelector('.toast-wrapper') as HTMLElement;
|
||||
wrapperAnimation.addElement(wrapperEle);
|
||||
|
||||
switch (position) {
|
||||
|
@ -7,7 +7,7 @@ export default function mdLeaveAnimation(Animation: Animation, baseElm: HTMLElem
|
||||
const baseAnimation = new Animation();
|
||||
|
||||
const wrapperAnimation = new Animation();
|
||||
const wrapperEle = baseElm.querySelector('.toast-wrapper');
|
||||
const wrapperEle = baseElm.querySelector('.toast-wrapper') as HTMLElement;
|
||||
wrapperAnimation.addElement(wrapperEle);
|
||||
|
||||
switch (position) {
|
||||
|
Reference in New Issue
Block a user