From 87109d5bacb16a105e2448e14fb4d42a7cd7a6e3 Mon Sep 17 00:00:00 2001 From: "OWNEROR-41FNVD0\\lenovo" Date: Tue, 27 May 2025 20:15:01 +0800 Subject: [PATCH] =?UTF-8?q?feat=20(=E6=A0=87=E8=AF=86):=20=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=20third-party-camera=20=E4=BB=93=E5=BA=93=E6=A0=87?= =?UTF-8?q?=E8=AF=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- entry/src/main/ets/pages/Index.ets | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/entry/src/main/ets/pages/Index.ets b/entry/src/main/ets/pages/Index.ets index de72f86..1213366 100644 --- a/entry/src/main/ets/pages/Index.ets +++ b/entry/src/main/ets/pages/Index.ets @@ -16,7 +16,7 @@ import { dataSharePredicates } from '@kit.ArkData'; import { abilityAccessCtrl, Permissions } from '@kit.AbilityKit'; import { camera } from '@kit.CameraKit'; -import { photoAccessHelper } from '@kit.MediaLibraryKit'; +import { MovingPhotoViewController, photoAccessHelper } from '@kit.MediaLibraryKit'; import { CameraConstants } from '../constants/CameraConstants'; import { filePreview } from '@kit.PreviewKit'; import { @@ -609,4 +609,31 @@ export async function fromBack(context: Context): Promise { storage.setOrCreate('isMovingPhoto', false); storage.setOrCreate('countDownTime', 0); cameraShooting(isVideo, cameraPosition, surfaceId, context, foldAbleStatus); +} + +@Component +struct TestCode { + // [Start moving_photo_view_controller] + @State src: photoAccessHelper.MovingPhoto | undefined = undefined; + + controller: MovingPhotoViewController = new MovingPhotoViewController(); + // [End moving_photo_view_controller] + + build() { + // [Start moving_photo_view] + MovingPhotoView({ + movingPhoto: this.src, + controller: this.controller + }) + // [End moving_photo_view] + } +} + +@Component +struct MovingPhotoView { + @Provide movingPhoto: photoAccessHelper.MovingPhoto | undefined = undefined + @Provide controller: MovingPhotoViewController = new MovingPhotoViewController() + build() { + + } } \ No newline at end of file -- Gitee