Redesign mini program navigation and add back controls
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
Component({
|
||||
methods: {
|
||||
goBack() {
|
||||
if (getCurrentPages().length > 1) {
|
||||
wx.navigateBack({ delta: 1 });
|
||||
} else {
|
||||
wx.reLaunch({ url: "/pages/home/home" });
|
||||
}
|
||||
},
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1 @@
|
||||
{ "component": true }
|
||||
@@ -0,0 +1,4 @@
|
||||
<view class="page-back" bindtap="goBack" aria-role="button" aria-label="返回">
|
||||
<view class="page-back-arrow"></view>
|
||||
<text>返回</text>
|
||||
</view>
|
||||
@@ -0,0 +1,18 @@
|
||||
.page-back {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 12rpx;
|
||||
min-height: 58rpx;
|
||||
margin-bottom: 22rpx;
|
||||
color: #2a7357;
|
||||
font-size: 26rpx;
|
||||
font-weight: 700;
|
||||
}
|
||||
.page-back-arrow {
|
||||
width: 17rpx;
|
||||
height: 17rpx;
|
||||
border-left: 4rpx solid currentColor;
|
||||
border-bottom: 4rpx solid currentColor;
|
||||
transform: rotate(45deg);
|
||||
margin-left: 5rpx;
|
||||
}
|
||||
Reference in New Issue
Block a user