mirror of
https://gitee.com/openharmony/applications_app_samples
synced 2024-11-23 16:40:08 +00:00
FileManager测试模块MediaLibrary接口下架
Signed-off-by: yeyedeshen <yangxin181@huawei.com>
This commit is contained in:
parent
a74915efdb
commit
496937e898
@ -30,7 +30,7 @@ let fileAccessHelperAllServer: fileAccess.FileAccessHelper;
|
||||
@Entry
|
||||
@Component
|
||||
struct DocumentFileList {
|
||||
@State isNoFile: boolean = false;
|
||||
@State isNoFile: boolean = true;
|
||||
@State showDeleteButton: boolean = false;
|
||||
@State fileList: DocumentDataSource = new DocumentDataSource();
|
||||
title: Resource = {} as Resource;
|
||||
@ -43,8 +43,13 @@ struct DocumentFileList {
|
||||
rootInfos = result;
|
||||
});
|
||||
fileInfos = documentFileManager.iteratorDir(rootInfos);
|
||||
AppStorage.setOrCreate('fileListCount', 0);
|
||||
documentFileManager.scanFiles(fileInfos).forEach((item: fileAccess.FileInfo) => {
|
||||
this.fileList.pushData(item);
|
||||
if (this.fileList.totalCount() > 0) {
|
||||
this.isNoFile = false;
|
||||
AppStorage.setOrCreate('fileListCount', this.fileList.totalCount());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@ -58,6 +63,7 @@ struct DocumentFileList {
|
||||
Column() {
|
||||
Row() {
|
||||
Image($r('app.media.back'))
|
||||
.id('backStep')
|
||||
.width(36)
|
||||
.height(36)
|
||||
.objectFit(ImageFit.Fill)
|
||||
@ -96,7 +102,10 @@ struct DocumentFileList {
|
||||
height: 45
|
||||
})
|
||||
.stateStyles({
|
||||
pressed: this.imagePressedStyles
|
||||
pressed: this.imagePressedStyles,
|
||||
normal: {
|
||||
.backgroundColor(Color.White)
|
||||
}
|
||||
})
|
||||
.onClick(async () => {
|
||||
let fileInfo: fileAccess.FileInfo | undefined = undefined;
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2022 Huawei Device Co., Ltd.
|
||||
* Copyright (c) 2022-2024 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
@ -31,7 +31,7 @@
|
||||
"abilities": [
|
||||
{
|
||||
"name": "TestAbility",
|
||||
"srcEntrance": "./ets/testability/TestAbility.ets",
|
||||
"srcEntry": "./ets/testability/TestAbility.ets",
|
||||
"description": "$string:TestAbility_desc",
|
||||
"icon": "$media:icon",
|
||||
"label": "$string:TestAbility_label",
|
||||
|
@ -19,6 +19,10 @@
|
||||
{
|
||||
"name": "label_confirm",
|
||||
"value": "Label Confirm"
|
||||
},
|
||||
{
|
||||
"name": "select_all",
|
||||
"value": "select all"
|
||||
}
|
||||
]
|
||||
}
|
@ -19,6 +19,10 @@
|
||||
{
|
||||
"name": "label_confirm",
|
||||
"value": "Label Confirm"
|
||||
},
|
||||
{
|
||||
"name": "select_all",
|
||||
"value": "select all"
|
||||
}
|
||||
]
|
||||
}
|
@ -19,6 +19,10 @@
|
||||
{
|
||||
"name": "label_confirm",
|
||||
"value": "确定"
|
||||
},
|
||||
{
|
||||
"name": "select_all",
|
||||
"value": "全选"
|
||||
}
|
||||
]
|
||||
}
|
@ -1,6 +1,21 @@
|
||||
/*
|
||||
* Copyright (c) 2024 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
{
|
||||
"hvigorVersion": "3.0.2",
|
||||
"hvigorVersion": "4.1.2",
|
||||
"dependencies": {
|
||||
"@ohos/hvigor-ohos-plugin": "3.0.2"
|
||||
"@ohos/hvigor-ohos-plugin": "4.1.2"
|
||||
}
|
||||
}
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user