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
| <template>
| <CollapseContainer title="新消息通知" :canExpan="false">
| <List>
| <template v-for="item in list" :key="item.key">
| <ListItem>
| <ListItemMeta>
| <template #title>
| {{ item.title }}
| <Switch
| class="extra"
| checked-children="开"
| un-checked-children="关"
| default-checked
| />
| </template>
| <template #description>
| <div>{{ item.description }}</div>
| </template>
| </ListItemMeta>
| </ListItem>
| </template>
| </List>
| </CollapseContainer>
| </template>
| <script lang="ts">
| import { List, Switch } from 'ant-design-vue';
| import { defineComponent } from 'vue';
| import { CollapseContainer } from '/@/components/Container/index';
|
| import { msgNotifyList } from './data';
|
| export default defineComponent({
| components: {
| CollapseContainer,
| List,
| ListItem: List.Item,
| ListItemMeta: List.Item.Meta,
| Switch,
| },
| setup() {
| return {
| list: msgNotifyList,
| };
| },
| });
| </script>
| <style lang="less" scoped>
| .extra {
| margin-top: 10px;
| margin-right: 30px;
| float: right;
| }
| </style>
|
|