Comments (12)
什么bug?
from image-cropper.
什么bug?
我刚删除了我的问题,发现之前描述的不严谨,现在我重新说下:
` data: {
src: '',
width: 0,//宽度
height: 0,//高度
},
onLoad: function (options) {
let t = this;
let url = options.url;
wx.getSystemInfo({
success: function(res) {
let r = res.windowWidth / res.windowHeight
t.setData({
width: res.windowWidth/2,
height: res.windowHeight / 2
});
wx.showLoading({
title: '加载中'
})
setTimeout(()=>{
t.setData({
src: url
});
},500)
},
})
},`
上面出现的问题是:
我动态设置的宽度 和 高度。模拟器没有问题。
在真机上,我的ios,苹果6plus,一定要在真机上测试。
会出现裁切变形,位置(实际只有图上一半的位置)不对,尺寸是对的。
另图片尺寸如果1024左右是没问题的。
from image-cropper.
什么bug?
第二个bug:实际上你的插件下过来是无法运行的,需要作出修改才能运行。
修改的方法,是把你原因的函数构造方法如:funName(){} 改成 funName:fun(){}.这样的形式才能运行,因为这个问题导致了郁闷了将近1小时,怎么也找不到问题。因为我自己写的组件也可以运行哈,就你的跑不起来,后来对比发现你的写法问题。不是不可以那样的写法,而是你的方法不对,传递方法不对。你现在这样的写法。需要改变下,
from image-cropper.
另外你这样的问题好比在vue里的medthos是写:()=>{}这样一样,无法获取真实的this的意思是一样。
from image-cropper.
你的基础库是哪个版本?
from image-cropper.
什么bug?
所有问题真实测试,绝对有问题,另我是个设计师,js方面比较不专业,提问如果不专业请原谅下。。
调试库:2.6.6;
微信是最新版本。
from image-cropper.
你的基础库是哪个版本?
宽高那如果设置成死的,就是不动态设置,真机上也不会有问题。这点你要知悉下。
from image-cropper.
(){}和箭头函数不一样,实际和:function(){}是一样的,都有this。很奇怪了,你加我qq
from image-cropper.
(){}和箭头函数不一样,实际和:function(){}是一样的,都有this。很奇怪了,你加我qq
加了。你没通过
from image-cropper.
啥时候加的?我没收到
from image-cropper.
跟插件没关系。
“bug1”:尺寸取错了。
“bug2“:作用域搞错了。
from image-cropper.
谢谢,大神的耐心指导,是我的问题导致的。非常感谢!!!我本人非常尊重你及你的代码!!再次感谢!!
from image-cropper.
Related Issues (20)
- 设置了裁剪框居中对齐,图片向下了,怎么设置图片图片和裁剪框对齐 HOT 1
- 实现思路
- export_scale自适应不同宽度的图片 HOT 1
- 运行慢、卡 HOT 1
- 请问有taro react版吗? HOT 3
- PNG 图片透明底色变成白底了,期待PNG透明底色可以保留
- 如何自动裁切画面正中间 HOT 1
- 请问可以支持下字节小程序吗 HOT 1
- width 和 height 初始化时 高度大于宽,图片不居中
- 裁剪框可以增加四个点吗
- 如何实现一个界面多张图裁切
- 上传npm
- 没有2d版本的?
- 裁剪框的自定义需求/改造帮助 HOT 1
- 压缩后图片有一层白色
- 是否有canvas 2d的开发计划了?
- 可以使用小程序本地资源图片不
- 移动图片或非中心放大图片,旋转后裁剪框内内容不准确,发生偏移
- 同样的配置,安卓裁剪出来的JPG图片很模糊,比IOS差了很多
- 有react H5版本的吗?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from image-cropper.