svelte-imgcrop
A svelte component for image crop. (Svelte 图片裁剪组件)
Demo 示例
Brower compatibility
IE10+
Env 环境
svelte@3 + rollup@2
Install 安装
npm install svelte-imgcrop
Usage 使用
Options 配置项
Prop
Prop | Type | Default | Desc |
---|---|---|---|
src | string | '' | The image to be cropped |
width | Number | 400 | Container width |
height | Number | 300 | Container height |
Events
Name | Desc |
---|---|
change | Crop success,params(e) |