1.2.5 • Published 3 years ago

wang-image-clip v1.2.5

Weekly downloads
45
License
-
Repository
github
Last release
3 years ago

wang-image-clip

Using npm:

npm i wang-image-clip --save

params:

参数名描述类型默认值
src传入的图片地址image--
height图片的高度(宽度将进行等比缩放)number500
clipHeight裁剪区域初始高度number200
clipWidth裁剪区域初始宽度number200
showPreview是否显示预览区域boolentrue
showControls是否显示操作栏boolentrue

event

事件名返回值
clipCallBack裁剪后的图片

$ref api

clipImage: 手动触发裁剪,可用于用户自定义何时触发裁剪事件

attention

仅支持同域和设置了跨域的图片地址

example:

<template>
  <div id="app">
    <clip :src="require('./assets/logo.png')" />
  </div>
</template>

<script>
import clip from "wang-image-clip";
import "wang-image-clip/dist/wang-image-clip.css";

export default {
  name: 'app',
  components: {
    clip
  }
}
</script>
1.2.5

3 years ago

1.2.4

4 years ago

1.2.3

4 years ago

1.1.6

4 years ago

1.2.2

4 years ago

1.2.1

4 years ago

1.1.5

4 years ago

1.1.4

4 years ago

1.1.3

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

0.1.0

4 years ago