一、实现效果: 二、代码实现: 1.在pages.json文件中,单页面定义导航栏,添加以下代码: "navigationStyle": "custom" //自定义导航栏 如图所示: 2.在components文件夹下,封装一个组件navBar.vue: <templat