uniapp【新增】: 头部返回增加返回首页icon

This commit is contained in:
15093570141
2024-10-28 15:44:20 +08:00
parent b3329208d9
commit cc5210e88a
3 changed files with 5 additions and 1 deletions

View File

@@ -5,6 +5,8 @@
<view class="page-back">
<image v-if="props.isBack" @click="hanlderBack" class="back"
:src="handleStaticResources('/static/images/back.png')"></image>
<image v-if="props.isBack" @click="handleRouteSwitchTab(RouteSwitchTabEnum.home)" class="back"
:src="handleStaticResources('/static/images/back-home.png')"></image>
<text class="name" v-if="props.mode === 'left'"
:style="{ 'color': props.titleColor }">{{ props.title }}</text>
</view>
@@ -18,7 +20,9 @@
<script setup lang="ts">
import { useSystemInfo } from '@/core/hooks';
import { handleStaticResources } from '@/core/utils';
import { handleStaticResources, handleRouteSwitchTab } from '@/core/utils';
import { RouteSwitchTabEnum } from '@/core/enum';
const { menuButtonHeight } = useSystemInfo();
const props = withDefaults(defineProps<{

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 691 B

After

Width:  |  Height:  |  Size: 932 B