All Products
Search
Document Center

Mobile Platform as a Service:Cover view

Last Updated:Feb 04, 2021

cover-view

Text view overlaid on native components. map native components can be overlaid. Embedding applies to base library 1.10.0 and later versions of the Mini Program.

Attribute Type Default value Description Minimum version
onTap EventHandle - Tapping event callback. 1.9.0

cover-image

Image view overlaid on native components. cover-view native components can be overlaid. Embedding applies to base library 1.10.0 and later versions of the Mini Program.

Attribute Type Default value Description Minimum version
src String - Image address. The address format supported is the same as that of image. 1.9.0
onTap EventHandle - Tapping event callback. 1.9.0

Code sample

  1. <view class="page">
  2. <view class="page-description">cover-view</view>
  3. <view class="page-section">
  4. <view class="page-section-demo" style="position: relative;">
  5. <map
  6. longitude="{{longitude}}"
  7. latitude="{{latitude}}"
  8. scale="{{scale}}"
  9. style="width: 100%; height: 200px;"
  10. include-points="{{includePoints}}"
  11. />
  12. <cover-view class="cover-view">
  13. <cover-view class="cover-view-item cover-view-item-1"></cover-view>
  14. <cover-view class="cover-view-item cover-view-item-2"></cover-view>
  15. <cover-view class="cover-view-item cover-view-item-3"></cover-view>
  16. </cover-view>
  17. <cover-image style="" src="/image/ant.png" />
  18. </view>
  19. </view>
  20. </view>