data.ts 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. import { $t } from "@/plugins/i18n";
  2. export interface ListItem {
  3. avatar: string;
  4. title: string;
  5. datetime: string;
  6. type: string;
  7. description: string;
  8. status?: "primary" | "success" | "warning" | "info" | "danger";
  9. extra?: string;
  10. }
  11. export interface TabItem {
  12. key: string;
  13. name: string;
  14. list: ListItem[];
  15. emptyText: string;
  16. }
  17. export const noticesData: TabItem[] = [
  18. {
  19. key: "1",
  20. name: $t("status.pureNotify"),
  21. list: [],
  22. emptyText: $t("status.pureNoNotify")
  23. },
  24. {
  25. key: "2",
  26. name: $t("status.pureMessage"),
  27. list: [
  28. {
  29. avatar: "https://xiaoxian521.github.io/hyperlink/svg/smile1.svg",
  30. title: "小铭 评论了你",
  31. description: "诚在于心,信在于行,诚信在于心行合一。",
  32. datetime: "今天",
  33. type: "2"
  34. },
  35. {
  36. avatar: "https://xiaoxian521.github.io/hyperlink/svg/smile2.svg",
  37. title: "李白 回复了你",
  38. description: "长风破浪会有时,直挂云帆济沧海。",
  39. datetime: "昨天",
  40. type: "2"
  41. },
  42. {
  43. avatar: "https://xiaoxian521.github.io/hyperlink/svg/smile5.svg",
  44. title: "标题",
  45. description:
  46. "请将鼠标移动到此处,以便测试超长的消息在此处将如何处理。本例中设置的描述最大行数为2,超过2行的描述内容将被省略并且可以通过tooltip查看完整内容",
  47. datetime: "时间",
  48. type: "2"
  49. }
  50. ],
  51. emptyText: $t("status.pureNoMessage")
  52. },
  53. {
  54. key: "3",
  55. name: $t("status.pureTodo"),
  56. list: [
  57. {
  58. avatar: "",
  59. title: "第三方紧急代码变更",
  60. description:
  61. "小林提交于 2024-05-10,需在 2024-05-11 前完成代码变更任务",
  62. datetime: "",
  63. extra: "马上到期",
  64. status: "danger",
  65. type: "3"
  66. },
  67. {
  68. avatar: "",
  69. title: "版本发布",
  70. description: "指派小铭于 2024-06-18 前完成更新并发布",
  71. datetime: "",
  72. extra: "已耗时 8 天",
  73. status: "warning",
  74. type: "3"
  75. },
  76. {
  77. avatar: "",
  78. title: "新功能开发",
  79. description: "开发多租户管理",
  80. datetime: "",
  81. extra: "进行中",
  82. type: "3"
  83. },
  84. {
  85. avatar: "",
  86. title: "任务名称",
  87. description: "任务需要在 2030-10-30 10:00 前启动",
  88. datetime: "",
  89. extra: "未开始",
  90. status: "info",
  91. type: "3"
  92. }
  93. ],
  94. emptyText: $t("status.pureNoTodo")
  95. }
  96. ];