MsgNotify.vue 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <template>
  2. <CollapseContainer title="新消息通知" :canExpan="false">
  3. <List>
  4. <template v-for="item in list" :key="item.key">
  5. <ListItem>
  6. <ListItemMeta>
  7. <template #title>
  8. {{ item.title }}
  9. <Switch
  10. class="extra"
  11. checked-children="开"
  12. un-checked-children="关"
  13. default-checked
  14. />
  15. </template>
  16. <template #description>
  17. <div>{{ item.description }}</div>
  18. </template>
  19. </ListItemMeta>
  20. </ListItem>
  21. </template>
  22. </List>
  23. </CollapseContainer>
  24. </template>
  25. <script lang="ts">
  26. import { List, Switch } from 'ant-design-vue';
  27. import { defineComponent } from 'vue';
  28. import { CollapseContainer } from '/@/components/Container/index';
  29. import { msgNotifyList } from './data';
  30. export default defineComponent({
  31. components: {
  32. CollapseContainer,
  33. List,
  34. ListItem: List.Item,
  35. ListItemMeta: List.Item.Meta,
  36. Switch,
  37. },
  38. setup() {
  39. return {
  40. list: msgNotifyList,
  41. };
  42. },
  43. });
  44. </script>
  45. <style lang="less" scoped>
  46. .extra {
  47. float: right;
  48. margin-top: 10px;
  49. margin-right: 30px;
  50. }
  51. </style>