This commit is contained in:
parent
8130935c20
commit
c76b69f18a
|
|
@ -27,27 +27,20 @@ def task_history_item(
|
|||
item.id == TaskState.task_id
|
||||
)
|
||||
|
||||
return rx.list.item(
|
||||
rx.hstack(
|
||||
# 渲染任务历史项的任务描述
|
||||
rx.text(
|
||||
item.description,
|
||||
flex=1,
|
||||
line_height="20px",
|
||||
padding_right="18px",
|
||||
color="var(--prismui-color-2)",
|
||||
text_overflow="ellipsis",
|
||||
white_space="nowrap",
|
||||
cursor="inherit",
|
||||
),
|
||||
align_items="center",
|
||||
width="100%",
|
||||
margin_bottom="8px",
|
||||
cursor="pointer",
|
||||
return rx.hstack(
|
||||
# 渲染任务历史项的任务描述
|
||||
rx.text(
|
||||
item.description,
|
||||
line_height="20px",
|
||||
padding_right="18px",
|
||||
color="var(--prismui-color-2)",
|
||||
text_overflow="ellipsis",
|
||||
white_space="nowrap",
|
||||
cursor="inherit",
|
||||
),
|
||||
align_items="center",
|
||||
width="100%",
|
||||
cursor="pointer",
|
||||
# 点击事件:将指定任务唯一标识设置为当前任务唯一标识
|
||||
on_click=lambda: TaskState.set_task_id(item.id),
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue