收藏
回答

movable-view子元素点击,子元素中的图片和文字往上移动然后又回到原来的地方?

  <movable-area class="share-area" style="--top:{{navBarHeight}}px;--h:{{containerHeight}}px;">
  <movable-view direction="all" animation="{{false}}" x="{{shareX}}" y="{{shareY}}" class="share-view">
    <button class="share-btn-container" open-type="share">
      <image class="share-image" src="{{baseUtil.iconImage('qgqy/yqzs-share.png')}}" />
      <text class="share-text">分享</text>
    </button>
  </movable-view>
</movable-area>
.share-area {
  position: fixed;
  left: 0;
  top: var(--top);
  width: 100%;
  height: calc(var(--h) - 164rpx);
  z-index: 1;
  pointer-events: none;
}

.share-view {
  width: 106rpx;
  height: 106rpx;
  pointer-events: auto;
}

.share-image {
  width: 36rpx;
  height: 36rpx;
}

.share-text {
  font-weight: 400;
  font-size: 30rpx;
  color: #FF8201;
  line-height: 1;
}

.share-btn-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12rpx;
  border: none;
  width: 106rpx;
  height: 106rpx;
  background: #FF82011a;
  border-radius: 53rpx;
  padding: 0;
}

.share-btn-container::after {
  border: none;
}


最后一次编辑于  01-27
回答关注问题邀请回答
收藏

1 个回答

  • XSJ
    XSJ
    01-27

    movable-view中的子元素即使使用catchtap,子元素仍然出现往上移动的情况

    01-27
    有用
    回复
登录 后发表内容