【问题标题】:Vue v-file-input with camera capture [closed]带有摄像头捕获的 Vue v-file-input [关闭]
【发布时间】:2021-01-28 15:42:41
【问题描述】:

vue中有没有办法从摄像头获取文件输入,类似于普通的html方法:

<input type="file" accept="image/*" capture="camera" />

我正在寻找这样的东西:

<v-file-input capture="camera" />

【问题讨论】:

    标签: html vue.js vuejs2 vue-component vuetify.js


    【解决方案1】:

    基于w3 docs,您应该使用captureuser 作为值并添加accept 属性:

     <v-file-input
          label="File input"
          outlined
          dense
          capture="user"
          accept="image/*"
        ></v-file-input>
    

    【讨论】:

    • 在我的具体情况下,我必须使用capture="environment" 才能使用前置摄像头。选项包括userenvironmentleftright。有关详细信息,请参阅here
    • 如何捕获多个?我已经添加了 multiple 道具,但它只允许一次捕获。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-08-23
    • 1970-01-01
    • 2013-02-08
    • 1970-01-01
    • 2018-03-31
    • 2015-08-18
    相关资源
    最近更新 更多