dcloudio / uni-app

A cross-platform framework using Vue.js
https://uniapp.dcloud.io
Apache License 2.0
40.19k stars 3.64k forks source link

通过npx degit dcloudio/uni-preset-vue#vite-ts my-vue3-project创建项目为tabbar添加list报错 #3860

Closed EarlySummer2018 closed 2 years ago

EarlySummer2018 commented 2 years ago

问题描述 npx degit dcloudio/uni-preset-vue#vite-ts my-vue3-project通过创建项目 在pages.json添加tabbar.list之后H5端会报Cannot read properties of undefined (reading 'meta') 去除tabbar下的list节点则正常

复现步骤 [复现问题的步骤] { "pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages { "path": "pages/index/index", "style": { "navigationBarTitleText": "首页", "navigationStyle": "custom", // #ifdef APP-PLUS "enablePullDownRefresh": true, // #endif "app-plus": { "scrollIndicator": false //禁用原生导航栏 } } } ], "subPackages": [], "globalStyle": { "navigationBarTextStyle": "black", "navigationBarTitleText": "加载中...", "navigationBarBackgroundColor": "#fff", "backgroundColor": "#F8F8F8" //#ifndef H5 , "titleNView": true //#endif //#ifdef H5 , "titleNView": false //#endif }, "tabBar": { "color": "#282828", "selectedColor": "#E93323", "borderStyle": "white", "backgroundColor": "#ffffff", "list": [{ "pagePath": "pages/index/index", "iconPath": "static/tabBar/home_active.png", "selectedIconPath": "static/tabBar/home_active.png", "text": "首页" }] } }

预期结果 [使用简洁清晰的语言描述你希望生效的预期结果]

实际结果 [这里请贴上你的报错截图或文字]

系统信息:

发行平台: [如 微信小程序、H5平台、5+ App等] 操作系统 [如 iOS 12.1.2、Android 7.0] HBuilderX版本 [如使用HBuilderX,则需提供 HBuilderX 版本号] uni-app版本 [如使用Vue-cli创建/运行项目,则提供npm run info的运行结果] 设备信息 [如 iPhone8 Plus] 补充信息 [可选] [根据你的分析,出现这个问题的原因可能在哪里?]

EarlySummer2018 commented 2 years ago

3553 这个issue无法解决

fxy060608 commented 2 years ago

配置至少两个页面,包括pages下边

EarlySummer2018 commented 2 years ago

配置至少两个页面,包括pages下边

感谢,当时只配置了 tabbar,到时也配置一下 pages 看看

EarlySummer2018 commented 2 years ago

已解决