Fix: Actualizar sintaxis de componentes Nuxt UI v4 y corregir errores de TypeScript
All checks were successful
build-and-deploy / build-and-deploy (push) Successful in 55s

- Actualizar UModal para usar v-model:open en lugar de v-model
- Envolver contenido de UModal en slot #content según nueva sintaxis
- Corregir tipos en CameraCapture: agregar verificación de objeto antes de spread
- Cambiar tipo de retorno de getAppIconUrl de null a undefined
- Comentar capture_links en manifest PWA (propiedad experimental no soportada en tipos)
- Resolver todos los errores de TypeScript y warnings de hidratación

Errores corregidos:
- TS2353: width no existe en tipo ui de UModal
- TS2698: Spread types solo de tipos objeto
- TS18048: camera posiblemente undefined
- TS2322: null no asignable a undefined
- TS2353: capture_links no existe en ManifestOptions
This commit is contained in:
2025-10-17 16:45:51 -06:00
parent 8109f7e1d0
commit 40b0610ad9
4 changed files with 29 additions and 24 deletions

View File

@@ -212,11 +212,13 @@ const startCamera = async () => {
// Si tenemos un deviceId específico, úsalo
if (cameras.value.length > 0 && cameras.value[currentCameraIndex.value]) {
const camera = cameras.value[currentCameraIndex.value]
constraints.video = {
...constraints.video,
deviceId: { exact: camera.deviceId }
} as MediaTrackConstraints
const camera = cameras.value[currentCameraIndex.value]!
if (typeof constraints.video === 'object' && constraints.video !== null) {
constraints.video = {
...constraints.video,
deviceId: { exact: camera.deviceId }
} as MediaTrackConstraints
}
}
try {