mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-09 16:16:41 +08:00
fix(): update to Stencil One 🎉🎊
This commit is contained in:
@ -17,6 +17,21 @@ The refresher content contains the text, icon and spinner to display during a pu
|
||||
| `refreshingText` | `refreshing-text` | The text you want to display when performing a refresh. `refreshingText` can accept either plaintext or HTML as a string. To display characters normally reserved for HTML, they must be escaped. For example `<Ionic>` would become `<Ionic>` For more information: [Security Documentation](https://ionicframework.com/docs/faq/security) | `string \| undefined` | `undefined` |
|
||||
|
||||
|
||||
## Dependencies
|
||||
|
||||
### Depends on
|
||||
|
||||
- ion-icon
|
||||
- [ion-spinner](../spinner)
|
||||
|
||||
### Graph
|
||||
```mermaid
|
||||
graph TD;
|
||||
ion-refresher-content --> ion-icon
|
||||
ion-refresher-content --> ion-spinner
|
||||
style ion-refresher-content fill:#f9f,stroke:#333,stroke-width:4px
|
||||
```
|
||||
|
||||
----------------------------------------------
|
||||
|
||||
*Built with [StencilJS](https://stenciljs.com/)*
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
import { Component, ComponentInterface, Prop } from '@stencil/core';
|
||||
import { Component, ComponentInterface, Prop, h } from '@stencil/core';
|
||||
|
||||
import { Config, Mode, SpinnerTypes } from '../../interface';
|
||||
import { getIonMode } from '../../global/ionic-global';
|
||||
import { Config, SpinnerTypes } from '../../interface';
|
||||
import { sanitizeDOMString } from '../../utils/sanitization';
|
||||
|
||||
@Component({
|
||||
@ -8,8 +9,6 @@ import { sanitizeDOMString } from '../../utils/sanitization';
|
||||
})
|
||||
export class RefresherContent implements ComponentInterface {
|
||||
|
||||
mode!: Mode;
|
||||
|
||||
@Prop({ context: 'config' }) config!: Config;
|
||||
|
||||
/**
|
||||
@ -49,17 +48,19 @@ export class RefresherContent implements ComponentInterface {
|
||||
this.pullingIcon = this.config.get('refreshingIcon', 'arrow-down');
|
||||
}
|
||||
if (this.refreshingSpinner === undefined) {
|
||||
const mode = getIonMode(this);
|
||||
this.refreshingSpinner = this.config.get(
|
||||
'refreshingSpinner',
|
||||
this.config.get('spinner', this.mode === 'ios' ? 'lines' : 'crescent')
|
||||
this.config.get('spinner', mode === 'ios' ? 'lines' : 'crescent')
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
hostData() {
|
||||
const mode = getIonMode(this);
|
||||
return {
|
||||
class: {
|
||||
[`${this.mode}`]: true,
|
||||
[`${mode}`]: true,
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user