uni-app创建新页面和页面的配置

tech2022-07-16  152

一 新建 message.vue 文件

<template> <view> hello-uni </view> </template> <script> </script> <style> </style>

二 修改 pages.json 文件

{ "pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages { "path": "pages/message/message", "style":{ "navigationBarTitleText":"信息页", "navigationBarBackgroundColor":"#007AFF", "h5":{ "pullToRefresh":{ "color":"#7D26CD" } } } }, { "path": "pages/index/index" } ], "globalStyle": { "navigationBarTextStyle": "white", "navigationBarTitleText": "绿帽子", "navigationBarBackgroundColor": "#7FFF00", "backgroundColor": "#7CCD7C", "enablePullDownRefresh": true, "backgroundTextStyle":"light" } }

三 效果

 

最新回复(0)