# cover-image

覆盖在原生组件上的图片视图。可覆盖的原生组件同 cover-view,支持嵌套在 cover-view 里。

注意

  • cover-view、cover-image 中不支持嵌套其它组件
  • 建议在安卓、iOS 场景使用
扫码预览
用BoosHi扫码或PC端点击
<template>
  <view class="demo-ui-page">
    <view class="demo-title">cover-view 覆盖在原生组件上的元素</view>
    <view class="demo-title">cover-image 支持嵌套在 cover-view 里</view>
    <demo-cell title="建议在移动端场景使用">
      <video
        style="width: 100%"
        id="demoVideo"
        :controls="false"
        :enable-progress-gesture="false"
        :show-center-play-btn="true"
        src="https://histatic.zhipin.com/front/files/9hdB3UbpDU6RGawJw2gedo.mp4"
      >
        <cover-view style="color: #ccc">简单的自定义 controls</cover-view>
        <cover-image
          style="width: 50px;height:50px"
          class="controls-play img"
          src="../../../static/image/手机.png"
        ></cover-image>
        <view style="color: #ccc;margin-top:15px">普通视图</view>
      </video>
      <cover-view style="color: #ccc">
        <cover-view>cover-view嵌套</cover-view>
        <cover-image
          style="width: 50px;height:50px"
          class="controls-pause img"
          src="../../../static/image/手机1.png"
        ></cover-image>
      </cover-view>
    </demo-cell>
  </view>
</template>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32

支持的事件:click

属性名 类型 说明
src String 图标路径。支持本地路径、网络路径。不支持 base64 格式。
最后更新于 : 4/21/2023, 2:36:17 PM