我的足迹样式优化

master
lemon橪 2021-11-22 15:25:42 +08:00
parent 0c887a25e3
commit f600b628ce
2 changed files with 33 additions and 26 deletions

View File

@ -86,15 +86,7 @@
"style": { "style": {
"navigationBarTitleText": "我的足迹", "navigationBarTitleText": "我的足迹",
"enablePullDownRefresh": true, "enablePullDownRefresh": true,
"app-plus": { "navigationStyle": "custom"
"titleNView": {
"buttons": [{
"text": "编辑",
"fontSize": "14"
}]
}
}
} }
}, { }, {
"path": "myCollect", "path": "myCollect",

View File

@ -1,5 +1,10 @@
<template> <template>
<view class="myTracks"> <view class="myTracks">
<u-navbar title="我的足迹">
<div @click="changeRightBtn" slot="right" style="margin-right:32rpx">
{{edit}}
</div>
</u-navbar>
<u-empty text="暂无历史记录" style="margin-top:200rpx;" mode="history" v-if="whetherEmpty"></u-empty> <u-empty text="暂无历史记录" style="margin-top:200rpx;" mode="history" v-if="whetherEmpty"></u-empty>
<div v-else> <div v-else>
<view v-for="(item, index) in trackList" :key="index"> <view v-for="(item, index) in trackList" :key="index">
@ -30,7 +35,6 @@
<uni-load-more :status="loadStatus"></uni-load-more> <uni-load-more :status="loadStatus"></uni-load-more>
</div> </div>
<view v-if="editFlag"> <view v-if="editFlag">
<view class="myTracks-action-placeholder"></view>
<view class="myTracks-action"> <view class="myTracks-action">
<view class="myTracks-action-check"> <view class="myTracks-action-check">
<u-checkbox-group> <u-checkbox-group>
@ -41,7 +45,7 @@
</view> </view>
<view> <view>
<u-button type="warning" plain="true" @click="delAllTracks" class="myTracks-action-btn"> <u-button type="warning" @click="delAllTracks" class="myTracks-action-btn">
删除 删除
</u-button> </u-button>
</view> </view>
@ -56,6 +60,7 @@ import { myTrackList, deleteHistoryListId } from "@/api/members.js";
export default { export default {
data() { data() {
return { return {
edit: "编辑",
editFlag: false, // editFlag: false, //
allChecked: false, // allChecked: false, //
loadStatus: "more", // loadStatus: "more", //
@ -172,6 +177,18 @@ export default {
this.allChecked = isCheckedAll; this.allChecked = isCheckedAll;
}, },
/**
* 右侧标签栏切换
*/
changeRightBtn(e) {
if (!this.editFlag) {
this.edit = "完成";
} else {
this.edit = "编辑";
}
this.editFlag = !this.editFlag;
},
/** /**
* 点击全选按钮 * 点击全选按钮
*/ */
@ -208,18 +225,6 @@ export default {
}); });
}, },
}, },
/**
* 右侧标签栏切换
*/
onNavigationBarButtonTap(e) {
if (!this.editFlag) {
this.setStyle("完成");
} else {
this.setStyle("编辑");
}
this.editFlag = !this.editFlag;
},
}; };
</script> </script>
@ -292,6 +297,18 @@ export default {
color: $light-color; color: $light-color;
padding: 10rpx 0 0 0; padding: 10rpx 0 0 0;
} }
.myTracks-action{
display: flex;
justify-content: space-between;
position: fixed;
bottom: 0;
left: 0;
width: 100%;
background: #fff;
height: 75rpx;
align-items: center;
padding: 0 32rpx;
}
.myTracks-action-btn { .myTracks-action-btn {
width: 130rpx; width: 130rpx;
@ -304,9 +321,7 @@ export default {
height: 20rpx; height: 20rpx;
} }
.myTracks-action-placeholder {
height: 110rpx;
}
.myTracks-action-check { .myTracks-action-check {
align-items: center; align-items: center;