vending-machine/mobile/App.vue
2026-04-08 20:45:41 +08:00

108 lines
1.8 KiB
Vue

<script>
import { initAppState } from './utils/auth.js'
export default {
onLaunch: function() {
initAppState()
},
onShow: function() {
},
onHide: function() {
}
}
</script>
<style>
/* 全局基础样式 */
page {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
font-size: 14px;
color: #333333;
background-color: #f8f8f8;
line-height: 1.5;
}
/* 安全区域适配 */
.safe-area-bottom {
padding-bottom: constant(safe-area-inset-bottom);
padding-bottom: env(safe-area-inset-bottom);
}
/* 通用容器 */
.container {
padding: 20rpx 30rpx;
}
/* 通用按钮样式 */
.btn-primary {
background-color: #007aff;
color: #ffffff;
border-radius: 12rpx;
text-align: center;
font-size: 16px;
height: 88rpx;
line-height: 88rpx;
}
.btn-primary-disabled {
background-color: #cccccc;
color: #ffffff;
border-radius: 12rpx;
text-align: center;
font-size: 16px;
height: 88rpx;
line-height: 88rpx;
}
/* 通用卡片样式 */
.card {
background-color: #ffffff;
border-radius: 16rpx;
padding: 24rpx;
margin-bottom: 20rpx;
box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.05);
}
/* 分割线 */
.divider {
height: 1rpx;
background-color: #eeeeee;
margin: 20rpx 0;
}
/* 文字省略 */
.text-ellipsis {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
/* 弹性布局辅助 */
.flex-row {
display: flex;
flex-direction: row;
align-items: center;
}
.flex-col {
display: flex;
flex-direction: column;
}
.flex-between {
display: flex;
justify-content: space-between;
align-items: center;
}
.flex-center {
display: flex;
justify-content: center;
align-items: center;
}
.flex-1 {
flex: 1;
}
</style>