效果图(将下面的代码复制粘贴就可以做出来了)
第一步
将资源文件解压放到utils目录下
第二步
页面json配置文件引入组件
{
"usingComponents": {
"image-cropper": "/utils/image-cropper/image-cropper"
},
"navigationStyle":"custom"
}
第三步
页面使用
入参:
src:'' //原始文件路径(需要修改的文件)
width:250,//宽度
height: 250,//高度
<view>
<image-cropper id="image-cropper" limit_move="{
{true}}" disable_rotate="{
{true}}" width="{
{width}}" height="{
{h