recycle.vue 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. <template>
  2. <view class="recycle-container">
  3. <view class="recycle-title">回收站</view>
  4. <view v-if="items.length === 0" class="empty-box">
  5. <image src="/static/logo.png" class="empty-img" />
  6. <view class="empty-tip">暂无已删除内容</view>
  7. </view>
  8. <view v-else class="recycle-list">
  9. <view class="recycle-item" v-for="item in items" :key="item.id">
  10. <image :src="item.icon" class="item-icon" />
  11. <view class="item-info">
  12. <view class="item-title">{{ item.title }}</view>
  13. <view class="item-desc">{{ item.desc }}</view>
  14. </view>
  15. <button class="restore-btn">还原</button>
  16. </view>
  17. </view>
  18. </view>
  19. </template>
  20. <script>
  21. export default {
  22. data() {
  23. return {
  24. items: [] // 可模拟 [{id:1,title:'文档A',desc:'2024-06-01删除',icon:'/static/logo.png'}]
  25. }
  26. }
  27. }
  28. </script>
  29. <style lang="scss">
  30. .recycle-container {
  31. min-height: 100vh;
  32. background: #f7f8fa;
  33. padding-bottom: 120rpx;
  34. }
  35. .recycle-title {
  36. text-align: center;
  37. font-size: 36rpx;
  38. font-weight: bold;
  39. color: #222;
  40. padding: 48rpx 0 32rpx 0;
  41. }
  42. .empty-box {
  43. display: flex;
  44. flex-direction: column;
  45. align-items: center;
  46. margin-top: 120rpx;
  47. }
  48. .empty-img {
  49. width: 160rpx;
  50. height: 160rpx;
  51. margin-bottom: 32rpx;
  52. opacity: 0.7;
  53. }
  54. .empty-tip {
  55. color: #bbb;
  56. font-size: 28rpx;
  57. }
  58. .recycle-list {
  59. margin: 0 24rpx;
  60. }
  61. .recycle-item {
  62. display: flex;
  63. align-items: center;
  64. background: #fff;
  65. border-radius: 16rpx;
  66. box-shadow: 0 4rpx 16rpx rgba(0,0,0,0.04);
  67. padding: 24rpx;
  68. margin-bottom: 24rpx;
  69. }
  70. .item-icon {
  71. width: 64rpx;
  72. height: 64rpx;
  73. margin-right: 24rpx;
  74. }
  75. .item-info {
  76. flex: 1;
  77. }
  78. .item-title {
  79. font-size: 30rpx;
  80. color: #222;
  81. font-weight: 600;
  82. }
  83. .item-desc {
  84. font-size: 24rpx;
  85. color: #888;
  86. margin-top: 8rpx;
  87. }
  88. .restore-btn {
  89. background: #409EFF;
  90. color: #fff;
  91. border-radius: 10rpx;
  92. font-size: 26rpx;
  93. padding: 12rpx 28rpx;
  94. }
  95. </style>