ChatLayout (聊天外壳)

响应式聊天外壳:布局自身宽 48rem 以上对话列表与会话两栏并排,更窄时一次一栏,用 showConversation 切换;列表栏可设 resizable 拖动;纯 CSS 容器查询,SSR 不猜屏幕。

完整的聊天界面

列表、会话头、置顶条、消息列表与输入区拼在一起。发一条消息看看发送中 → 已发送 → 对方已读; 你发的第三条会失败,点气泡旁的红色按钮重试。布局自身窄于 48rem(768px)时只显示一栏, 点左上角返回切换——和 App 一致;放在侧栏旁边时按实际可用的宽度判断,而不是窗口。这里加了 resizable,拖动列表右侧的分隔线可以调整列表宽度。

2025年12月29日
雪之下小春:
在吗在吗
雪之下小春:
你之前说的那个补丁我装上了,但是一进游戏就乱码
你:
十有八九是区域设置的问题。用 Locale Emulator 转区再开试试,或者直接这样启动:
你:
shell
LANG=ja_JP.UTF-8 wine "Game.exe"
雪之下小春:
好了!!转区之后正常了
雪之下小春:www.moyu.moe《星空鉄道とシロの旅》汉化补丁 v0.9
顺便问一下,这个补丁的汉化是完整的吗?moyu 上写的是 0.9 版
你:
主线是完整的,只有两个番外还没翻。作者说下个月会补上
昨天
雪之下小春:
通关了!!!给你看我最喜欢的几张 CG
雪之下小春:
海边那段真的哭死我了
雪之下小春:
最后那个反转你猜到了吗?原来列车长就是白本人
你:
猜到一半,第三章那封信就有暗示了
你:
推荐你接着玩同社的前作,世界观是连着的。论坛有人写过详细的考据:https://www.kungal.com/topic/1024
已编辑
你:
不过前作的系统有点老,存档记得一个位多开几个位
今天
雪之下小春:
早上好~
以下为未读消息
雪之下小春:
昨天你说的前作我下好了,片头曲好好听
雪之下小春:
对了,@鲲 周末的线下聚会你去吗?
App.vue

属性

属性类型默认值说明
resizablebooleanfalseLet the reader drag the divider between the list and the conversation (or move it with the arrow keys), through KunSplitPane.
showConversationbooleanfalseWhich pane a narrow layout shows: the conversation, or the list. From 48rem (768px, the `md` step) of the layout's OWN width up, both panes show — a chat beside an app's side rail decides by the room it has, not by the window.
sidebarMaxSizenumber480Widest the list can be dragged, in px. Only with `resizable`.
sidebarMinSizenumber280Narrowest the list can be dragged, in px. Only with `resizable`.
sidebarSizenumber352Width of the list pane in px while `resizable`; persist it from `sidebar-resize-end`.
sidebarWidthstring"22rem"Width of the list pane in the two-pane layout, as CSS. Ignored when `resizable`, which sizes the list in px through `v-model:sidebar-size`.

事件

事件回调参数说明
sidebar-resize-endsize: numberA drag or a key press on the divider finished with this list width.
update:sidebarSizevalue: number

插槽

插槽作用域说明
#defaultanyThe open conversation.
#emptyanyWhat the right pane shows with no conversation open, in the two-pane layout.
#sidebaranyThe conversation list.