1.update ImageKnife Project Config Files
Signed-off-by: zhoulisheng <635547767@qq.com>
This commit is contained in:
parent
560adc4574
commit
42af96cfd1
21
README.md
21
README.md
|
@ -13,7 +13,7 @@
|
|||
- 推荐使用ImageKnifeComponent组件配合ImageKnifeOption参数来实现功能。
|
||||
- 支持用户自定义配置实现能力参考ImageKnifeComponent组件中对于入参ImageKnifeOption的处理。
|
||||
|
||||
<img src="screenshot/g3.gif" width="100%"/>
|
||||
<img src="C:\Users\Administrator\Desktop\screenshot\g3.gif" width="100%"/>
|
||||
|
||||
## 下载安装
|
||||
|
||||
|
@ -25,24 +25,21 @@ OpenHarmony npm环境配置等更多内容,参考安装教程 [如何安装Ope
|
|||
|
||||
## 使用说明
|
||||
|
||||
1.首先初始化全局ImageKnife实例,在app.ets中调用ImageKnife.with()进行初始化。
|
||||
1.首先初始化全局ImageKnife实例,在AbilityStage.ts中调用ImageKnife.with(this.context)进行初始化
|
||||
|
||||
```typescript
|
||||
import AbilityStage from "@ohos.application.AbilityStage"
|
||||
import {ImageKnife} from '@ohos/imageknife'
|
||||
export default {
|
||||
data: {
|
||||
imageKnife: {} // ImageKnife全局占位符
|
||||
},
|
||||
|
||||
export default class MyAbilityStage extends AbilityStage {
|
||||
onCreate() {
|
||||
this.data.imageKnife = ImageKnife.with();// ImageKnife占位符全局初始化赋值
|
||||
globalThis.ImageKnife = ImageKnife.with(this.context);
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
2.参考[推荐使用](###'推荐使用')或[自定义实现](###'自定义实现')
|
||||
|
||||
|
||||
|
||||
#### 推荐使用:
|
||||
|
||||
使用ImageKnifeOption作为入参,配合自定义组件ImageKnifeComponent使用。
|
||||
|
@ -212,10 +209,12 @@ let requestOptin = new RequestOption();
|
|||
| request.roundedCorners() | RoundedCornersTransformation | 圆角剪裁 |
|
||||
| request.sepiaFilter() | SepiaFilterTransformation | 乌墨色滤波器 |
|
||||
| request.sketchFilter() | SketchFilterTransformation | 素描滤波器 |
|
||||
| request.mask() | MaskTransformation | 遮罩 |
|
||||
| request.swirlFilter() | SwirlFilterTransformation | 扭曲滤波器 |
|
||||
|
||||
## 兼容性
|
||||
|
||||
支持 OpenHarmony API version 8 及以上版本。
|
||||
支持 OpenHarmony API version 9 及以上版本。
|
||||
|
||||
## 目录结构
|
||||
|
||||
|
@ -261,6 +260,8 @@ let requestOptin = new RequestOption();
|
|||
- basicTestMediaImage.ets # 测试媒体image
|
||||
- basicTestResourceManagerPage.ets # 测试本地资源解析
|
||||
- compressPage.ets # 压缩页面
|
||||
- cropImagePage.ets # 裁剪页面
|
||||
- cropImagePage2.ets # 手势裁剪页面
|
||||
- frescoImageTestCasePage.ets # 测试属性动画组件切换
|
||||
- frescoLayerTestCasePage.ets # 测试ImageKnifeComponent组件切换配合属性动画
|
||||
- frescoRetryTestCasePage.ets # 测试ImageKnifeComponent加载失败重试
|
||||
|
|
|
@ -1,21 +1,7 @@
|
|||
{
|
||||
"app": {
|
||||
"signingConfigs": [
|
||||
{
|
||||
"name": "default",
|
||||
"material": {
|
||||
"certpath": "C:\\Users\\zwx1045834\\.ohos\\config\\openharmony\\auto_ohos.cer",
|
||||
"storePassword": "000000184CD86AF7B78D3E3B6C36B9221705137AC28BD8A341A757477E5DC27D95E6A0DFD5EB51AE",
|
||||
"keyAlias": "debugKey",
|
||||
"keyPassword": "00000018DAB1AB9C9DF6E7C4D35BE8EAF4323EFA49131AB39C65BA5C44DE6D3879C6B31AA70D1E14",
|
||||
"profile": "C:\\Users\\zwx1045834\\.ohos\\config\\openharmony\\auto_ohos_default_com.example.imageknifegiteepro.p7b",
|
||||
"signAlg": "SHA256withECDSA",
|
||||
"storeFile": "C:\\Users\\zwx1045834\\.ohos\\config\\openharmony\\auto_ohos.p12"
|
||||
}
|
||||
}
|
||||
],
|
||||
"compileSdkVersion": 8,
|
||||
"compatibleSdkVersion": 8,
|
||||
"compileSdkVersion": 9,
|
||||
"compatibleSdkVersion": 9,
|
||||
"products": [
|
||||
{
|
||||
"name": "default",
|
||||
|
@ -39,6 +25,10 @@
|
|||
{
|
||||
"name": "imageknife",
|
||||
"srcPath": "./imageknife"
|
||||
},
|
||||
{
|
||||
"name": "disklrucache",
|
||||
"srcPath": "./disklrucache"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -1,2 +1,2 @@
|
|||
// Script for compiling build behavior. It is built in the build plug-in and cannot be modified currently.
|
||||
module.exports = require('@ohos/hvigor-ohos-plugin').legacyAppTasks
|
||||
module.exports = require('@ohos/hvigor-ohos-plugin').appTasks
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"license":"ISC",
|
||||
"devDependencies":{},
|
||||
"name": "imageknifegiteepro",
|
||||
"name":"imageknife",
|
||||
"ohos":{
|
||||
"org":"huawei",
|
||||
"directoryLevel":"project",
|
||||
|
@ -11,8 +11,9 @@
|
|||
"repository":{},
|
||||
"version":"1.0.0",
|
||||
"dependencies":{
|
||||
"@ohos/hvigor-ohos-plugin": "1.0.6",
|
||||
"@ohos/hypium":"1.0.1",
|
||||
"@ohos/hvigor-ohos-plugin":"1.1.6",
|
||||
"hypium":"^1.0.0",
|
||||
"@ohos/hvigor": "1.0.6"
|
||||
"@ohos/hvigor":"1.1.6"
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue