mirror of
https://github.com/Dichgrem/Vue.git
synced 2025-12-16 21:51:59 -05:00
57 lines
978 B
Vue
57 lines
978 B
Vue
<template>
|
||
<div class="tdFooter">
|
||
<span>总计:{{ count }}</span>
|
||
|
||
<div class="tdTabs">
|
||
<a :class="{ active: tabType == 0 }" @click="tabClick(0)">全部</a>
|
||
<a :class="{ active: tabType == 1 }" @click="tabClick(1)">未完成</a>
|
||
<a :class="{ active: tabType == 2 }" @click="tabClick(2)">已完成</a>
|
||
</div>
|
||
</div>
|
||
</template>
|
||
|
||
<script>
|
||
export default {
|
||
props: ["count", "tabType"],
|
||
|
||
methods: {
|
||
tabClick(newType) {
|
||
this.$emit("changeTabType", newType);
|
||
},
|
||
},
|
||
};
|
||
</script>
|
||
|
||
<style scoped>
|
||
.tdFooter {
|
||
margin-top: 20px;
|
||
padding-top: 15px;
|
||
border-top: 1px solid #ddd;
|
||
display: flex;
|
||
justify-content: space-between;
|
||
align-items: center;
|
||
}
|
||
|
||
.tdFooter span {
|
||
font-size: 16px;
|
||
color: #555;
|
||
}
|
||
|
||
.tdTabs a {
|
||
margin-right: 15px;
|
||
cursor: pointer;
|
||
font-size: 16px;
|
||
color: #666;
|
||
transition: 0.3s;
|
||
}
|
||
|
||
.tdTabs a:hover {
|
||
color: #409eff;
|
||
}
|
||
|
||
.active {
|
||
color: #409eff !important;
|
||
font-weight: bold;
|
||
}
|
||
</style>
|