This commit is contained in:
2025-06-17 21:34:52 +08:00
parent 021918e56d
commit 2e8617147c
9 changed files with 153 additions and 30 deletions

View File

@@ -1,7 +1,7 @@
<script setup>
import filer from '../../static/icons/filer.png';
import XNav from "../../components/XNav.vue";
import {reactive, ref} from "vue";
import {reactive, ref, computed} from "vue";
import TaskCard from "../../components/TaskCard.vue";
import useTableQuery from "../../hooks/useTableQuery.js";
import Api from "../../api/index.js";
@@ -14,24 +14,28 @@ import XAlert from "../../components/XAlert.vue";
const taskType = reactive([]);
const platformType = reactive([]);
const tabs = [
const tabs = computed(() => [
{
name: '进行中',
value: 1,
isTag: 0,
},
{
name: '审核中',
value: 2,
isTag: 0,
},
{
name: '已失效',
value: -1,
isTag: 0,
},
{
name: '已完成',
value: 3,
isTag: 0,
},
];
]);
const showFilter = ref(false);
const po = reactive({
status: 1,
@@ -183,9 +187,9 @@ const changeCurrent = async (item) => {
<view class="!grid grid-cols-4 gap-[20rpx] !px-[20rpx] bg-[#F2F3F5] py-[20rpx]">
<view
v-for="item in tabs"
v-for="(item, index) in tabs"
@click="changeCurrent(item)"
:class="['rounded-full bg-[#fff] text-center !py-[8rpx] !text-[13px] duration-500', po.status===item.value ? 'current' : '']">
:class="['rounded-full bg-[#fff] text-center !py-[8rpx] !text-[13px] duration-500', po.status===item.value ? 'current' : '', vo[`count${index+1}`] > 0 ? 'badge' : '']">
{{ item.name }}
</view>
</view>
@@ -205,6 +209,22 @@ const changeCurrent = async (item) => {
color: #fff;
}
.badge {
@apply relative;
}
.badge::before {
content: '';
display: block;
width: 15rpx;
height: 15rpx;
background-color: red;
position: absolute;
right: 0;
top: 0;
border-radius: 50%;
}
.block-value {
color: rgb(22, 93, 255);
font-size: 40rpx;