mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
@@ -1,4 +1,4 @@
|
||||
import { Component, Prop } from '@stencil/core';
|
||||
import { Component, Element, Method, Prop } from '@stencil/core';
|
||||
|
||||
import { Mode } from '../../interface';
|
||||
import { createThemedClasses } from '../../utils/theme';
|
||||
@@ -11,7 +11,14 @@ import { createThemedClasses } from '../../utils/theme';
|
||||
}
|
||||
})
|
||||
export class List {
|
||||
mode!: Mode;
|
||||
|
||||
@Element() el!: HTMLElement;
|
||||
|
||||
/**
|
||||
* The mode determines which platform styles to use.
|
||||
* Possible values are: `"ios"` or `"md"`.
|
||||
*/
|
||||
@Prop() mode!: Mode;
|
||||
|
||||
/**
|
||||
* How the bottom border should be displayed on all items.
|
||||
@@ -24,6 +31,15 @@ export class List {
|
||||
*/
|
||||
@Prop() inset = false;
|
||||
|
||||
@Method()
|
||||
async closeSlidingItems(): Promise<boolean> {
|
||||
const item = this.el.querySelector('ion-item-sliding');
|
||||
if (item && item.closeOpened) {
|
||||
return item.closeOpened();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
hostData() {
|
||||
return {
|
||||
class: {
|
||||
|
||||
Reference in New Issue
Block a user