uni-page-head { display: none; } /* #endif */ 1. 2. 3. 2.如果只是当前页面不需要,可以在pages.json中添加代码 "navigationStyle":"custom" 1. "pages": [{ "path": "pages/index/index", "style": { "navigationBarTitleText": "" "enablePullDownRefresh": false, //隐藏导航 "navigationSty...
main.js 里进行全局注册 importVuefrom'vue'importpageHeadfrom'./components/page-head.vue'Vue.component('page-head',pageHead) index.vue 里可直接使用组件 <template><view><page-head></page-head></view></template>
{ "pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages { "path": "pages/index/index", "style": { "navigationBarTitleText": "uni-app", "app-plus": { /* 下拉刷新 在 App 平台下可以自定义部分下拉刷新的配置 page->app-plus->pullToRefresh。
app-nvue只能使用rich-text 若开发项目包含小程序和app,建议使用uParse(uparse详见:https://ext.dcloud.net.cn/search?q=uparse)。在使用nvue的页面里再使用rich-text nvue页面暂不支持全局组件 Vue.component 的第一个参数必须是静态的字符串。如 Vue.component('page-head',pageHead) 在创建新页面后,安卓端...
// main.js 注册全局组件 import Vue from 'vue' import pageHead from './components/page-head.vue' Vue.component('page-head',pageHead) // index.vue里使用page-head全局组件 <template> <view> <page-head></page-head> </view> </template> 八、区别于传统Web开发的注意JS注意 非...
//在index.vue中使用<page-head></page-head> 5.使用字体图标 小程序中使用字体图标必须加上协议头``https``小程序中不支持在css中使用本地文件,包括背景图和字体图标,需以base64方式方可使用 6.<template/> 和<block/> <template/>:条件渲染<block/>列表循环<template/>和<block/>并不是一个组件,它们...
uni-page-head ~ uni-page-wrapper { uni-page-head[uni-page-head-type="default"] ~ uni-page-wrapper { height: calc(100% - 44px); } @@ -28,7 +28,7 @@ uni-page-head ~ uni-page-wrapper { height: 50px; } .uni-app--showtabbar uni-page-head ~ uni-page-wrapper { .uni-app...
<!-- 隐藏所有页面的 navigationBar --> .uni-app--showtopwindow uni-page-head { display: none; } <!-- 显示路径为 pages/component/view/view 页面的 navigationBar --> .uni-app--showtopwindow [data-page="pages/component/view/view"] uni-page-head { display: block; } ...
page相当于body节点,例如: <!-- 设置页面背景颜色,使用 scoped 会导致失效 -- > page { background-color: #ccc; } 9.4 全局样式与局部样式 定义在 App.vue 中的样式为全局样式,作用于每一个页面。在 pages 目录下 的 vue 文件中定义的样式为局部样式,只作用在对应的页面,并会覆盖 App.vue 中相同的选...