flinfo/dc-App/uni_modules/hi-img-cut/readme.md
2025-03-01 10:26:49 +08:00

23 lines
844 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# hi-img-cut
## 1.0.02023-07-02
简单的canvas 图片剪裁工具支持一键1:1,4:3,3:4,16:9,9:16;
自由拖动,缩放。
剪裁图片准确不变形。
### props参数详情
|参数|默认值|说明|
|-------|:------|------:|
|url|''|做为组件使用时传入需要剪裁的图片url|
|clipType|all|check:快速选择 drag:拖动 all:全部|
|clipTemps|['1-1','4-3','3-4','16-9','9-16']|所有支持的快速模版,可以只要自己需要的|
|outputType|'save'|确定剪裁后的输出类型save:保存图片到相册, url:回传url,可使用@change接收|
|check|true|是否允许没有图片时点击界面选择图片|
### event
|参数|默认值|说明|
|-------|:------|------:|
|@change||点击确定剪裁后接收url时间|
### 组件使用
`<hi-img-cut :url="bgImgUrl" @change="cutChange"></hi-img-cut>`