vue-img-editor-xx
v0.0.6
Published
基于vue的图片编辑组件 ![image](https://github.com/hxc1216/vue-img-editor/assets/79068752/2b33cfcb-fecb-4f07-8edc-37c2089ec58e)
Downloads
4
Readme
简述
基于vue的图片编辑组件
示例
// 安装
npm i vue-img-editor-xx
// 全局导入 main.js
import ImgEditor from 'vue-img-editor-xx'
Vue.use(ImgEditor)
// 单独导入
import {ImgEditor} from 'vue-img-editor-xx';
// 添加组件
{
components: {
ImgEditor
},
data:{
value:"", // 图片地址
},
methods:{
// 图片更改回调
onChange(src){
// 更改后的图片地址
console.log(src)
}
}
}
// 使用
<template>
<!-- pattern: edit | view -->
<img-editor pattern="edit" v-model="value" @change="onChange" />
</template>