Toggle navigation
Toggle navigation
This project
Loading...
Sign in
developOne
/
harmonyPool
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
chenjun3_wd
2024-04-19 11:02:47 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
7bfb88d299524a82fe6f869d6a48bcf463980984
7bfb88d2
1 parent
20c32839
图片下载模块
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
sight_harmony/features/wdComponent/src/main/ets/components/ImageDownloadComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/ImageDownloadComponent.ets
View file @
7bfb88d
...
...
@@ -7,10 +7,14 @@ import { photoAccessHelper } from '@kit.MediaLibraryKit';
import fs from '@ohos.file.fs';
const PERMISSIONS: Array<Permissions> = [
'ohos.permission.READ_MEDIA',
'ohos.permission.WRITE_MEDIA'
'ohos.permission.READ_IMAGEVIDEO',
'ohos.permission.WRITE_IMAGEVIDEO'
];
/*
* saveButton参考文档
* https://developer.huawei.com/consumer/cn/doc/harmonyos-guides/savebutton-0000001820999677
* */
@Component
export struct ImageDownloadComponent {
@State image: PixelMap | undefined = undefined;
...
...
@@ -20,12 +24,8 @@ export struct ImageDownloadComponent {
build() {
Column() {
Image($r('app.media.icon_arrow_left_white'))
.width(24)
.height(24)
.aspectRatio(1)
.interpolation(ImageInterpolation.High)
.rotate({ angle: -90 })
SaveButton({ icon: SaveIconStyle.LINES })
.iconColor(Color.White)
.onClick(async () => {
console.info(`cj2024 onClick ${this.imageBuffer}`)
if (this.imageBuffer !== undefined) {
...
...
Please
register
or
login
to post a comment