mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-09 16:16:41 +08:00
chore(): sync
This commit is contained in:
@ -1,13 +1,13 @@
|
||||
import type { ComponentInterface } from '@stencil/core';
|
||||
import { Component, Element, Host, Prop, h } from '@stencil/core';
|
||||
import { ENABLE_HTML_CONTENT_DEFAULT } from '@utils/config';
|
||||
import { isPlatform } from '@utils/platform';
|
||||
import { sanitizeDOMString } from '@utils/sanitization';
|
||||
import { arrowDown, caretBackSharp } from 'ionicons/icons';
|
||||
|
||||
import { config } from '../../global/config';
|
||||
import { getIonMode } from '../../global/ionic-global';
|
||||
import type { IonicSafeString } from '../../utils/sanitization';
|
||||
import { supportsRubberBandScrolling } from '../refresher/refresher.utils';
|
||||
import type { SpinnerTypes } from '../spinner/spinner-configs';
|
||||
import { SPINNERS } from '../spinner/spinner-configs';
|
||||
|
||||
@ -63,11 +63,17 @@ export class RefresherContent implements ComponentInterface {
|
||||
|
||||
componentWillLoad() {
|
||||
if (this.pullingIcon === undefined) {
|
||||
/**
|
||||
* The native iOS refresher uses a spinner instead of
|
||||
* an icon, so we need to see if this device supports
|
||||
* the native iOS refresher.
|
||||
*/
|
||||
const hasRubberBandScrolling = supportsRubberBandScrolling();
|
||||
const mode = getIonMode(this);
|
||||
const overflowRefresher = (this.el.style as any).webkitOverflowScrolling !== undefined ? 'lines' : arrowDown;
|
||||
const overflowRefresher = hasRubberBandScrolling ? 'lines' : arrowDown;
|
||||
this.pullingIcon = config.get(
|
||||
'refreshingIcon',
|
||||
mode === 'ios' && isPlatform('mobile') ? config.get('spinner', overflowRefresher) : 'circular'
|
||||
mode === 'ios' && hasRubberBandScrolling ? config.get('spinner', overflowRefresher) : 'circular'
|
||||
);
|
||||
}
|
||||
if (this.refreshingSpinner === undefined) {
|
||||
|
||||
Reference in New Issue
Block a user