🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

lcap-camera

Package Overview
Dependencies
Maintainers
2
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lcap-camera

<!-- 该 README.md 根据 api.yaml 和 docs/*.md 自动生成,为了方便在 GitHub 和 NPM 上查阅。如需修改,请查看源文件 -->

latest
npmnpm
Version
0.1.8
Version published
Weekly downloads
10
-16.67%
Maintainers
2
Weekly downloads
 
Created
Source

LcapCamera 摄像头

  • 示例
  • API

Form

开启/关闭摄影头,支持截图、上传等功能

示例

基本用法

<lcap-camera></lcap-camera>

默认值

<template>
<lcap-camera list-type="image"
    url="/gateway/lowcode/api/v1/app/upload" v-model="value"
    converter="json">
</lcap-camera>

</template>
<script>
    export default {
        data() {
            return {
                value: '[]',
            };
        },
    };
</script>

API

Props/Attrs

Prop/AttrTypeOptionsDefaultDescription
widthstring800宽度
heightstring600高度
value.sync, v-modelArray[]当前文件列表
urlstring上传的地址

Events

@send

刚发送时触发

ParamTypeDescription
$eventobject自定义事件对象
$event.dataobject进度相关信息
$event.preventDefaultFunction阻止上传流程
senderVMUUploader发送事件对象

@progress

发送进度改变时触发,在上传进度条时使用

ParamTypeDescription
$eventobject自定义事件对象
$event.dataobject进度相关信息
senderVMUUploader发送事件对象

@complete

上传完成时触发

ParamTypeDescription
$eventobject自定义事件对象
$event.xmlstring服务器回传信息
senderVMUUploader发送事件对象

@success

上传成功时触发

ParamTypeDescription
$eventobject自定义事件对象
$event.dataobject服务器回传信息对象
$event.fileobject上传文件信息,不包含文件主体内容
senderVMUUploader发送事件对象

@error

上传报错时触发

ParamTypeDescription
$eventobject自定义事件对象
$event.namestring错误名
$event.messagestring错误描述
$event.extensionsstring限制类型
$event.maxSizenumber限制大小
$event.sizenumber当前大小
senderVMUUploader发送事件对象

Methods

open()

开启摄像头

ParamTypeDefaultDescription

close()

关闭摄像头

ParamTypeDefaultDescription

snapshot()

截图并且上传

ParamTypeDefaultDescription

Keywords

lcap

FAQs

Package last updated on 05 Jan 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts