23 lines
450 B
Python
23 lines
450 B
Python
# -*- coding: utf-8 -*-
|
||
"""
|
||
会话历史折叠面板状态
|
||
"""
|
||
import reflex as rx
|
||
|
||
|
||
class ConversationHistoryCollapseState(rx.State):
|
||
"""
|
||
会话历史折叠面板状态
|
||
"""
|
||
|
||
# 展开状态,True表示展开,False表示折叠
|
||
is_expanded: bool = False
|
||
|
||
@rx.event
|
||
def toggle_expanded(self) -> None:
|
||
"""
|
||
切换展开状态
|
||
:return: None
|
||
"""
|
||
self.is_expanded = not self.is_expanded
|