refactor: 重构移动端页面布局与资源路径,优化打包配置
1. 新增layout.uts统一管理页面尺寸与安全区计算 2. 修正图片资源路径到static/mobile目录 3. 调整App.vue与AppIcon组件样式适配多端 4. 为微信小程序配置打包忽略规则减少包体积 5. 修复API请求错误抛出类型,完善类型定义 6. 补充README文档说明项目运行与维护规范 7. 优化多个页面的样式与生命周期逻辑
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<view class="header-wrap">
|
||||
<view class="status-bar"></view>
|
||||
<view class="status-bar" :style="statusStyle(0)"></view>
|
||||
<view class="app-header">
|
||||
<view class="header-side" @click="handleBack"><AppIcon v-if="back" name="chevron-right" :size="34" class="back-icon" /></view>
|
||||
<text class="header-title">{{ title }}</text>
|
||||
@@ -10,6 +10,8 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="uts">
|
||||
import { usePageLayout } from '@/services/layout.uts'
|
||||
const { statusStyle } = usePageLayout()
|
||||
import AppIcon from '@/components/AppIcon.uvue'
|
||||
const props = defineProps({ title: { type: String, default: '' }, back: { type: Boolean, default: true } })
|
||||
const handleBack = () => {
|
||||
@@ -22,7 +24,7 @@
|
||||
|
||||
<style>
|
||||
.header-wrap { background-color: #ffffff; }
|
||||
.status-bar { height: var(--status-bar-height); }
|
||||
.status-bar { }
|
||||
.app-header { height: 96rpx; padding: 0 24rpx; flex-direction: row; align-items: center; justify-content: space-between; border-bottom: 1rpx solid #edf1f7; }
|
||||
.header-side { width: 100rpx; height: 96rpx; align-items: flex-start; justify-content: center; }
|
||||
.header-right { align-items: flex-end; }
|
||||
|
||||
Reference in New Issue
Block a user