Pre Merge pull request !75 from zgf/master

This commit is contained in:
zgf 2023-12-08 02:24:29 +00:00 committed by Gitee
commit 97dc3be711
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
4 changed files with 38 additions and 1 deletions

View File

@ -285,6 +285,10 @@ struct IndexFunctionDemo {
.onClick(() => { .onClick(() => {
router.pushUrl({ url: "pages/testManyGifLoadWithPage" }); router.pushUrl({ url: "pages/testManyGifLoadWithPage" });
}).margin({ top: 5, left: 3 }) }).margin({ top: 5, left: 3 })
Button("测试加载长图")
.onClick(() => {
router.pushUrl({ url: "pages/longImageKnifeTestPage" });
}).margin({ top: 5, left: 3 })
}.width('100%').height(60).backgroundColor(Color.Pink) }.width('100%').height(60).backgroundColor(Color.Pink)
} }
} }

View File

@ -0,0 +1,32 @@
/*
* 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 { ImageKnifeComponent } from '@ohos/imageknife'
@Entry
@Component
struct LongImageKnifeTestPage {
build(){
Scroll(){
ImageKnifeComponent({imageKnifeOption:{
loadSrc:$r('app.media.long_pic')
}}).size({
width:356,
height:3124.90666666668
}).backgroundColor(Color.Pink)
}.width('100%').height('100%')
.scrollable(ScrollDirection.Vertical)
.scrollBar(BarState.Auto)
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

View File

@ -33,6 +33,7 @@
"pages/SignatureTestPage", "pages/SignatureTestPage",
"pages/hspCacheTestPage", "pages/hspCacheTestPage",
"pages/testManyNetImageLoadWithPage", "pages/testManyNetImageLoadWithPage",
"pages/testManyGifLoadWithPage" "pages/testManyGifLoadWithPage",
"pages/longImageKnifeTestPage"
] ]
} }