无感登录修改

This commit is contained in:
weiwei committed 2025-02-25 22:24:27 +08:00
1 parent 91ecc48fdd
commit 44627cdc55
5 files changed
+85 -63

No files matched your search

@@ -1,77 +1,77 @@
<script setup>
import { defineProps, computed } from 'vue'
import { router } from '@@/index'
import { defineProps, computed } from "vue"
import { router } from "@@/index"
const props = defineProps({
title: {
type: String,
default: '标题'
},
titleColor: {
type: String,
default: '#333'
},
bgColor: {
type: String,
default: 'white'
},
showLeft: {
type: Boolean,
default: true
}
title: {
type: String,
default: "标题",
},
titleColor: {
type: String,
default: "#333",
},
bgColor: {
type: String,
default: "white",
},
showLeft: {
type: Boolean,
default: true,
},
})
const isHistiry = computed(() => {
return router.hasHistory()
return router.hasHistory()
})
const isTabbar = computed(() => {
return router.hasTabbar()
return router.hasTabbar()
})
function doBackClick() {
router.back()
router.back()
}
function getNavTop() {
const { statusBarHeight } = uni.getSystemInfoSync();
return `${statusBarHeight}px`
const { statusBarHeight } = uni.getSystemInfoSync()
return `${statusBarHeight}px`
}
</script>
<template>
<view class="navbar" :style="{ top: getNavTop() }">
<view class="navbar_center" v-if="showLeft && !isTabbar" @tap="doBackClick">
<text class="sicon-back icon" v-if="isHistiry" />
<text class="sicon-home icon" v-else />
</view>
</view>
<view v-if="false" class="navbar" :style="{ top: getNavTop() }">
<view class="navbar_center" v-if="showLeft && !isTabbar" @tap="doBackClick">
<text class="sicon-back icon" v-if="isHistiry" />
<text class="sicon-home icon" v-else />
</view>
</view>
</template>
<style lang="scss" scoped>
.navbar {
position: absolute;
left: 20rpx;
height: 44px;
display: flex;
justify-content: center;
align-items: center;
position: absolute;
left: 20rpx;
height: 44px;
display: flex;
justify-content: center;
align-items: center;
&_center {
background: #fff;
box-shadow: 0px 0px 4rpx rgba(51, 51, 51, 0.08), 0px 4rpx 6rpx 2rpx rgba(102, 102, 102, 0.12);
border-radius: 28rpx;
width: 56rpx;
height: 56rpx;
display: flex;
justify-content: center;
align-items: center;
z-index: 100;
&_center {
background: #fff;
box-shadow: 0px 0px 4rpx rgba(51, 51, 51, 0.08), 0px 4rpx 6rpx 2rpx rgba(102, 102, 102, 0.12);
border-radius: 28rpx;
width: 56rpx;
height: 56rpx;
display: flex;
justify-content: center;
align-items: center;
z-index: 100;
&>.icon {
font-size: 32rpx;
color: #333;
}
}
& > .icon {
font-size: 32rpx;
color: #333;
}
}
}
</style>
@@ -1,24 +1,24 @@
<script setup>
import { defineProps, computed } from 'vue'
import { router } from '@@/index'
import { defineProps, computed } from "vue"
import { router } from "@@/index"
const props = defineProps({
title: {
type: String,
default: '标题'
default: "标题",
},
titleColor: {
type: String,
default: '#333'
default: "#333",
},
bgColor: {
type: String,
default: 'white'
default: "white",
},
showLeft: {
type: Boolean,
default: true
}
default: true,
},
})
const isHistiry = computed(() => {
@@ -32,11 +32,10 @@ const isTabbar = computed(() => {
function doBackClick() {
router.back()
}
</script>
<template>
<view class="navbar" :style="{ backgroundColor: bgColor, height: '44px' }">
<view v-if="false" class="navbar" :style="{ backgroundColor: bgColor, height: '44px' }">
<view class="navbar_left" v-if="showLeft && !isTabbar" @tap="doBackClick">
<text class="sicon-back icon" v-if="isHistiry" />
<text class="sicon-home icon" v-else />