| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687 |
- // 文件夹标签页效果
- .folder-tab {
- position: relative;
- height: 28rpx;
- margin-bottom: -10rpx;
- z-index: 10;
- .tab-base-line {
- position: absolute;
- bottom: 0;
- left: 0;
- right: 0;
- height: 12rpx;
- z-index: 1;
- &.orange {
- background: #fbb580;
- }
- &.gray {
- background: #ccc;
- }
- }
- // 上层:左侧梯形白色区域
- .tab-trapezoid {
- position: absolute;
- bottom: 0;
- left: 0;
- width: 125rpx;
- height: 24rpx;
- background: #fff;
- z-index: 3;
- border-left: 1rpx solid #e1e2e3;
- border-right: 1rpx solid #e1e2e3;
- border-top: 1rpx solid #e1e2e3;
- // 梯形效果 - 更明显的斜切
- clip-path: polygon(0 100%, 0 0, 80% 0, 100% 100%);
- // 梯形内的彩色线
- .tab-inner-line {
- position: absolute;
- bottom: 0;
- left: 30%;
- transform: translateX(-30%);
- height: 8rpx;
- border-radius: 6rpx;
- width: 60%;
- &.orange {
- background: #fbb580;
- }
- &.gray {
- background: #dbdde4;
- }
- }
- }
- // 右侧:二分之一高度的线
- .tab-right-line {
- position: absolute;
- bottom: 0;
- right: 0;
- width: 100%;
- height: 14rpx;
- z-index: 2;
- border-radius:0 999rpx 999rpx 0;
- border-top: 1rpx solid #e1e2e3;
- border-right: 1rpx solid #e1e2e3;
- &.orange {
- background: #fbb580;
- }
- &.gray {
- background: #dbdde4;
- }
- }
- }
- // 容器样式
- .draft-container,
- .folder-container {
- position: relative;
- }
- .todo-page {
- height: 100vh; // 固定高度
- background: #f5f5f5;
- padding-bottom: 120rpx; // 为tabbar留出空间
- box-sizing: border-box;
- display: flex;
- flex-direction: column;
- }
- .todo-container {
- flex: 1; // 使用 flex 布局
- width: 100%;
- box-sizing: border-box;
- // 限制滚动行为
- overflow-y: auto;
- }
- .todo-content {
- padding: 20rpx;
- // 确保内容高度不超过容器
- max-height: 100%;
- box-sizing: border-box;
- }
- // 草稿箱样式
- .draft-section {
- background: #fff;
- border: 1rpx solid #e1e2e3;
- border-right: none;
- border-radius: 6rpx;
- margin-bottom: 20rpx;
- overflow: hidden;
- box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1);
- position: relative;
- // 左滑状态时,右侧线条不显示圆角
- .draft-item-wrapper.swiped .draft-item::after {
- border-radius: 0 !important;
- }
- }
- .draft-header {
- height: 56rpx;
- display: flex;
- justify-content: space-between;
- align-items: center;
- padding: 30rpx 12rpx 20rpx 30rpx;
- border-bottom: 1rpx solid #f0f0f0;
- position: relative;
- // 草稿箱标题右侧橙色线
- &::after {
- content: '';
- position: absolute;
- right: 0;
- top: 0;
- bottom: 0;
- width: 12rpx;
- background: #fbb580;
- border-radius:0 999rpx 6rpx 0;
- }
- .draft-title {
- display: flex;
- align-items: center;
- .title-text {
- margin-left: 16rpx;
- font-size: 34rpx;
- font-weight: 600;
- color: #000;
- }
- }
- .count-badge {
- font-family: 'SSXinYiTi' !important;
- font-size: 76rpx !important;
- width: 104rpx;
- text-align: center;
- box-sizing: border-box;
- line-height: 1;
- font-weight: normal !important;
- color: #dddfe6;
- // padding-left: 20rpx;
- border-left: 2rpx solid #d8dae1;
- }
- }
- .draft-content {
- .draft-item-wrapper {
- position: relative;
- overflow: hidden;
- width: 100%;
- box-sizing: border-box;
- // 当有swiped状态时,显示操作按钮
- &.swiped {
- .draft-item {
- transform: translateX(-200rpx);
- &::after {
- // 线移动到操作按钮左边缘(内容移动-200rpx,线移动到按钮左边)
- right: 0rpx;
- transform: none;
- }
- }
- .swipe-actions {
- transform: translateX(0);
- }
- }
- .draft-item {
- height: 97rpx;
- display: flex;
- align-items: center;
- padding: 0 12rpx 0 30rpx;
- border-bottom: 1rpx solid #f0f0f0;
- background: #fff;
- transition: transform 0.3s ease;
- position: relative;
- width: 100%;
- box-sizing: border-box;
- &:last-child {
- border-bottom: none;
- }
- // 右侧颜色线 - 跟着项目移动
- &::after {
- content: '';
- position: absolute;
- right: 0;
- top: 0;
- bottom: 0;
- width: 12rpx;
- border-radius: 0 6rpx 6rpx 0;
- background: #dbdde4; // 默认灰色
- transition: all 0.3s ease;
- z-index: 2;
- }
- // 有操作时显示橙色
- &.has-actions::after {
- background: #fbb580;
- }
- .draft-icon {
- margin-left: 20rpx;
- margin-right: 20rpx;
- .dot {
- width: 12rpx;
- height: 12rpx;
- border-radius: 50%;
- background: #666;
- }
- }
- .draft-title {
- flex: 1;
- font-size: 28rpx;
- color: #000;
- margin-right: 20rpx;
- // 限制最多两行
- display: -webkit-box;
- -webkit-box-orient: vertical;
- -webkit-line-clamp: 2;
- overflow: hidden;
- text-overflow: ellipsis;
- line-height: 34rpx;
- }
- .draft-time-wrapper {
- position: relative;
- // margin-right: 20rpx;
- width: 104rpx;
- text-align: center;
- // 虚线在时间左边
- &::before {
- content: '';
- position: absolute;
- left: 0rpx;
- top: 0;
- bottom: 0;
- width: 2rpx;
- background: linear-gradient(to bottom, #ddd 50%, transparent 50%);
- background-size: 2rpx 8rpx;
- }
- .draft-time {
- display: flex;
- flex-direction: column;
- align-items: center;
- font-size: 28rpx;
- color: #999;
- line-height: 34rpx;
- }
- }
- }
- .swipe-actions {
- position: absolute;
- right: 0;
- top: 0;
- bottom: 0;
- width: 200rpx;
- display: flex;
- transform: translateX(100%);
- transition: transform 0.3s ease;
- box-sizing: border-box;
- .action-btn {
- flex: 1;
- display: flex;
- align-items: center;
- justify-content: center;
- color: #fff;
- font-size: 24rpx;
- &.edit-btn {
- background: #007AFF;
- }
- &.delete-btn {
- background: #ff4757;
- }
- }
- }
- }
- }
- // 审核分组样式
- .approval-group {
- background: transparent;
- border-radius: 6rpx;
- margin-bottom: 20rpx;
- overflow: hidden;
- box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1);
- }
- // 文件夹样式(多级)
- .folder-item {
- position: relative;
- border: 1rpx solid #e1e2e3;
- border-right: none;
- // 左滑状态时,右侧线条不显示圆角
- .sub-item-wrapper.swiped .sub-item::after {
- border-radius: 0 !important;
- }
-
- .folder-header {
- display: flex;
- justify-content: space-between;
- align-items: center;
- padding: 30rpx 12rpx 20rpx 30rpx;
- border-bottom: 1rpx solid #f0f0f0;
- height: 56rpx;
- background: #fff;
- position: relative;
- // 文件夹标题右侧灰色线
- &::after {
- content: '';
- position: absolute;
- right: 0;
- top: 0;
- bottom: 0;
- width: 12rpx;
- background: #dbdde4;
- border-radius:0 6rpx 6rpx 0;
- }
- .folder-title {
- display: flex;
- align-items: center;
- .title-text {
- margin-left: 16rpx;
- font-size: 32rpx;
- font-weight: 600;
- color: #333;
- }
- }
- .count-badge {
- width: 104rpx;
- text-align: center;
- box-sizing: border-box;
- font-family: 'SSXinYiTi', sans-serif;
- font-size: 76rpx;
- line-height: 1;
- color: #dddfe6;
- // padding-left: 20rpx;
- border-left: 2rpx solid #d8dae1;
- }
- }
- .folder-content {
- background: #f8f9fa;
- .sub-item-wrapper {
- position: relative;
- overflow: hidden;
- width: 100%;
- box-sizing: border-box;
- // 当有swiped状态时,显示操作按钮
- &.swiped {
- .sub-item {
- transform: translateX(-200rpx);
- &::after {
- // 线移动到操作按钮左边缘
- right: 0rpx;
- transform: none;
- }
- }
- .swipe-actions {
- transform: translateX(0);
- }
- }
- .sub-item {
- display: flex;
- align-items: center;
- height: 97rpx;
- padding: 0 12rpx 0 30rpx;
- border-bottom: 1rpx solid #e9ecef;
- background: #fff;
- transition: transform 0.3s ease;
- position: relative;
- width: 100%;
- box-sizing: border-box;
- &:last-child {
- border-bottom: none;
- }
- // 右侧颜色线 - 跟着项目移动
- &::after {
- content: '';
- position: absolute;
- right: 0;
- top: 0;
- bottom: 0;
- width: 12rpx;
- background: #dbdde4; // 默认灰色
- transition: all 0.3s ease;
- border-radius: 0 6rpx 6rpx 0;
- }
- // 有操作时显示蓝色
- &.has-actions::after {
- background: #6b9ce0;
- }
- .sub-icon {
- margin-left: 20rpx;
- margin-right: 20rpx;
- .dot {
- width: 12rpx;
- height: 12rpx;
- border-radius: 50%;
- background: #666;
- }
- }
- .sub-title {
- flex: 1;
- font-size: 28rpx;
- color: #000;
- margin-right: 20rpx;
- // 限制最多两行
- display: -webkit-box;
- -webkit-box-orient: vertical;
- -webkit-line-clamp: 2;
- overflow: hidden;
- text-overflow: ellipsis;
- line-height: 34rpx;
- }
- .sub-time-wrapper {
- position: relative;
- // margin-right: 20rpx;
- width: 104rpx;
- text-align: center;
- // 虚线在时间左边
- &::before {
- content: '';
- position: absolute;
- left: 0rpx;
- top: 0;
- bottom: 0;
- width: 2rpx;
- background: linear-gradient(to bottom, #ddd 50%, transparent 50%);
- background-size: 2rpx 8rpx;
- }
- .sub-time {
- display: flex;
- flex-direction: column;
- align-items: center;
- font-size: 28rpx;
- color: #999;
- line-height: 34rpx;
- }
- }
- }
- .swipe-actions {
- position: absolute;
- right: 0;
- top: 0;
- bottom: 0;
- width: 200rpx;
- display: flex;
- transform: translateX(100%);
- transition: transform 0.3s ease;
- .action-btn {
- flex: 1;
- display: flex;
- align-items: center;
- justify-content: center;
- color: #fff;
- font-size: 24rpx;
- background: #007AFF;
- }
- }
- }
- }
- }
- // 文件样式(单级)
- .file-item {
- // 左滑状态时,右侧线条不显示圆角
- .file-item-wrapper.swiped .file-content::after {
- border-radius: 0 !important;
- }
- .file-item-wrapper {
- position: relative;
- overflow: hidden;
- width: 100%;
- box-sizing: border-box;
- // 当有swiped状态时,显示操作按钮
- &.swiped {
- .file-content {
- transform: translateX(-200rpx);
- &::after {
- // 线移动到操作按钮左边缘
- right: 0rpx;
- transform: none;
- }
- }
- .swipe-actions {
- transform: translateX(0);
- }
- }
- .file-content {
- display: flex;
- align-items: center;
- height: 97rpx;
- padding: 0 12rpx 0 30rpx;
- background: #fff;
- transition: transform 0.3s ease;
- position: relative;
- width: 100%;
- box-sizing: border-box;
- // 右侧颜色线 - 跟着项目移动
- &::after {
- content: '';
- position: absolute;
- right: 0;
- top: 0;
- bottom: 0;
- width: 12rpx;
- background: #dbdde4; // 默认灰色
- transition: all 0.3s ease;
- border-radius: 0 6rpx 6rpx 0;
- }
- // 有操作时显示蓝色
- &.has-actions::after {
- background: #6b9ce0;
- }
- .file-icon {
- // margin-left: 20rpx;
- margin-right: 24rpx;
- display: flex;
- align-items: center;
- }
- .file-title {
- flex: 1;
- font-size: 28rpx;
- color: #000;
- margin-right: 20rpx;
- // 限制最多两行
- display: -webkit-box;
- -webkit-box-orient: vertical;
- -webkit-line-clamp: 2;
- overflow: hidden;
- text-overflow: ellipsis;
- line-height: 34rpx;
- }
- .file-time-wrapper {
- position: relative;
- // margin-right: 20rpx;
- width: 104rpx;
- text-align: center;
- // 虚线在时间左边
- &::before {
- content: '';
- position: absolute;
- left: 0rpx;
- top: 0;
- bottom: 0;
- width: 2rpx;
- background: linear-gradient(to bottom, #ddd 50%, transparent 50%);
- background-size: 2rpx 8rpx;
- }
- .file-time {
- display: flex;
- flex-direction: column;
- align-items: center;
- font-size: 28rpx;
- color: #999;
- line-height: 34rpx;
- }
- }
- }
- .swipe-actions {
- position: absolute;
- right: 0;
- top: 0;
- bottom: 0;
- width: 200rpx;
- display: flex;
- transform: translateX(100%);
- transition: transform 0.3s ease;
- .action-btn {
- flex: 1;
- display: flex;
- align-items: center;
- justify-content: center;
- color: #fff;
- font-size: 28rpx;
- background: #007AFF;
- }
- }
- }
- }
- // 这些样式已经在上面的具体组件中定义,删除重复代码
- // 旧的 todo-item 样式已删除,现在使用更具体的 draft-item、sub-item、file-content 样式
- .empty-state {
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- padding: 120rpx 40rpx;
- .empty-text {
- margin-top: 32rpx;
- font-size: 28rpx;
- color: #999;
- }
- }
|