uniapp 开发中遇到的问题

2023-03-24  本文已影响0人  安普瑞斯

1、ISO页面左右滑动

最外层容器定义以下样式,如果不成功,就挨个排查页面样式

.home{
  width: 100%;
    overflow-x: hidden;
}

2、uni-file-picker不能选择图片

修改源码,地址\node_modules@dcloudio\uni-ui\lib\uni-file-picker\choose-and-upload-file.js
chooseAndUploadFile方法添加opts.sourceType = ['album', 'camera']

function chooseAndUploadFile(opts = { type: 'all' }) {
    opts.sourceType = ['album', 'camera']
    if (opts.type === 'image') {
        return uploadFiles(chooseImage(opts), opts);
    }
....
}

3、切换页面清空表单

this.$refs.filePickerRef.files = []

4、this.$fres不能获取

查看组件是否使用了v-if,改成v-show

5、uni-popup获取不到ref

复制源码,把v-if改成v-show

6、uni-easyinput后边添加单位

在fom-item里面,套一层view

上一篇 下一篇

猜你喜欢

热点阅读