mirror of
https://github.com/SECTL/SecScore.git
synced 2026-07-21 09:39:03 +08:00
修复积分操作页横向滚动并支持顶部拖动窗口
This commit is contained in:
@@ -64,3 +64,13 @@ textarea {
|
|||||||
.ss-table-center .ant-table td {
|
.ss-table-center .ant-table td {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.ss-operation-drawer .ant-drawer-header {
|
||||||
|
-webkit-app-region: drag;
|
||||||
|
user-select: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ss-operation-drawer .ant-drawer-header .ant-drawer-close,
|
||||||
|
.ss-operation-drawer .ant-drawer-header button {
|
||||||
|
-webkit-app-region: no-drag;
|
||||||
|
}
|
||||||
|
|||||||
+29
-6
@@ -1181,18 +1181,28 @@ export const Home: React.FC<HomeProps> = ({ canEdit, isPortraitMode = false }) =
|
|||||||
}
|
}
|
||||||
|
|
||||||
const operationPanelContent = selectedStudent && (
|
const operationPanelContent = selectedStudent && (
|
||||||
<div style={{ display: "flex", flexDirection: "column", gap: "20px", padding: "8px 0" }}>
|
<div
|
||||||
|
style={{
|
||||||
|
display: "flex",
|
||||||
|
flexDirection: "column",
|
||||||
|
gap: "20px",
|
||||||
|
padding: "8px 0",
|
||||||
|
overflowX: "hidden",
|
||||||
|
}}
|
||||||
|
>
|
||||||
<div
|
<div
|
||||||
style={{
|
style={{
|
||||||
display: "flex",
|
display: "flex",
|
||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
justifyContent: "space-between",
|
justifyContent: "space-between",
|
||||||
|
flexWrap: "wrap",
|
||||||
|
gap: "8px",
|
||||||
padding: "12px 16px",
|
padding: "12px 16px",
|
||||||
backgroundColor: "var(--ss-bg-color)",
|
backgroundColor: "var(--ss-bg-color)",
|
||||||
borderRadius: "8px",
|
borderRadius: "8px",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<div style={{ display: "flex", alignItems: "center", gap: "12px" }}>
|
<div style={{ display: "flex", alignItems: "center", gap: "12px", minWidth: 0, flex: 1 }}>
|
||||||
{selectedStudent.avatarUrl ? (
|
{selectedStudent.avatarUrl ? (
|
||||||
<img
|
<img
|
||||||
src={selectedStudent.avatarUrl}
|
src={selectedStudent.avatarUrl}
|
||||||
@@ -1223,9 +1233,19 @@ export const Home: React.FC<HomeProps> = ({ canEdit, isPortraitMode = false }) =
|
|||||||
{getDisplayText(selectedStudent.name)}
|
{getDisplayText(selectedStudent.name)}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
<span style={{ fontWeight: 600 }}>{selectedStudent.name}</span>
|
<span
|
||||||
|
style={{
|
||||||
|
fontWeight: 600,
|
||||||
|
minWidth: 0,
|
||||||
|
overflow: "hidden",
|
||||||
|
textOverflow: "ellipsis",
|
||||||
|
whiteSpace: "nowrap",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{selectedStudent.name}
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div style={{ display: "flex", alignItems: "center", gap: "8px" }}>
|
<div style={{ display: "flex", alignItems: "center", gap: "8px", flexShrink: 0 }}>
|
||||||
<span style={{ color: "var(--ss-text-secondary)", fontSize: "13px" }}>
|
<span style={{ color: "var(--ss-text-secondary)", fontSize: "13px" }}>
|
||||||
{t("home.currentScore")}:
|
{t("home.currentScore")}:
|
||||||
</span>
|
</span>
|
||||||
@@ -1358,7 +1378,7 @@ export const Home: React.FC<HomeProps> = ({ canEdit, isPortraitMode = false }) =
|
|||||||
0
|
0
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
<div style={{ display: "flex", gap: "12px", alignItems: "center" }}>
|
<div style={{ display: "flex", gap: "12px", alignItems: "center", flexWrap: "wrap" }}>
|
||||||
<InputNumber
|
<InputNumber
|
||||||
value={customScore}
|
value={customScore}
|
||||||
onChange={(v) => setCustomScore(v as number)}
|
onChange={(v) => setCustomScore(v as number)}
|
||||||
@@ -1610,12 +1630,15 @@ export const Home: React.FC<HomeProps> = ({ canEdit, isPortraitMode = false }) =
|
|||||||
{isPortraitMode ? (
|
{isPortraitMode ? (
|
||||||
<Drawer
|
<Drawer
|
||||||
title={t("home.operationTitle", { name: selectedStudent?.name })}
|
title={t("home.operationTitle", { name: selectedStudent?.name })}
|
||||||
|
className="ss-operation-drawer"
|
||||||
placement="bottom"
|
placement="bottom"
|
||||||
height="100%"
|
height="100%"
|
||||||
open={operationVisible}
|
open={operationVisible}
|
||||||
onClose={() => setOperationVisible(false)}
|
onClose={() => setOperationVisible(false)}
|
||||||
destroyOnClose
|
destroyOnClose
|
||||||
styles={{ body: { padding: "12px 16px 24px" } }}
|
styles={{
|
||||||
|
body: { padding: "12px 16px 24px", overflowX: "hidden" },
|
||||||
|
}}
|
||||||
footer={
|
footer={
|
||||||
<Space style={{ width: "100%", justifyContent: "flex-end" }}>
|
<Space style={{ width: "100%", justifyContent: "flex-end" }}>
|
||||||
<Button onClick={() => setOperationVisible(false)}>{t("common.cancel")}</Button>
|
<Button onClick={() => setOperationVisible(false)}>{t("common.cancel")}</Button>
|
||||||
|
|||||||
Reference in New Issue
Block a user