daShangDao_scanBook/uni_modules/lime-camera/utssdk/web/index.vue

71 lines
1.4 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template>
<view id="l-camera">
<text>web 不支持</text>
</view>
</template>
<script>
export default {
name: "l-camera",
emits: ['stop', 'error', 'initdone','ready','scancode'],
props: {
"mode": {
type: String,
default: "normal"
},
"resolution": {
type: String,
default: "medium" // low | high
},
"devicePosition": {
type: String,
default: "back" // front前置 |back 后置
},
"flash": {
type: String,
default: "auto" // auto, on, off, torch
},
"frameSize": {
type: String,
default: "medium" // small|large
}
},
data() {
return {
}
},
watch: {
"devicePosition": {
/**
* 这里监听属性变化,并进行组件内部更新
*/
handler(newValue : string, oldValue : string) {
if(oldValue == newValue) return
// this.$el?.switchCamera(newValue)
},
immediate: false // 创建时是否通过此方法更新属性默认值为false
},
"flash": {
/**
* 这里监听属性变化,并进行组件内部更新
*/
handler(newValue : string, oldValue : string) {
if(oldValue == newValue) return
// this.$el?.setFlash(newValue)
},
immediate: false // 创建时是否通过此方法更新属性默认值为false
}
},
methods: {
init(){
return '11'
}
}
}
</script>
<style>
</style>