feat: 首页顶部距离上面增加距离

This commit is contained in:
Burt 2024-01-24 14:32:51 +08:00
parent 8a16c4b61f
commit 3e318e3204

View File

@ -8,7 +8,10 @@
} }
</route> </route>
<template> <template>
<view class="bg-white h-full overflow-hidden pt-2 px-4"> <view
class="bg-white h-full overflow-hidden pt-2 px-4"
:style="{ marginTop: safeAreaInsets?.top + 'px' }"
>
<view class="mt-8"> <view class="mt-8">
<image src="/static/logo.svg" alt="" class="w-40 h-40 block mx-auto" /> <image src="/static/logo.svg" alt="" class="w-40 h-40 block mx-auto" />
</view> </view>
@ -22,12 +25,15 @@
<view class="text-blue mt-8 text-center text-xl"> <view class="text-blue mt-8 text-center text-xl">
<text class="font-800">详细示例 </text>参考 hello-unibest <text class="font-800">详细示例 </text>参考 hello-unibest
</view> </view>
<view class="m-2"> https://github.com/codercup/hello-unibest </view> <view class="m-4"> https://github.com/codercup/hello-unibest </view>
<button @click="onCopy">复制hello-unibest github地址</button> <button @click="onCopy">复制 hello-unibest github地址</button>
</view> </view>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
//
const { safeAreaInsets } = uni.getSystemInfoSync()
const onCopy = () => { const onCopy = () => {
uni.setClipboardData({ uni.setClipboardData({
data: 'https://github.com/codercup/hello-unibest', data: 'https://github.com/codercup/hello-unibest',