todo_list.scss 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687
  1. // 文件夹标签页效果
  2. .folder-tab {
  3. position: relative;
  4. height: 28rpx;
  5. margin-bottom: -10rpx;
  6. z-index: 10;
  7. .tab-base-line {
  8. position: absolute;
  9. bottom: 0;
  10. left: 0;
  11. right: 0;
  12. height: 12rpx;
  13. z-index: 1;
  14. &.orange {
  15. background: #fbb580;
  16. }
  17. &.gray {
  18. background: #ccc;
  19. }
  20. }
  21. // 上层:左侧梯形白色区域
  22. .tab-trapezoid {
  23. position: absolute;
  24. bottom: 0;
  25. left: 0;
  26. width: 125rpx;
  27. height: 24rpx;
  28. background: #fff;
  29. z-index: 3;
  30. border-left: 1rpx solid #e1e2e3;
  31. border-right: 1rpx solid #e1e2e3;
  32. border-top: 1rpx solid #e1e2e3;
  33. // 梯形效果 - 更明显的斜切
  34. clip-path: polygon(0 100%, 0 0, 80% 0, 100% 100%);
  35. // 梯形内的彩色线
  36. .tab-inner-line {
  37. position: absolute;
  38. bottom: 0;
  39. left: 30%;
  40. transform: translateX(-30%);
  41. height: 8rpx;
  42. border-radius: 6rpx;
  43. width: 60%;
  44. &.orange {
  45. background: #fbb580;
  46. }
  47. &.gray {
  48. background: #dbdde4;
  49. }
  50. }
  51. }
  52. // 右侧:二分之一高度的线
  53. .tab-right-line {
  54. position: absolute;
  55. bottom: 0;
  56. right: 0;
  57. width: 100%;
  58. height: 14rpx;
  59. z-index: 2;
  60. border-radius:0 999rpx 999rpx 0;
  61. border-top: 1rpx solid #e1e2e3;
  62. border-right: 1rpx solid #e1e2e3;
  63. &.orange {
  64. background: #fbb580;
  65. }
  66. &.gray {
  67. background: #dbdde4;
  68. }
  69. }
  70. }
  71. // 容器样式
  72. .draft-container,
  73. .folder-container {
  74. position: relative;
  75. }
  76. .todo-page {
  77. height: 100vh; // 固定高度
  78. background: #f5f5f5;
  79. padding-bottom: 120rpx; // 为tabbar留出空间
  80. box-sizing: border-box;
  81. display: flex;
  82. flex-direction: column;
  83. }
  84. .todo-container {
  85. flex: 1; // 使用 flex 布局
  86. width: 100%;
  87. box-sizing: border-box;
  88. // 限制滚动行为
  89. overflow-y: auto;
  90. }
  91. .todo-content {
  92. padding: 20rpx;
  93. // 确保内容高度不超过容器
  94. max-height: 100%;
  95. box-sizing: border-box;
  96. }
  97. // 草稿箱样式
  98. .draft-section {
  99. background: #fff;
  100. border: 1rpx solid #e1e2e3;
  101. border-right: none;
  102. border-radius: 6rpx;
  103. margin-bottom: 20rpx;
  104. overflow: hidden;
  105. box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1);
  106. position: relative;
  107. // 左滑状态时,右侧线条不显示圆角
  108. .draft-item-wrapper.swiped .draft-item::after {
  109. border-radius: 0 !important;
  110. }
  111. }
  112. .draft-header {
  113. height: 56rpx;
  114. display: flex;
  115. justify-content: space-between;
  116. align-items: center;
  117. padding: 30rpx 12rpx 20rpx 30rpx;
  118. border-bottom: 1rpx solid #f0f0f0;
  119. position: relative;
  120. // 草稿箱标题右侧橙色线
  121. &::after {
  122. content: '';
  123. position: absolute;
  124. right: 0;
  125. top: 0;
  126. bottom: 0;
  127. width: 12rpx;
  128. background: #fbb580;
  129. border-radius:0 999rpx 6rpx 0;
  130. }
  131. .draft-title {
  132. display: flex;
  133. align-items: center;
  134. .title-text {
  135. margin-left: 16rpx;
  136. font-size: 34rpx;
  137. font-weight: 600;
  138. color: #000;
  139. }
  140. }
  141. .count-badge {
  142. font-family: 'SSXinYiTi' !important;
  143. font-size: 76rpx !important;
  144. width: 104rpx;
  145. text-align: center;
  146. box-sizing: border-box;
  147. line-height: 1;
  148. font-weight: normal !important;
  149. color: #dddfe6;
  150. // padding-left: 20rpx;
  151. border-left: 2rpx solid #d8dae1;
  152. }
  153. }
  154. .draft-content {
  155. .draft-item-wrapper {
  156. position: relative;
  157. overflow: hidden;
  158. width: 100%;
  159. box-sizing: border-box;
  160. // 当有swiped状态时,显示操作按钮
  161. &.swiped {
  162. .draft-item {
  163. transform: translateX(-200rpx);
  164. &::after {
  165. // 线移动到操作按钮左边缘(内容移动-200rpx,线移动到按钮左边)
  166. right: 0rpx;
  167. transform: none;
  168. }
  169. }
  170. .swipe-actions {
  171. transform: translateX(0);
  172. }
  173. }
  174. .draft-item {
  175. height: 97rpx;
  176. display: flex;
  177. align-items: center;
  178. padding: 0 12rpx 0 30rpx;
  179. border-bottom: 1rpx solid #f0f0f0;
  180. background: #fff;
  181. transition: transform 0.3s ease;
  182. position: relative;
  183. width: 100%;
  184. box-sizing: border-box;
  185. &:last-child {
  186. border-bottom: none;
  187. }
  188. // 右侧颜色线 - 跟着项目移动
  189. &::after {
  190. content: '';
  191. position: absolute;
  192. right: 0;
  193. top: 0;
  194. bottom: 0;
  195. width: 12rpx;
  196. border-radius: 0 6rpx 6rpx 0;
  197. background: #dbdde4; // 默认灰色
  198. transition: all 0.3s ease;
  199. z-index: 2;
  200. }
  201. // 有操作时显示橙色
  202. &.has-actions::after {
  203. background: #fbb580;
  204. }
  205. .draft-icon {
  206. margin-left: 20rpx;
  207. margin-right: 20rpx;
  208. .dot {
  209. width: 12rpx;
  210. height: 12rpx;
  211. border-radius: 50%;
  212. background: #666;
  213. }
  214. }
  215. .draft-title {
  216. flex: 1;
  217. font-size: 28rpx;
  218. color: #000;
  219. margin-right: 20rpx;
  220. // 限制最多两行
  221. display: -webkit-box;
  222. -webkit-box-orient: vertical;
  223. -webkit-line-clamp: 2;
  224. overflow: hidden;
  225. text-overflow: ellipsis;
  226. line-height: 34rpx;
  227. }
  228. .draft-time-wrapper {
  229. position: relative;
  230. // margin-right: 20rpx;
  231. width: 104rpx;
  232. text-align: center;
  233. // 虚线在时间左边
  234. &::before {
  235. content: '';
  236. position: absolute;
  237. left: 0rpx;
  238. top: 0;
  239. bottom: 0;
  240. width: 2rpx;
  241. background: linear-gradient(to bottom, #ddd 50%, transparent 50%);
  242. background-size: 2rpx 8rpx;
  243. }
  244. .draft-time {
  245. display: flex;
  246. flex-direction: column;
  247. align-items: center;
  248. font-size: 28rpx;
  249. color: #999;
  250. line-height: 34rpx;
  251. }
  252. }
  253. }
  254. .swipe-actions {
  255. position: absolute;
  256. right: 0;
  257. top: 0;
  258. bottom: 0;
  259. width: 200rpx;
  260. display: flex;
  261. transform: translateX(100%);
  262. transition: transform 0.3s ease;
  263. box-sizing: border-box;
  264. .action-btn {
  265. flex: 1;
  266. display: flex;
  267. align-items: center;
  268. justify-content: center;
  269. color: #fff;
  270. font-size: 24rpx;
  271. &.edit-btn {
  272. background: #007AFF;
  273. }
  274. &.delete-btn {
  275. background: #ff4757;
  276. }
  277. }
  278. }
  279. }
  280. }
  281. // 审核分组样式
  282. .approval-group {
  283. background: transparent;
  284. border-radius: 6rpx;
  285. margin-bottom: 20rpx;
  286. overflow: hidden;
  287. box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1);
  288. }
  289. // 文件夹样式(多级)
  290. .folder-item {
  291. position: relative;
  292. border: 1rpx solid #e1e2e3;
  293. border-right: none;
  294. // 左滑状态时,右侧线条不显示圆角
  295. .sub-item-wrapper.swiped .sub-item::after {
  296. border-radius: 0 !important;
  297. }
  298. .folder-header {
  299. display: flex;
  300. justify-content: space-between;
  301. align-items: center;
  302. padding: 30rpx 12rpx 20rpx 30rpx;
  303. border-bottom: 1rpx solid #f0f0f0;
  304. height: 56rpx;
  305. background: #fff;
  306. position: relative;
  307. // 文件夹标题右侧灰色线
  308. &::after {
  309. content: '';
  310. position: absolute;
  311. right: 0;
  312. top: 0;
  313. bottom: 0;
  314. width: 12rpx;
  315. background: #dbdde4;
  316. border-radius:0 6rpx 6rpx 0;
  317. }
  318. .folder-title {
  319. display: flex;
  320. align-items: center;
  321. .title-text {
  322. margin-left: 16rpx;
  323. font-size: 32rpx;
  324. font-weight: 600;
  325. color: #333;
  326. }
  327. }
  328. .count-badge {
  329. width: 104rpx;
  330. text-align: center;
  331. box-sizing: border-box;
  332. font-family: 'SSXinYiTi', sans-serif;
  333. font-size: 76rpx;
  334. line-height: 1;
  335. color: #dddfe6;
  336. // padding-left: 20rpx;
  337. border-left: 2rpx solid #d8dae1;
  338. }
  339. }
  340. .folder-content {
  341. background: #f8f9fa;
  342. .sub-item-wrapper {
  343. position: relative;
  344. overflow: hidden;
  345. width: 100%;
  346. box-sizing: border-box;
  347. // 当有swiped状态时,显示操作按钮
  348. &.swiped {
  349. .sub-item {
  350. transform: translateX(-200rpx);
  351. &::after {
  352. // 线移动到操作按钮左边缘
  353. right: 0rpx;
  354. transform: none;
  355. }
  356. }
  357. .swipe-actions {
  358. transform: translateX(0);
  359. }
  360. }
  361. .sub-item {
  362. display: flex;
  363. align-items: center;
  364. height: 97rpx;
  365. padding: 0 12rpx 0 30rpx;
  366. border-bottom: 1rpx solid #e9ecef;
  367. background: #fff;
  368. transition: transform 0.3s ease;
  369. position: relative;
  370. width: 100%;
  371. box-sizing: border-box;
  372. &:last-child {
  373. border-bottom: none;
  374. }
  375. // 右侧颜色线 - 跟着项目移动
  376. &::after {
  377. content: '';
  378. position: absolute;
  379. right: 0;
  380. top: 0;
  381. bottom: 0;
  382. width: 12rpx;
  383. background: #dbdde4; // 默认灰色
  384. transition: all 0.3s ease;
  385. border-radius: 0 6rpx 6rpx 0;
  386. }
  387. // 有操作时显示蓝色
  388. &.has-actions::after {
  389. background: #6b9ce0;
  390. }
  391. .sub-icon {
  392. margin-left: 20rpx;
  393. margin-right: 20rpx;
  394. .dot {
  395. width: 12rpx;
  396. height: 12rpx;
  397. border-radius: 50%;
  398. background: #666;
  399. }
  400. }
  401. .sub-title {
  402. flex: 1;
  403. font-size: 28rpx;
  404. color: #000;
  405. margin-right: 20rpx;
  406. // 限制最多两行
  407. display: -webkit-box;
  408. -webkit-box-orient: vertical;
  409. -webkit-line-clamp: 2;
  410. overflow: hidden;
  411. text-overflow: ellipsis;
  412. line-height: 34rpx;
  413. }
  414. .sub-time-wrapper {
  415. position: relative;
  416. // margin-right: 20rpx;
  417. width: 104rpx;
  418. text-align: center;
  419. // 虚线在时间左边
  420. &::before {
  421. content: '';
  422. position: absolute;
  423. left: 0rpx;
  424. top: 0;
  425. bottom: 0;
  426. width: 2rpx;
  427. background: linear-gradient(to bottom, #ddd 50%, transparent 50%);
  428. background-size: 2rpx 8rpx;
  429. }
  430. .sub-time {
  431. display: flex;
  432. flex-direction: column;
  433. align-items: center;
  434. font-size: 28rpx;
  435. color: #999;
  436. line-height: 34rpx;
  437. }
  438. }
  439. }
  440. .swipe-actions {
  441. position: absolute;
  442. right: 0;
  443. top: 0;
  444. bottom: 0;
  445. width: 200rpx;
  446. display: flex;
  447. transform: translateX(100%);
  448. transition: transform 0.3s ease;
  449. .action-btn {
  450. flex: 1;
  451. display: flex;
  452. align-items: center;
  453. justify-content: center;
  454. color: #fff;
  455. font-size: 24rpx;
  456. background: #007AFF;
  457. }
  458. }
  459. }
  460. }
  461. }
  462. // 文件样式(单级)
  463. .file-item {
  464. // 左滑状态时,右侧线条不显示圆角
  465. .file-item-wrapper.swiped .file-content::after {
  466. border-radius: 0 !important;
  467. }
  468. .file-item-wrapper {
  469. position: relative;
  470. overflow: hidden;
  471. width: 100%;
  472. box-sizing: border-box;
  473. // 当有swiped状态时,显示操作按钮
  474. &.swiped {
  475. .file-content {
  476. transform: translateX(-200rpx);
  477. &::after {
  478. // 线移动到操作按钮左边缘
  479. right: 0rpx;
  480. transform: none;
  481. }
  482. }
  483. .swipe-actions {
  484. transform: translateX(0);
  485. }
  486. }
  487. .file-content {
  488. display: flex;
  489. align-items: center;
  490. height: 97rpx;
  491. padding: 0 12rpx 0 30rpx;
  492. background: #fff;
  493. transition: transform 0.3s ease;
  494. position: relative;
  495. width: 100%;
  496. box-sizing: border-box;
  497. // 右侧颜色线 - 跟着项目移动
  498. &::after {
  499. content: '';
  500. position: absolute;
  501. right: 0;
  502. top: 0;
  503. bottom: 0;
  504. width: 12rpx;
  505. background: #dbdde4; // 默认灰色
  506. transition: all 0.3s ease;
  507. border-radius: 0 6rpx 6rpx 0;
  508. }
  509. // 有操作时显示蓝色
  510. &.has-actions::after {
  511. background: #6b9ce0;
  512. }
  513. .file-icon {
  514. // margin-left: 20rpx;
  515. margin-right: 24rpx;
  516. display: flex;
  517. align-items: center;
  518. }
  519. .file-title {
  520. flex: 1;
  521. font-size: 28rpx;
  522. color: #000;
  523. margin-right: 20rpx;
  524. // 限制最多两行
  525. display: -webkit-box;
  526. -webkit-box-orient: vertical;
  527. -webkit-line-clamp: 2;
  528. overflow: hidden;
  529. text-overflow: ellipsis;
  530. line-height: 34rpx;
  531. }
  532. .file-time-wrapper {
  533. position: relative;
  534. // margin-right: 20rpx;
  535. width: 104rpx;
  536. text-align: center;
  537. // 虚线在时间左边
  538. &::before {
  539. content: '';
  540. position: absolute;
  541. left: 0rpx;
  542. top: 0;
  543. bottom: 0;
  544. width: 2rpx;
  545. background: linear-gradient(to bottom, #ddd 50%, transparent 50%);
  546. background-size: 2rpx 8rpx;
  547. }
  548. .file-time {
  549. display: flex;
  550. flex-direction: column;
  551. align-items: center;
  552. font-size: 28rpx;
  553. color: #999;
  554. line-height: 34rpx;
  555. }
  556. }
  557. }
  558. .swipe-actions {
  559. position: absolute;
  560. right: 0;
  561. top: 0;
  562. bottom: 0;
  563. width: 200rpx;
  564. display: flex;
  565. transform: translateX(100%);
  566. transition: transform 0.3s ease;
  567. .action-btn {
  568. flex: 1;
  569. display: flex;
  570. align-items: center;
  571. justify-content: center;
  572. color: #fff;
  573. font-size: 28rpx;
  574. background: #007AFF;
  575. }
  576. }
  577. }
  578. }
  579. // 这些样式已经在上面的具体组件中定义,删除重复代码
  580. // 旧的 todo-item 样式已删除,现在使用更具体的 draft-item、sub-item、file-content 样式
  581. .empty-state {
  582. display: flex;
  583. flex-direction: column;
  584. align-items: center;
  585. justify-content: center;
  586. padding: 120rpx 40rpx;
  587. .empty-text {
  588. margin-top: 32rpx;
  589. font-size: 28rpx;
  590. color: #999;
  591. }
  592. }