mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-09 16:16:41 +08:00
fix(refresher): import icons to avoid errors in react and vue (#24525)
resolves #24480
This commit is contained in:
@ -1,4 +1,5 @@
|
|||||||
import { Component, ComponentInterface, Element, Host, Prop, h } from '@stencil/core';
|
import { Component, ComponentInterface, Element, Host, Prop, h } from '@stencil/core';
|
||||||
|
import { arrowDown, caretBackSharp } from 'ionicons/icons';
|
||||||
|
|
||||||
import { config } from '../../global/config';
|
import { config } from '../../global/config';
|
||||||
import { getIonMode } from '../../global/ionic-global';
|
import { getIonMode } from '../../global/ionic-global';
|
||||||
@ -51,7 +52,7 @@ export class RefresherContent implements ComponentInterface {
|
|||||||
componentWillLoad() {
|
componentWillLoad() {
|
||||||
if (this.pullingIcon === undefined) {
|
if (this.pullingIcon === undefined) {
|
||||||
const mode = getIonMode(this);
|
const mode = getIonMode(this);
|
||||||
const overflowRefresher = (this.el.style as any).webkitOverflowScrolling !== undefined ? 'lines' : 'arrow-down';
|
const overflowRefresher = (this.el.style as any).webkitOverflowScrolling !== undefined ? 'lines' : arrowDown;
|
||||||
this.pullingIcon = config.get(
|
this.pullingIcon = config.get(
|
||||||
'refreshingIcon',
|
'refreshingIcon',
|
||||||
mode === 'ios' && isPlatform('mobile') ? config.get('spinner', overflowRefresher) : 'circular'
|
mode === 'ios' && isPlatform('mobile') ? config.get('spinner', overflowRefresher) : 'circular'
|
||||||
@ -80,7 +81,7 @@ export class RefresherContent implements ComponentInterface {
|
|||||||
<ion-spinner name={this.pullingIcon as SpinnerTypes} paused></ion-spinner>
|
<ion-spinner name={this.pullingIcon as SpinnerTypes} paused></ion-spinner>
|
||||||
{mode === 'md' && this.pullingIcon === 'circular' &&
|
{mode === 'md' && this.pullingIcon === 'circular' &&
|
||||||
<div class="arrow-container">
|
<div class="arrow-container">
|
||||||
<ion-icon name="caret-back-sharp"></ion-icon>
|
<ion-icon icon={caretBackSharp}></ion-icon>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user