mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-19 19:57:22 +08:00
refactor(all): make all method return a promise
This commit is contained in:
@ -26,23 +26,13 @@ export class ItemOptions {
|
||||
*/
|
||||
@Event() ionSwipe!: EventEmitter<void>;
|
||||
|
||||
@Method()
|
||||
isEndSide() {
|
||||
return isEndSide(this.win, this.side);
|
||||
}
|
||||
|
||||
@Method()
|
||||
width(): number {
|
||||
return this.el.offsetWidth;
|
||||
}
|
||||
|
||||
@Method()
|
||||
fireSwipeEvent() {
|
||||
this.ionSwipe.emit();
|
||||
}
|
||||
|
||||
hostData() {
|
||||
const isEnd = this.isEndSide();
|
||||
const isEnd = isEndSide(this.win, this.side);
|
||||
return {
|
||||
class: {
|
||||
'item-options-start': !isEnd,
|
||||
|
@ -34,8 +34,6 @@ You can combine the `ionSwipe` event plus the `expandable` directive to create a
|
||||
| Method | Description |
|
||||
| ---------------- | ----------- |
|
||||
| `fireSwipeEvent` | |
|
||||
| `isEndSide` | |
|
||||
| `width` | |
|
||||
|
||||
|
||||
----------------------------------------------
|
||||
|
Reference in New Issue
Block a user