uni-app schema2code 生成的uni-file-picker组件,在uni-admin中不显示
uni-app schema2code 生成的uni-file-picker组件,在uni-admin中不显示
操作步骤:
1
预期结果:
1
实际结果:
1
bug描述:
使用的是官方的opendb,但是schema2code后,新增页面就是这个样子
信息类别 | 信息内容 |
---|---|
产品分类 | uniapp/App |
PC开发环境 | Windows |
PC开发环境版本 | 123 |
HBuilderX类型 | 正式 |
HBuilderX版本 | 3.4.11 |
手机系统 | Android |
手机系统版本 | Android 11 |
手机厂商 | 华为 |
手机机型 | pc |
页面类型 | vue |
vue版本 | vue2 |
打包方式 | 云端 |
项目创建方式 | HBuilderX |
更多关于uni-app schema2code 生成的uni-file-picker组件,在uni-admin中不显示的实战教程也可以访问 https://www.itying.com/category-93-b0.html
我也是,醉了,还想入门的,感觉这uni-cloud一堆bug要完善,又犹豫学不学了
更多关于uni-app schema2code 生成的uni-file-picker组件,在uni-admin中不显示的实战教程也可以访问 https://www.itying.com/category-93-b0.html
同样问题,同感
回复 2***@qq.com: 解决了,在uni-file-picker组件加style属性,style=“width: 100%;height: auto;”
回复 1***@qq.com: 高手,确实更精彩
你都打印出来了。直接用image链接这图片放上传框旁边就好了, <view> 当前图片:<image style="width: 200px; height: 200px; margin-right:100rpx;" :src="formData.bannerfile.url"></image></view>
回复 1***@qq.com: 高手,感谢
这个关于reading ‘push’的错误解决了吗?这是哪里出了问题
回复 2648142550: 解决啦,按照上面说的就能解决。
我也碰到了
请问解决了吗
我最新版的uniadmin 还是出了这个
你解决这个问题了吗?可以分享下不
今天我也遇到了,之前打包的都好的,就今天最近才出现的
uni-file-picker.vue:249 Uncaught (in promise) TypeError: Cannot read property ‘push’ of undefined
at Proxy.created (uni-file-picker.vue:249)
at callWithErrorHandling (vue.runtime.esm.js:1327)
at callWithAsyncErrorHandling (vue.runtime.esm.js:1336)
at callHook (vue.runtime.esm.js:4874)
at applyOptions (vue.runtime.esm.js:4770)
at finishComponentSetup (vue.runtime.esm.js:8629)
at setupStatefulComponent (vue.runtime.esm.js:8541)
at setupComponent (vue.runtime.esm.js:8463)
at mountComponent (vue.runtime.esm.js:6808)
at processComponent (vue.runtime.esm.js:6783)
一进入使用这个组件的页面就会报错,麻烦官方尽快处理一下
解决方案,https://ask.dcloud.net.cn/question/148432 已经向官方提交Bug 了 ,先手动修改,等官方修复
确实是最近出现的 之前是没有的 而且不止是file-picker datetime-picker uni-data-select 都出现了 我看有兄弟已经报官方了 希望尽快处理吧
在使用 uni-app
的 schema2code
功能生成 uni-file-picker
组件时,如果在 uni-admin
中不显示,可能是由于以下几个原因:
1. 组件未正确引入
- 确保在
uni-admin
项目中正确引入了uni-file-picker
组件。你需要在pages.json
或组件使用的页面中正确引入该组件。
{
"usingComponents": {
"uni-file-picker": "/components/uni-file-picker/uni-file-picker"
}
}
2. 组件路径问题
- 检查
uni-file-picker
组件的路径是否正确。如果uni-file-picker
组件不在components
目录下,确保路径配置正确。
3. 组件未正确注册
- 如果你使用的是 Vue 3,确保在
main.js
或App.vue
中正确注册了uni-file-picker
组件。
import UniFilePicker from '@/components/uni-file-picker/uni-file-picker.vue';
app.component('uni-file-picker', UniFilePicker);
4. 样式问题
- 检查是否有样式覆盖了
uni-file-picker
组件的显示。可以通过浏览器的开发者工具检查元素的样式,看看是否有display: none
或visibility: hidden
等样式导致组件不显示。
5. 数据绑定问题
- 确保
uni-file-picker
组件的v-model
或value
属性正确绑定到了数据上。如果数据未正确绑定,组件可能不会显示。
<uni-file-picker v-model="fileList"></uni-file-picker>
6. 组件版本问题
- 确保
uni-file-picker
组件的版本与uni-admin
项目兼容。不同版本的组件可能会有不同的 API 或行为。
7. 权限问题
- 在
uni-admin
中,某些组件可能会受到权限控制。确保当前用户有权限查看和使用uni-file-picker
组件。
8. 调试日志
- 在
uni-admin
中启用调试日志,查看是否有关于uni-file-picker
的错误或警告信息。
console.log('uni-file-picker:', this.$refs.filePicker);