xyxiao001 / vue-cropper

A simple picture clipping plugin for vue
https://github.xyxiao.cn/vue-cropper/docs/vue3.html
MIT License
4.3k stars 695 forks source link

怎么设置viewMode参数? #7

Closed wscart closed 7 years ago

wscart commented 7 years ago

在手机上图片比例没有铺满,看了cropper文档里面有viewMode,但是在你开发的vue-cropper上好像缺少了这个支持,那么怎么设置viewMode?

xyxiao001 commented 7 years ago

你说的viewMode 是指图片缩放的比例吗

wscart commented 7 years ago

对的,在底层上图片比例要铺满

xyxiao001 commented 7 years ago

目前没这功能 我后续加上去。 我会加上手机端手势缩放的

wscart commented 7 years ago

这样谢谢了

wscart commented 7 years ago

在node_modules里面可以修改代码吗

xyxiao001 commented 7 years ago

可以修改的 修改后打包就是你修改的

wscart commented 7 years ago

恩,是/src这个路径没错吗

wscart commented 7 years ago

如果是正确的话 为什么没生效?

xyxiao001 commented 7 years ago

你想生效什么功能

wscart commented 7 years ago

我写console.log,然后在浏览器上没有收到console信息。 这好像是说 路径不对吗 还是要重新打包?

xyxiao001 commented 7 years ago

重启服务呢 应该是修改后就会生效

wscart commented 7 years ago

重启服务是指npm run dev还是?

xyxiao001 commented 7 years ago

npm run dev

wscart commented 7 years ago

没生效的 - -!

wx20170802-152448 2x
xyxiao001 commented 7 years ago

这个是当移动图片才会触发的

wscart commented 7 years ago

没错 但我有动几次移动,没有触发 我想说,是不是路径有问题? 是src 还是example/src? 或者dist?

xyxiao001 commented 7 years ago

你直接改源码没用 在里面重新打包 因为引入的是dist的
我觉得你要改 直接把vue-cropper 复制出去当做你的组件 这样更方便

xyxiao001 commented 7 years ago

复制 src 里面的vue-cropper 就行

wscart commented 7 years ago

说的是哈哈 谢谢

Mrlilili commented 6 years ago

是在哪里改的viewMode?