4000-520-616
欢迎来到免疫在线!(蚂蚁淘生物旗下平台)  请登录 |  免费注册 |  询价篮
主营:原厂直采,平行进口,授权代理(蚂蚁淘为您服务)
咨询热线电话
4000-520-616
当前位置: 首页 > 新闻动态 >
新闻详情
GitHub - zmj97/avatar-cropper: 使用Vue实现的头像裁剪工具插件...
来自 : github 发布时间:2021-03-25

demo link

web、移动端适配

ok事件返回选择的头像数据(dataurl)

ok event returns selected avatar\'s data(dataurl)

\"demo-pc.gif\"

\"demo-phone.gif\"

How to Use

# install this pluginnpm i avatar-cropper --save
// main.jsimport avatarCropper from \'avatar-cropper\'Vue.use(avatarCropper)// xxx.vue div id=\"app\"  button @click=\"show = true\" 更换头像 /button  avatar-cropper v-model=\"show\" @ok=\"data = $event\" /avatar-cropper  img :src=\"data\"  /div 

Build Setup

// 修改webpack// dev 使用entry: \'./src/main.js\',// build 使用entry: \'./src/plugin/index.js\',
# install dependenciesnpm install# serve with hot reload at localhost:8080npm run dev# build for production with minificationnpm run build

For detailed explanation on how things work, consult the docs for vue-loader.


ok event returns selected avatar's data(dataurl)How to Use# install this plugin npm i avatar-cropper --save// main.js import avatarCropper from '...使用Vue实现的头像裁剪工具插件, a vue.js plugin to crop avatar. Contribute to zmj97/avatar-cropper development by creating an account on GitHub.GitHub

本文链接: http://avatarcorp.immuno-online.com/view-753500.html

发布于 : 2021-03-25 阅读(0)