1***@qq.com
1***@qq.com
  • 发布:2023-08-23 16:29
  • 更新:2023-08-23 17:30
  • 阅读:367

关于custom-tab-bar使用疑惑

分类:uni-app

在组件中使用<custom-tab-bar direction="horizontal" :show-icon="false" @onTabItemTap="onTabItemTap"/>会产生以下错误

"openBlock" is not exported by "node_modules/@dcloudio/uni-mp-vue/dist/vue.runtime.esm.js", imported by "node_modules/@dcloudio/uni-h5/dist/uni-h5.es.js".  
at ../node_modules/@dcloudio/uni-h5/dist/uni-h5.es.js:1:79  
  1: import { withModifiers, createVNode, getCurrentInstance, ref, defineComponent, openBlock, createElementBlock, provide...  
                                                                                    ^  
  2: import { isArray, isString, extend, remove, stringifyStyle, parseStringStyle, isPlainObject, isFunction, capitalize, ...  
  3: import { once, UNI_STORAGE_LOCALE, I18N_JSON_DELIMITERS, Emitter, passive, initCustomDatasetOnce, resolveComponentIns... (x2)

如果将<custom-tab-bar direction="horizontal" :show-icon="false" @onTabItemTap="onTabItemTap"/>注释便可正常显示使用, 但是微信开发者工具无法使用真机调试
真机调试错误

Error: node-modules/@dcloudio/uni-components/lib/custom-tab-bar/custom-tab-bar.js does not exists [1.06.2307260][win32-x64]

pages.json配置如下

{  
    "pages": [  
        {  
            "path": "pages/index/index",  
            "style": {  
                "navigationBarTitleText": "unis-app"  
            }  
        },  
        {  
            "path": "pages/layout/index",  
            "style": {  
                "navigationBarTitleText": "uni-app"  
            }  
        },  
        {  
            "path": "pages/chat/index",  
            "style": {  
                "navigationBarTitleText": "chat-app"  
            }  
        },  
        {  
            "path": "pages/assist/index",  
            "style": {  
                "navigationBarTitleText": "assist-app"  
            }  
        }  
    ],  
    "tabBar": {  
        "color": "#7A7E83",  
        "selectedColor": "#3cc51f",  
        "borderStyle": "black",  
        "backgroundColor": "#ffffff",  
        "list": [  
        {  
            "pagePath": "pages/index/index",  
            "text": "主页"  
        },{  
            "pagePath": "pages/chat/index",  
            "text": "聊天"  
        }, {  
            "pagePath": "pages/assist/index",  
            "text": "助手"  
        }]  
    },  
    "globalStyle": {  
        "navigationBarTextStyle": "black",  
        "navigationBarTitleText": "uni-app",  
        "navigationBarBackgroundColor": "#F8F8F8",  
        "backgroundColor": "#F8F8F8"  
    }  
}  

所以<custom-tab-bar>应该放在何处 或者应该如何使用

2023-08-23 16:29 负责人:无 分享
已邀请:
DCloud_UNI_Anne

DCloud_UNI_Anne

要回复问题请先登录注册