85 lines
1.6 KiB
Vue
85 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>
|
|
/*每个页面公共css */
|
|
/* 全局清除默认样式 */
|
|
/* 通用flex布局 */
|
|
.flex {
|
|
display: flex;
|
|
}
|
|
|
|
.flex-center {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
.flex-between {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
}
|
|
|
|
.flex-around {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-around;
|
|
}
|
|
|
|
.flex-col {
|
|
flex-direction: column;
|
|
}
|
|
|
|
.items-center {
|
|
align-items: center;
|
|
}
|
|
|
|
.justify-center {
|
|
justify-content: center;
|
|
}
|
|
|
|
.flex-1 {
|
|
flex: 1;
|
|
}
|
|
/* 自定义导航栏专用 */
|
|
.custom-header {
|
|
height: calc(var(--status-bar-height) + 88rpx);
|
|
padding-top: var(--status-bar-height);
|
|
}
|
|
/* 全局安全区样式 - 微信小程序完美支持 */
|
|
.safe-area-top {
|
|
padding-top: constant(safe-area-inset-top);
|
|
padding-top: env(safe-area-inset-top);
|
|
}
|
|
|
|
.safe-area-bottom {
|
|
padding-bottom: constant(safe-area-inset-bottom);
|
|
padding-bottom: env(safe-area-inset-bottom);
|
|
}
|
|
|
|
.page_container {
|
|
height: 100%;
|
|
background: repeating-linear-gradient(180deg, #e2f0ff, #f6faff);
|
|
|
|
padding: 0 40rpx;
|
|
/* 先写 constant() 兼容 iOS < 11.2,再写 env() */
|
|
padding-top: calc(constant(safe-area-inset-top) + 20rpx);
|
|
padding-top: calc(env(safe-area-inset-top) + 20rpx);
|
|
padding-bottom: constant(safe-area-inset-bottom);
|
|
padding-bottom: env(safe-area-inset-bottom);
|
|
}
|
|
/* 1 电表 2水表 */
|
|
</style>
|