feat: 添加navbar导航栏

修复屏幕宽度过宽导致的苹果手机无法返回的问题
This commit is contained in:
2025-08-25 14:36:41 +08:00
parent 946f4a2e6b
commit 5adbe3f18d
2 changed files with 18 additions and 5 deletions

View File

@@ -1,5 +1,5 @@
<template>
<view class="top">
<view class="top" :class="[sticky ? 'sticky': '']">
<view v-show="showBack" class="top-back" @click="toBack()">
<u-icon color="#333" size="20" name="arrow-left"></u-icon>
</view>
@@ -24,6 +24,11 @@
goPgae:{
type:String,
default:''
},
// 启用粘性滚动
sticky: {
type: Boolean,
default: false
}
},
data() {
@@ -94,6 +99,13 @@
text-overflow: ellipsis;
line-height: 40px;
}
&.sticky {
position: sticky;
top: 0;
//防止其他元素遮盖
z-index: 99;
}
}
// .arrow:before {
// content: " ";

View File

@@ -1,6 +1,7 @@
<template>
<!--新的课程学习页面没有中间的详细页面了课程点过来就是这个用户未报名就直接报名-->
<view>
<page-title :showBack="true" :sticky="true">视频详情</page-title>
<watermark></watermark>
<u-toast ref="messager"></u-toast>
<!-- <page-title :showBack="true"></page-title> -->