Git Product home page Git Product logo

Comments (12)

1977474741 avatar 1977474741 commented on July 17, 2024

什么bug?

from image-cropper.

tmzdy888 avatar tmzdy888 commented on July 17, 2024

什么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.

tmzdy888 avatar tmzdy888 commented on July 17, 2024

什么bug?

第二个bug:实际上你的插件下过来是无法运行的,需要作出修改才能运行。
修改的方法,是把你原因的函数构造方法如:funName(){} 改成 funName:fun(){}.这样的形式才能运行,因为这个问题导致了郁闷了将近1小时,怎么也找不到问题。因为我自己写的组件也可以运行哈,就你的跑不起来,后来对比发现你的写法问题。不是不可以那样的写法,而是你的方法不对,传递方法不对。你现在这样的写法。需要改变下,

from image-cropper.

tmzdy888 avatar tmzdy888 commented on July 17, 2024

另外你这样的问题好比在vue里的medthos是写:()=>{}这样一样,无法获取真实的this的意思是一样。

from image-cropper.

1977474741 avatar 1977474741 commented on July 17, 2024

你的基础库是哪个版本?

from image-cropper.

tmzdy888 avatar tmzdy888 commented on July 17, 2024

什么bug?

所有问题真实测试,绝对有问题,另我是个设计师,js方面比较不专业,提问如果不专业请原谅下。。
调试库:2.6.6;
微信是最新版本。

from image-cropper.

tmzdy888 avatar tmzdy888 commented on July 17, 2024

你的基础库是哪个版本?

宽高那如果设置成死的,就是不动态设置,真机上也不会有问题。这点你要知悉下。

from image-cropper.

1977474741 avatar 1977474741 commented on July 17, 2024

(){}和箭头函数不一样,实际和:function(){}是一样的,都有this。很奇怪了,你加我qq

from image-cropper.

tmzdy888 avatar tmzdy888 commented on July 17, 2024

(){}和箭头函数不一样,实际和:function(){}是一样的,都有this。很奇怪了,你加我qq

加了。你没通过

from image-cropper.

1977474741 avatar 1977474741 commented on July 17, 2024

啥时候加的?我没收到

from image-cropper.

1977474741 avatar 1977474741 commented on July 17, 2024

跟插件没关系。
“bug1”:尺寸取错了。
“bug2“:作用域搞错了。

from image-cropper.

tmzdy888 avatar tmzdy888 commented on July 17, 2024

谢谢,大神的耐心指导,是我的问题导致的。非常感谢!!!我本人非常尊重你及你的代码!!再次感谢!!

from image-cropper.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.