Giter Club home page Giter Club logo

Comments (16)

gtyd avatar gtyd commented on May 15, 2024 2

@BearJ
在Android环境下,小米、华为都只能选择图片,没有拍照选项。魅族、iPhone没问题
经测试,需在input标签上加capture属性才可以
<input id=uploaderCustomInput class=weui-uploader__input type="file" accept="image/*" capture="camera" multiple="">

from weui.js.

BearJ avatar BearJ commented on May 15, 2024 1

@gtyd 倒转的问题在develop分支上已修复,你可以单独下载下来试试?

from weui.js.

BearJ avatar BearJ commented on May 15, 2024

@gtyd 谢谢提醒,这个后期需要fix

from weui.js.

gtyd avatar gtyd commented on May 15, 2024

@BearJ 重新引用了develop分支dist目录下的weui.js,拍照完点使用图片,还是被旋转了哇!

from weui.js.

BearJ avatar BearJ commented on May 15, 2024

@gtyd 方便提供下设备信息,系统信息,和微信版本吗?或者你在2182行之后打个alert,看看orientation的值是多少?

from weui.js.

lewis121 avatar lewis121 commented on May 15, 2024

develop分支下的weui.js在iphone5S下测试正常了。

from weui.js.

luqin avatar luqin commented on May 15, 2024

capture="camera" 在华为安卓浏览器中可以拍照,但是微信内置浏览器中依然无法拍照。

from weui.js.

gtyd avatar gtyd commented on May 15, 2024

@BearJ 已查明,当不启用压缩,拍照后依然是被旋转了,控制翻转的代码只写在了“启用压缩的分支”块内,见:
if (options.compress === false) { // 不启用压缩 & base64上传 的分支,不做任何处理,直接返回文件的base64编码 file.base64 = evt.target.result; callback(file); return; }

from weui.js.

BearJ avatar BearJ commented on May 15, 2024

@gtyd 是的呢,不做任何处理是因为有些需求是要保留图片信息,所以也就没有做调整。如果你想做处理的话,可以把compress的width和height设置得大一点即可

from weui.js.

gtyd avatar gtyd commented on May 15, 2024

@BearJ 如果我想保持原图,不启用压缩(不需要保留图片信息),但要解决旋转,可否单独给一个版本?谢谢

from weui.js.

BearJ avatar BearJ commented on May 15, 2024

@gtyd 是想保留原图的尺寸吗?那你试试这样设置compress,就算我提供一个新版本,实现原理也是一样的:

compress: {
    width: 99999,
    height: 99999,
    quality: 1
}

from weui.js.

gtyd avatar gtyd commented on May 15, 2024

@BearJ 可以解决,感谢!

from weui.js.

gtyd avatar gtyd commented on May 15, 2024

@BearJ 有没有每次发布版本后的更新说明呢?

from weui.js.

BearJ avatar BearJ commented on May 15, 2024

@gtyd 有的,https://github.com/weui/weui.js/releases

from weui.js.

BearJ avatar BearJ commented on May 15, 2024

这里v1.1.1 fixed

from weui.js.

zzhihang avatar zzhihang commented on May 15, 2024

compress: {
width: 99999,
height: 99999,
quality: 1
} 您好,这段代码需要粘在哪里呢,现在用了1.1.1ios还是照片旋转了90° @BearJ

from weui.js.

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.