fix code error
This commit is contained in:
parent
001e7d3580
commit
ec22714f01
1 changed files with 4 additions and 4 deletions
|
|
@ -69,7 +69,7 @@ const formattedM = ref()
|
|||
const formattedH = ref()
|
||||
const formattedHH = ref()
|
||||
const formattedA = ref()
|
||||
const clockInterval = ref<number | NodeJS.Timeout | undefined>()
|
||||
const clockInterval = ref<number | undefined>()
|
||||
|
||||
/** function อัพเดทเวลา*/
|
||||
function updateClock() {
|
||||
|
|
@ -194,7 +194,7 @@ const availableCameras = ref<any[]>([])
|
|||
const currentCameraIndex = ref<number>(0)
|
||||
const currentCameraType = ref<'front' | 'back' | 'unknown'>('unknown')
|
||||
|
||||
const intervalId = ref<number | NodeJS.Timeout | undefined>(undefined) // ต้องใช้ตัวแปรเก็บค่า interval
|
||||
const intervalId = ref<number | undefined>(undefined) // ต้องใช้ตัวแปรเก็บค่า interval
|
||||
|
||||
/**
|
||||
* เริ่มจาก onMounted #1 เช็ค status คิว
|
||||
|
|
@ -316,7 +316,7 @@ async function openCamera() {
|
|||
if (!isPermissionCameraDenied.value) {
|
||||
// change camera device
|
||||
if (cameraIsOn.value) {
|
||||
await camera.value?.stop()
|
||||
camera.value?.stop()
|
||||
} else {
|
||||
await camera.value?.start()
|
||||
const devices: any = await camera.value?.devices(['videoinput'])
|
||||
|
|
@ -405,7 +405,7 @@ async function capturePhoto() {
|
|||
const file = new File([imageBlob], fileName, { type: 'image/png' })
|
||||
fileImg.value = file
|
||||
//แสดงรูป
|
||||
await camera.value?.stop()
|
||||
camera.value?.stop()
|
||||
const url = URL.createObjectURL(imageBlob)
|
||||
img.value = url
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue