46 lines
1.6 KiB
Vue
46 lines
1.6 KiB
Vue
<script>
|
|
export default {
|
|
onLaunch: function() {
|
|
console.log('App Launch')
|
|
},
|
|
onShow: function() {
|
|
console.log('App Show')
|
|
},
|
|
onHide: function() {
|
|
console.log('App Hide')
|
|
}
|
|
}
|
|
</script>
|
|
<style lang="scss">
|
|
/* 注意要写在第一行,同时给style标签加入lang="scss"属性 */
|
|
@import "uview-ui/index.scss";
|
|
|
|
/* xuchao: 全站统一字体栈:系统字体优先,中文回退顺序兼顾 iOS/鸿蒙/Android/Windows */
|
|
page,
|
|
body {
|
|
font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'HarmonyOS Sans SC',
|
|
'Microsoft YaHei', 'Source Han Sans SC', 'Noto Sans CJK SC', 'Hiragino Sans GB',
|
|
Arial, Helvetica, sans-serif;
|
|
-webkit-font-smoothing: antialiased;
|
|
}
|
|
|
|
/* xuchao: 修复默认导航栏在微信 WebView 内顶部超宽空白(参加/使用指南、协议等页)——
|
|
uni-app 内置 H5 导航栏高度为 calc(44px + env(safe-area-inset-top)),页面模板带
|
|
viewport-fit=cover 时,部分 Android 微信 WebView 会误报状态栏高度(而 H5 视口本
|
|
就位于微信原生标题栏下方、并未被遮挡),导致导航栏被垫高。强制回退固定 44px。
|
|
标准浏览器/ iOS 中该 env 值为 0,此覆盖无副作用 */
|
|
uni-page-head .uni-page-head {
|
|
height: 44px !important;
|
|
padding-top: 7px !important;
|
|
}
|
|
uni-page-head .uni-page-head ~ .uni-placeholder {
|
|
height: 44px !important;
|
|
}
|
|
uni-page-head[uni-page-head-type='default'] ~ uni-page-wrapper {
|
|
height: calc(100% - 44px) !important;
|
|
}
|
|
.uni-app--showtabbar uni-page-head[uni-page-head-type='default'] ~ uni-page-wrapper {
|
|
height: calc(100% - 44px) !important;
|
|
}
|
|
</style>
|