更新密码找回uniapp
This commit is contained in:
1 parent
7f9a66da0f
commit
3fdda89833
1304 files changed
+3503
-26132
No files matched your search
@@ -1,6 +1,5 @@
|
||||
<template>
|
||||
<view class="apv-head" :style="headPad">
|
||||
<!-- 左侧:返回按钮 + 可选标题前缀 -->
|
||||
<view class="apv-head-left">
|
||||
<view class="apv-back" hover-class="apv-back-active" @tap="onBack">
|
||||
<FaIcon name="chevron-left" color="#1f2b48" :size="20" />
|
||||
@@ -8,12 +7,10 @@
|
||||
<text v-if="backText" class="apv-back-text">{{ backText }}</text>
|
||||
</view>
|
||||
|
||||
<!-- 中间:标题 -->
|
||||
<view class="apv-head-center">
|
||||
<text class="apv-title">{{ title }}</text>
|
||||
</view>
|
||||
|
||||
<!-- 右侧:可选操作槽(默认占位,避免标题被挤偏) -->
|
||||
<view class="apv-head-right">
|
||||
<slot name="right" />
|
||||
</view>
|
||||
@@ -25,14 +22,8 @@ import { computed } from 'vue'
|
||||
import { mpHeadPad } from '@/utils/mpHead.js'
|
||||
|
||||
const props = defineProps({
|
||||
/** 标题 */
|
||||
title: { type: String, required: true },
|
||||
/** 返回按钮旁的文字(不传则只显示箭头图标)。常见「返回」「关闭」。 */
|
||||
backText: { type: String, default: '' },
|
||||
/**
|
||||
* 自定义返回行为。函数返回 false 时阻止默认 navigateBack。
|
||||
* 例:detail 页面有未保存修改时拦截。
|
||||
*/
|
||||
beforeBack: { type: Function, default: null }
|
||||
})
|
||||
|
||||
@@ -45,12 +36,10 @@ function onBack() {
|
||||
if (pages.length > 1) {
|
||||
uni.navigateBack({ delta: 1 })
|
||||
} else {
|
||||
// 栈内只有自己(直链进入),回到子系统首页
|
||||
uni.reLaunch({ url: '/pages/nav/nav' })
|
||||
}
|
||||
}
|
||||
|
||||
// 状态栏高度避让:胶囊可用则按胶囊底缘 + 8px,否则回退到 safe-area-inset-top
|
||||
const headPad = computed(() => mpHeadPad(8))
|
||||
</script>
|
||||
|
||||
|
||||
Reference in new issue
Block a user