6***@qq.com
6***@qq.com
  • 发布:2020-11-12 23:19
  • 更新:2020-11-12 23:19
  • 阅读:951

【报Bug】uni.chooseImage 从本地相册选择图片 不支持横屏

分类:uni-app

产品分类: uniapp/App

PC开发环境操作系统: Mac

PC开发环境操作系统版本号: 10.15.6

HBuilderX类型: 正式

HBuilderX版本号: 2.9.8

手机系统: iOS

手机系统版本号: IOS 14

手机厂商: 模拟器

手机机型: ipad air 2

页面类型: vue

打包方式: 云端

项目创建方式: HBuilderX

示例代码:
click(index) {  
    let sourceType = []  
    if (index == 0) {  
        sourceType.push('album')  
    }  
    else {  
        sourceType.push('camera')  
    }  
    let that = this  
    uni.chooseImage({  
        count: 1,  
        sourceType: sourceType,  
        success(res) {  
            console.log(res)  
            that.tempFilePath = res.tempFilePaths.length > 0?res.tempFilePaths[0]: ''  
            that.$emit('result', {name: that.title, content: res})  
        },  
        fail(err) {  
            console.log(err)  
            that.$emit('result', {name: that.title, content: err})  
        }  
    })  
}

操作步骤:

pad 横屏模式下 使用 uni.chooseImage 从本地相册选择图片

click(index) {  
                let sourceType = []  
                if (index == 0) {  
                    sourceType.push('album')  
                }  
                else {  
                    sourceType.push('camera')  
                }  
                let that = this  
                uni.chooseImage({  
                    count: 1,  
                    sourceType: sourceType,  
                    success(res) {  
                        console.log(res)  
                        that.tempFilePath = res.tempFilePaths.length > 0?res.tempFilePaths[0]: ''  
                        that.$emit('result', {name: that.title, content: res})  
                    },  
                    fail(err) {  
                        console.log(err)  
                        that.$emit('result', {name: that.title, content: err})  
                    }  
                })  
            }

预期结果:

pad 横屏模式下 使用 uni.chooseImage 从本地相册选择图片 方向应该是横屏的 不应该是 竖屏的样子

实际结果:

pad 横屏模式下 使用 uni.chooseImage 从本地相册选择图片 方向是竖屏的样子

bug描述:

pad 横屏模式下 使用 uni.chooseImage 从本地相册选择图片,弹出的界面是竖屏的,不会旋转为横屏

2020-11-12 23:19 负责人:无 分享
已邀请:

该问题目前已经被锁定, 无法添加新回复