forked from floraachy/ImageKnife
1.reformat code with files contains(CacheRuleChangedPage.ets CustomEngineKeyImpl.ets dataShareUriLoadPage.ets DownloadClient.ets EngineKeyInterface.ets EntryAbility.ts LoadDataShareFileClient.ets LoadLocalFileClient.ets NetworkDownloadClient.ets)
Signed-off-by: zhoulisheng1 <zhoulisheng1@huawei.com>
This commit is contained in:
parent
be3c4eb03a
commit
49a9bfff2d
|
@ -1,9 +1,21 @@
|
|||
import { EngineKeyInterface,EngineKeyFactories, RequestOption } from '@ohos/imageknife'
|
||||
/*
|
||||
* Copyright (C) 2023 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.
|
||||
*/
|
||||
import { EngineKeyFactories, EngineKeyInterface, RequestOption } from '@ohos/imageknife'
|
||||
|
||||
export class CustomEngineKeyImpl implements EngineKeyInterface {
|
||||
|
||||
redefineUrl: (loadSrc: string) => string;
|
||||
|
||||
addOtherInfo: string = "Version=1.0.0;"
|
||||
|
||||
constructor() {
|
||||
|
|
|
@ -1,3 +1,17 @@
|
|||
/*
|
||||
* Copyright (C) 2023 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.
|
||||
*/
|
||||
import UIAbility from '@ohos.app.ability.UIAbility';
|
||||
import hilog from '@ohos.hilog';
|
||||
import window from '@ohos.window';
|
||||
|
|
|
@ -13,15 +13,12 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
import mediaLibrary from '@ohos.multimedia.mediaLibrary';
|
||||
import {
|
||||
ImageKnifeComponent,
|
||||
ImageKnifeOption,
|
||||
} from '@ohos/imageknife'
|
||||
import { ImageKnifeComponent, ImageKnifeOption, } from '@ohos/imageknife'
|
||||
import ArkWorker from '@ohos.worker'
|
||||
|
||||
@Entry
|
||||
@Component
|
||||
struct DataShareUriLoadPage {
|
||||
private globalGifWorker:any = undefined
|
||||
@State imageKnifeOption1: ImageKnifeOption =
|
||||
{
|
||||
loadSrc: $r('app.media.icon'),
|
||||
|
@ -29,8 +26,7 @@ struct DataShareUriLoadPage {
|
|||
placeholderSrc: $r('app.media.icon_loading'),
|
||||
errorholderSrc: $r('app.media.icon_failed')
|
||||
};
|
||||
|
||||
|
||||
private globalGifWorker: any = undefined
|
||||
|
||||
build() {
|
||||
Scroll() {
|
||||
|
@ -93,12 +89,9 @@ struct DataShareUriLoadPage {
|
|||
ImageKnifeComponent({ imageKnifeOption: this.imageKnifeOption1 }).width(300).height(300)
|
||||
}.width('100%').backgroundColor(Color.Pink)
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
.width('100%')
|
||||
.height('100%')
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue