TodoList.vue
2.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
<template>
<CollapseContainer class="todo-list" title="待办事项" :canExpan="false">
<template #title>
<span> 待办事项 <span class="todo-list__total">30</span> </span>
</template>
<List>
<template v-for="item in todoList" :key="item.id">
<ListItem class="todo-list__item">
<ListItemMeta>
<template #title>
<div>
<span class="todo-list__item-title">{{ item.title }}</span>
<span class="todo-list__item-memo">{{ item.memo }}</span>
</div>
</template>
<template #description>
<div class="todo-list__item-desc">
提交人:{{ item.sbmter }}
<br />
提交时间:{{ item.sbmtTime }}
</div>
</template>
</ListItemMeta>
<a-button type="link">
<Tag color="blue"> 待审批 </Tag>
</a-button>
</ListItem>
</template>
</List>
<div class="todo-list__all">
<Tooltip placement="topRight">
<template #title> 查看更多 </template>
<EllipsisOutlined />
</Tooltip>
</div>
</CollapseContainer>
</template>
<script lang="ts">
import { defineComponent } from 'vue';
import { List, Tag, Tooltip } from 'ant-design-vue';
import { CollapseContainer } from '/@/components/Container/index';
import { EllipsisOutlined } from '@ant-design/icons-vue';
import { todoList } from '../data';
export default defineComponent({
name: 'TodoList',
components: {
CollapseContainer,
List,
ListItem: List.Item,
ListItemMeta: List.Item.Meta,
Tag,
Tooltip,
EllipsisOutlined,
},
setup() {
return { todoList };
},
});
</script>
<style lang="less" scoped>
.todo-list {
position: relative;
&__total {
display: inline-block;
width: 20px;
height: 20px;
font-size: 12px;
line-height: 20px;
color: #fff;
text-align: center;
background: rgba(255, 0, 0, 0.7);
border-radius: 50%;
}
&__all {
position: absolute;
top: 0;
right: 10px;
height: 56px;
font-size: 24px;
line-height: 56px;
text-align: center;
cursor: pointer;
}
&__item {
padding: 8px;
&-title {
font-size: 14px;
font-weight: normal;
line-height: 22px;
color: #1c1d21;
}
&-memo {
font-size: 12px;
font-weight: normal;
line-height: 22px;
color: #7c8087;
}
&-desc {
font-size: 12px;
line-height: 22px;
color: #7c8087;
}
}
}
</style>