Skip to content

使用方法

在需要使用插件的页面加载以下代码

vue
<leven-uts-camera ref="refCamera" style="flex:1; height: 500px;" :config="config" @onError="onError"
  @onEvent="onEvent" @onEventMethod="onEventMethod">
</leven-uts-camera>
vue
<leven-uts-camera ref="refLevenCamera" style="flex:1; height: 500px;" :configX="config" @onError="onError"
  @onEventMethod="onEventMethod">
</leven-uts-camera>

//组件的引用
const refLevenCamera = ref<LevenUtsCameraElement | null>(null)

注意

  • 组件只能在nvue/uvue页面中使用,不支持vue页面,config参数必传,具体请参考【初始化配置
  • 静默模式在uvue页面下需要设置组件的样式为style="width: 0px; height: 0px;",同时需config配置需传入isSilencetrue