Skip to content

Commit 31ffa13

Browse files
committed
feat(team): refine mobile workspace experience
1 parent f016a61 commit 31ffa13

15 files changed

Lines changed: 514 additions & 34 deletions

File tree

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
# 团队平台移动端导航准则
2+
3+
> 状态:团队平台共享页面的响应式开发基线
4+
> 适用项目:`pvbb`
5+
> 适用范围:使用 `TeamHomeSidebar` 与现代工作台外壳的团队广场、公开主页、活动页和团队工作台
6+
> 整理日期:2026-08-02
7+
8+
## 1. 目标
9+
10+
桌面端的团队平台左侧栏同时承载平台发现入口、团队管理入口、成员团队入口和角色入口。移动端不得把这套长侧栏简单排到正文底部,也不应把数量不固定的团队列表压缩成固定底部导航。
11+
12+
移动端统一采用“左侧悬浮触发按钮 + 左侧侧滑抽屉”:
13+
14+
- 屏幕左侧边缘显示紧凑的悬浮触发按钮,并在页面滚动时保持可访问。
15+
- 触发按钮统一只显示团队导航图标,不展示当前团队 Logo、名称或其他团队身份信息。
16+
- 触发按钮只表达“打开团队导航”,团队上下文统一留在页面信息卡和抽屉内部呈现。
17+
- 点击触发按钮后,从左侧打开全高抽屉;原桌面侧栏的信息结构在抽屉中完整保留。
18+
- 选择入口、切换团队、点击遮罩或关闭按钮、按下 `Escape`、发生路由切换时均关闭抽屉。
19+
20+
## 2. 响应式边界
21+
22+
- `> 1100px`:桌面双栏,左侧工作台保持 `sticky`
23+
- `821px–1100px`:页面主体改为单列,侧栏内部可使用双列面板。
24+
- `<= 820px`:不再展示内联侧栏,改为左侧悬浮按钮和左侧抽屉。
25+
- 团队列表很多时只允许抽屉内部滚动,不得继续撑高正文。
26+
- 抽屉宽度使用视口宽度的约 `88%`,并设置合理最大宽度;必须处理顶部和底部安全区。
27+
28+
断点属于共享工作台合同。后续页面不得在自己的页面样式中再次改变侧栏的排列顺序或复制另一套移动导航。
29+
30+
## 3. 信息层级
31+
32+
抽屉继续沿用桌面端顺序:
33+
34+
1. 团队平台标识和关闭操作。
35+
2. 团队广场、团队活动等平台发现入口。
36+
3. 团队工作区。
37+
4. “团队管理”分组。
38+
5. “我的团队”分组。
39+
6. “我的角色”等跨平台入口。
40+
41+
管理身份和成员身份由现有路由表达:
42+
43+
- `/team/manage/org/:id`:管理视图。
44+
- `/team/my/org/:id`:成员视图。
45+
46+
移动适配不得新增 `mode` 查询参数,也不得在抽屉中重新实现团队权限判断。
47+
48+
## 4. 实现边界
49+
50+
- 共享数据加载、团队去重排序、当前团队判断和路由生成继续由 `src/components/team/org/team_home_sidebar.vue` 负责。
51+
- `src/pages/team/App.vue` 只负责现代工作台外壳,不为单个业务页面维护抽屉状态。
52+
- CSS 负责断点、定位、遮罩、位移、滚动、安全区和动效。
53+
- JavaScript 只负责开关状态、路由后关闭、`Escape` 关闭和页面滚动锁定。
54+
- 桌面端必须复用同一份导航 DOM 与数据,禁止复制一份独立的移动团队列表。
55+
- 新增团队平台共享页面时,应加入 `isModernWorkspace` 路由集合,从而继承统一外壳;不得在业务页面底部手工插入 `TeamHomeSidebar`
56+
57+
## 5. 交互与可访问性
58+
59+
- 触发器使用原生 `button`,提供“打开团队导航”的 `aria-label``aria-controls``aria-expanded`
60+
- 触发按钮固定在左侧垂直居中的安全位置,不占据正文布局高度,也不得遮挡公共页头的核心操作。
61+
- 遮罩和关闭按钮必须有清晰的关闭语义。
62+
- 所有可点击项保留 `:focus-visible` 状态。
63+
- 抽屉关闭时,其内部控件不得继续进入键盘焦点顺序。
64+
- 打开抽屉时锁定背景页面滚动;组件卸载时必须清理滚动锁。
65+
- 支持 `prefers-reduced-motion: reduce`,关闭位移动效。
66+
- 抽屉中的团队 Logo 加载失败时继续使用共享默认图,不因移动端结构增加另一套回退逻辑。
67+
68+
## 6. 验收清单
69+
70+
- 桌面端侧栏视觉、分组、展开逻辑和路由行为未发生回归。
71+
- `820px` 以下正文出现在团队长列表之前。
72+
- 左侧触发按钮只显示导航图标,不泄露或重复展示当前团队身份。
73+
- 抽屉能够通过触发器、遮罩、关闭按钮和 `Escape` 完整开关。
74+
- 点击团队广场、团队活动、团队条目或角色入口后抽屉关闭。
75+
- 管理团队与成员团队较多时,滚动限制在抽屉内部。
76+
- 抽屉打开时背景不可滚动,关闭和组件卸载后恢复。
77+
- iPhone 安全区、窄屏长团队名和失效 Logo 均没有遮挡或溢出。
78+
- 路由仍使用既有 `manage_my_org``view_my_org` 等名称,没有引入移动端专用业务路由。

docs/project/team/battle.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ item.boss_info?.is_rank_boss > 0 || Boolean(item.aid_info?.event_id)
146146
- 主提示:绑定战斗数据,用于展示在秘境百强榜。
147147
- 数据源:归属团队的所有团长上报数据。
148148
149-
两边提示条不可关闭,活动筛选开关位于右侧。战绩卡片统一展示首领、届数、成绩状态、团长、上报时间、上报来源、关联数据与关联操作。
149+
两边提示条不可关闭,并使用紧凑提示工具条:主说明、数据源和上报指南集中在左侧,活动筛选开关位于右侧;极窄屏下开关换行后保持左对齐,不居中占用大块纵向空间。战绩卡片统一展示首领、届数、成绩状态、团长、上报时间、上报来源、关联数据与关联操作。
150150
151151
## 7. 分页与后端待修边界
152152

docs/project/team/team.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@
4444

4545
应用外壳把 `index``view_my_org``manage_my_org``add_org` 等视为现代工作区;其它历史路由仍使用面包屑和 `Nav2.vue` 旧侧栏。
4646

47+
现代工作区的响应式导航统一遵循 [`docs/design/TEAM_MOBILE_NAVIGATION_GUIDE.md`](../../design/TEAM_MOBILE_NAVIGATION_GUIDE.md):桌面端保留共享左侧工作台,`820px` 以下使用纯图标左侧悬浮按钮和左侧侧滑抽屉;触发按钮不展示当前团队身份,也不得把完整侧栏排列到长正文底部或在业务页面复制移动端团队列表。
48+
4749
## 3. 核心入口与两种视图
4850

4951
### 3.1 团队广场

src/assets/css/team/app.less

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -160,14 +160,21 @@
160160
}
161161

162162
@media screen and (max-width: 820px) {
163-
.p-team .m-team-modern-shell__content {
163+
.p-team .m-team-modern-shell__sidebar {
164+
position: absolute;
165+
width: 0;
166+
height: 0;
164167
order: 1;
165168
}
166169

167-
.p-team .m-team-modern-shell__sidebar {
170+
.p-team .m-team-modern-shell__content {
168171
order: 2;
169172
}
170173
}
174+
175+
body.is-team-navigation-open {
176+
overflow: hidden;
177+
}
171178
@media screen and (max-width: @phone) {
172179
.p-team .m-main {
173180
padding: 10px 15px;
@@ -298,11 +305,8 @@
298305
font-size: 13px;
299306
font-weight: 600;
300307
line-height: 36px;
301-
transition:
302-
color 150ms cubic-bezier(0.2, 0, 0, 1),
303-
border-color 150ms cubic-bezier(0.2, 0, 0, 1),
304-
background-color 150ms cubic-bezier(0.2, 0, 0, 1),
305-
box-shadow 150ms cubic-bezier(0.2, 0, 0, 1);
308+
transition: color 150ms cubic-bezier(0.2, 0, 0, 1), border-color 150ms cubic-bezier(0.2, 0, 0, 1),
309+
background-color 150ms cubic-bezier(0.2, 0, 0, 1), box-shadow 150ms cubic-bezier(0.2, 0, 0, 1);
306310

307311
&:focus-visible {
308312
outline: none;

src/assets/css/team/battle/index.less

Lines changed: 44 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
.v-battle,
44
.m-team-view {
55
.m-battle-notice {
6+
align-items: flex-start;
67
margin-bottom: @team-space-3;
8+
padding: 14px 16px;
79
border: 1px solid #fde7b0;
810
border-radius: @team-radius-small;
911
background: #fffbeb;
@@ -15,6 +17,7 @@
1517
}
1618

1719
.el-alert__icon {
20+
margin-top: 2px;
1821
color: #f59e0b;
1922
}
2023

@@ -26,17 +29,28 @@
2629
}
2730

2831
.m-battle-notice__content {
29-
display: flex;
32+
display: grid;
3033
width: 100%;
3134
align-items: center;
32-
justify-content: space-between;
35+
grid-template-columns: minmax(0, 1fr) auto;
3336
gap: @team-space-3;
3437

3538
.u-notice-copy {
3639
display: flex;
3740
min-width: 0;
3841
flex-direction: column;
39-
gap: 2px;
42+
gap: 4px;
43+
44+
> span:first-child {
45+
line-height: 18px;
46+
}
47+
48+
.u-notice-meta {
49+
display: flex;
50+
align-items: center;
51+
flex-wrap: wrap;
52+
gap: 2px @team-space-2;
53+
}
4054

4155
small {
4256
color: #b7791f;
@@ -54,6 +68,10 @@
5468
}
5569
}
5670

71+
.el-switch {
72+
flex: none;
73+
}
74+
5775
.el-switch__label {
5876
color: @team-text-secondary;
5977
font-size: 12px;
@@ -66,9 +84,30 @@
6684
@media screen and (max-width: @phone) {
6785
.v-battle,
6886
.m-team-view {
87+
.m-battle-notice {
88+
padding: 12px;
89+
}
90+
6991
.m-battle-notice__content {
70-
align-items: flex-start;
71-
flex-direction: column;
92+
gap: @team-space-2;
93+
94+
.el-switch {
95+
justify-self: end;
96+
}
97+
}
98+
}
99+
}
100+
101+
@media screen and (max-width: 480px) {
102+
.v-battle,
103+
.m-team-view {
104+
.m-battle-notice__content {
105+
align-items: start;
106+
grid-template-columns: minmax(0, 1fr);
107+
108+
.el-switch {
109+
justify-self: start;
110+
}
72111
}
73112
}
74113
}

src/assets/css/team/design-system/_tokens.less

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,6 @@
3535
@team-space-5: 24px;
3636

3737
@team-duration-fast: 150ms;
38+
@team-duration-normal: 200ms;
39+
@team-duration-slow: 300ms;
3840
@team-ease-standard: cubic-bezier(0.2, 0, 0, 1);

0 commit comments

Comments
 (0)