perf: 优化 UI
This commit is contained in:
@@ -1,18 +1,14 @@
|
||||
<template>
|
||||
<view class="brand-banner">
|
||||
<!-- Background image layer -->
|
||||
<!-- Background image layer with blur -->
|
||||
<image
|
||||
v-if="studioInfo?.bannerUrl"
|
||||
class="banner-bg"
|
||||
:src="studioInfo.bannerUrl"
|
||||
:src="bannerImage"
|
||||
mode="aspectFill"
|
||||
/>
|
||||
<!-- Dark overlay for readability -->
|
||||
<view class="banner-overlay" />
|
||||
|
||||
<!-- Status bar spacer -->
|
||||
<view class="status-bar" :style="{ height: statusBarHeight + 'px' }" />
|
||||
|
||||
<!-- Centered content -->
|
||||
<view class="banner-content">
|
||||
<!-- Circular logo -->
|
||||
@@ -33,19 +29,13 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { onMounted, ref } from 'vue'
|
||||
import type { StudioConfig } from '@mp-pilates/shared'
|
||||
import { getSystemLayout } from '../utils/system'
|
||||
|
||||
defineProps<{
|
||||
studioInfo: StudioConfig | null
|
||||
}>()
|
||||
|
||||
const statusBarHeight = ref(0)
|
||||
|
||||
onMounted(() => {
|
||||
statusBarHeight.value = getSystemLayout().statusBarHeight
|
||||
})
|
||||
const bannerImage = 'https://plates-1251306435.cos.ap-guangzhou.myqcloud.com/mp/images/bannerBg.jpg'
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@@ -63,6 +53,8 @@ onMounted(() => {
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
filter: blur(2px);
|
||||
transform: scale(1.05);
|
||||
}
|
||||
|
||||
.banner-overlay {
|
||||
@@ -74,11 +66,6 @@ onMounted(() => {
|
||||
background: rgba($primary-dark, 0.25);
|
||||
}
|
||||
|
||||
.status-bar {
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.banner-content {
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
@@ -86,7 +73,7 @@ onMounted(() => {
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding-top: 40rpx;
|
||||
padding-top: 120rpx;
|
||||
}
|
||||
|
||||
.logo-circle {
|
||||
|
||||
Reference in New Issue
Block a user