<tap-pull-container>

检测在顶部下拉和在底部上推的滚动容器, 是 <tap-page>、<tap-card> 和 <tap-sheet> 下拉手势的基础。

Example

html`
  <tap-pull-container
    @pull=${({ detail }) => console.log(detail.distance)}
    @pull-end=${({ detail }) => detail.distance > 100 && refresh()}
  >
    ...
  </tap-pull-container>
`;

API

TapPullContainerElement

Extends TapScrollBaseElement

TapPullContainerElement Instance Properties

Property(Attribute) Reactive Type Description
disableGesture(disable-gesture) Yes boolean
disableScroll(disable-scroll) Yes boolean
detectSwipe(detect-swipe) Yes boolean Include a swipe in pull-end / push-end; disabled by default.
pullActivate(pull-activate) Yes number
pull Emitter<PullEventDetail>
pullEnd Emitter<PullEndEventDetail>
push Emitter<PushEventDetail>
pushEnd Emitter<PushEndEventDetail>

TapPullContainerElement Other

Type Value
Event pull, pull-end, push, push-end

TapScrollBaseElement

Shadow DOM; Extends TapResizeBaseElement

TapScrollBaseElement Instance Properties

Property(Attribute) Reactive Type
disableScrollMask(disable-scroll-mask) Yes boolean

TapScrollBaseElement Other

Type Value
CSS State top-overflow, right-overflow, bottom-overflow, left-overflow

TapResizeBaseElement

Extends GemElement

TapResizeBaseElement Instance Properties

Property(Attribute) Reactive Type Description
resize Emitter<ResizeDetail>
resizeThrottle Yes boolean
resizeBox Yes ResizeObserverBoxOptions Box that triggers resize, content-box by default
borderBoxSize { blockSize: number; inlineSize: number; }
contentRect { x: number; y: number; height: number; width: number; }

TapResizeBaseElement Other

Type Value
Event resize