fix: titlebar 文字无法居中的问题

This commit is contained in:
2025-08-27 11:43:38 +08:00
parent 9b813b399f
commit 1e21aaeda0

View File

@@ -4,7 +4,9 @@
<!-- <u-icon color="#333" size="20" name="arrow-left"></u-icon>-->
<
</view>
<view class="top-title"><slot></slot></view>
<view class="top-title">
<slot></slot>
</view>
<view @click="topgae()" style="color: #387DF7;">
<slot name="right"></slot>
</view>
@@ -33,9 +35,7 @@
}
},
data() {
return {
}
return {}
},
methods: {
topgae() {
@@ -84,7 +84,9 @@
background-color: #fff;
display: flex;
align-items: center;
// justify-content: space-between;
justify-content: space-between;
position: relative;
.top-back {
color: #333;
//padding-top:10px;
@@ -92,14 +94,16 @@
line-height: 40px;
padding-left: 15px;
}
.top-title {
width: 100%;
text-align: center;
position: absolute;
font-size: 16px;
font-weight: 550;
color: #333;
height: 40px;
text-align: center;
width: 80%;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
@@ -113,6 +117,7 @@
z-index: 99;
}
}
// .arrow:before {
// content: " ";
// display: inline-block;